Skip to content

Commit dbdc8a1

Browse files
feat: [contactcenterinsights] Launch BulkDelete API, and bulk audio import 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>
1 parent 53488e4 commit dbdc8a1

File tree

35 files changed

+7302
-474
lines changed

35 files changed

+7302
-474
lines changed

java-contact-center-insights/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>26.23.0</version>
23+
<version>26.26.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
195195
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
196196
[stability-image]: https://img.shields.io/badge/stability-stable-green
197197
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-contact-center-insights.svg
198-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-contact-center-insights/2.24.0
198+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-contact-center-insights/2.29.0
199199
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
200200
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
201201
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-contact-center-insights/google-cloud-contact-center-insights/src/main/java/com/google/cloud/contactcenterinsights/v1/ContactCenterInsightsClient.java

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,180 @@ public final UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable(
17271727
return stub.bulkAnalyzeConversationsCallable();
17281728
}
17291729

1730+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1731+
/**
1732+
* Deletes multiple conversations in a single request.
1733+
*
1734+
* <p>Sample code:
1735+
*
1736+
* <pre>{@code
1737+
* // This snippet has been automatically generated and should be regarded as a code template only.
1738+
* // It will require modifications to work:
1739+
* // - It may require correct/in-range values for request initialization.
1740+
* // - It may require specifying regional endpoints when creating the service client as shown in
1741+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1742+
* try (ContactCenterInsightsClient contactCenterInsightsClient =
1743+
* ContactCenterInsightsClient.create()) {
1744+
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
1745+
* String filter = "filter-1274492040";
1746+
* BulkDeleteConversationsResponse response =
1747+
* contactCenterInsightsClient.bulkDeleteConversationsAsync(parent, filter).get();
1748+
* }
1749+
* }</pre>
1750+
*
1751+
* @param parent Required. The parent resource to create analyses in. Format:
1752+
* projects/{project}/locations/{location}
1753+
* @param filter Filter used to select the subset of conversations to analyze.
1754+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1755+
*/
1756+
public final OperationFuture<BulkDeleteConversationsResponse, BulkDeleteConversationsMetadata>
1757+
bulkDeleteConversationsAsync(LocationName parent, String filter) {
1758+
BulkDeleteConversationsRequest request =
1759+
BulkDeleteConversationsRequest.newBuilder()
1760+
.setParent(parent == null ? null : parent.toString())
1761+
.setFilter(filter)
1762+
.build();
1763+
return bulkDeleteConversationsAsync(request);
1764+
}
1765+
1766+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1767+
/**
1768+
* Deletes multiple conversations in a single request.
1769+
*
1770+
* <p>Sample code:
1771+
*
1772+
* <pre>{@code
1773+
* // This snippet has been automatically generated and should be regarded as a code template only.
1774+
* // It will require modifications to work:
1775+
* // - It may require correct/in-range values for request initialization.
1776+
* // - It may require specifying regional endpoints when creating the service client as shown in
1777+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1778+
* try (ContactCenterInsightsClient contactCenterInsightsClient =
1779+
* ContactCenterInsightsClient.create()) {
1780+
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
1781+
* String filter = "filter-1274492040";
1782+
* BulkDeleteConversationsResponse response =
1783+
* contactCenterInsightsClient.bulkDeleteConversationsAsync(parent, filter).get();
1784+
* }
1785+
* }</pre>
1786+
*
1787+
* @param parent Required. The parent resource to create analyses in. Format:
1788+
* projects/{project}/locations/{location}
1789+
* @param filter Filter used to select the subset of conversations to analyze.
1790+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1791+
*/
1792+
public final OperationFuture<BulkDeleteConversationsResponse, BulkDeleteConversationsMetadata>
1793+
bulkDeleteConversationsAsync(String parent, String filter) {
1794+
BulkDeleteConversationsRequest request =
1795+
BulkDeleteConversationsRequest.newBuilder().setParent(parent).setFilter(filter).build();
1796+
return bulkDeleteConversationsAsync(request);
1797+
}
1798+
1799+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1800+
/**
1801+
* Deletes multiple conversations in a single request.
1802+
*
1803+
* <p>Sample code:
1804+
*
1805+
* <pre>{@code
1806+
* // This snippet has been automatically generated and should be regarded as a code template only.
1807+
* // It will require modifications to work:
1808+
* // - It may require correct/in-range values for request initialization.
1809+
* // - It may require specifying regional endpoints when creating the service client as shown in
1810+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1811+
* try (ContactCenterInsightsClient contactCenterInsightsClient =
1812+
* ContactCenterInsightsClient.create()) {
1813+
* BulkDeleteConversationsRequest request =
1814+
* BulkDeleteConversationsRequest.newBuilder()
1815+
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1816+
* .setFilter("filter-1274492040")
1817+
* .setMaxDeleteCount(1611707510)
1818+
* .setForce(true)
1819+
* .build();
1820+
* BulkDeleteConversationsResponse response =
1821+
* contactCenterInsightsClient.bulkDeleteConversationsAsync(request).get();
1822+
* }
1823+
* }</pre>
1824+
*
1825+
* @param request The request object containing all of the parameters for the API call.
1826+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1827+
*/
1828+
public final OperationFuture<BulkDeleteConversationsResponse, BulkDeleteConversationsMetadata>
1829+
bulkDeleteConversationsAsync(BulkDeleteConversationsRequest request) {
1830+
return bulkDeleteConversationsOperationCallable().futureCall(request);
1831+
}
1832+
1833+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1834+
/**
1835+
* Deletes multiple conversations in a single request.
1836+
*
1837+
* <p>Sample code:
1838+
*
1839+
* <pre>{@code
1840+
* // This snippet has been automatically generated and should be regarded as a code template only.
1841+
* // It will require modifications to work:
1842+
* // - It may require correct/in-range values for request initialization.
1843+
* // - It may require specifying regional endpoints when creating the service client as shown in
1844+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1845+
* try (ContactCenterInsightsClient contactCenterInsightsClient =
1846+
* ContactCenterInsightsClient.create()) {
1847+
* BulkDeleteConversationsRequest request =
1848+
* BulkDeleteConversationsRequest.newBuilder()
1849+
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1850+
* .setFilter("filter-1274492040")
1851+
* .setMaxDeleteCount(1611707510)
1852+
* .setForce(true)
1853+
* .build();
1854+
* OperationFuture<BulkDeleteConversationsResponse, BulkDeleteConversationsMetadata> future =
1855+
* contactCenterInsightsClient
1856+
* .bulkDeleteConversationsOperationCallable()
1857+
* .futureCall(request);
1858+
* // Do something.
1859+
* BulkDeleteConversationsResponse response = future.get();
1860+
* }
1861+
* }</pre>
1862+
*/
1863+
public final OperationCallable<
1864+
BulkDeleteConversationsRequest,
1865+
BulkDeleteConversationsResponse,
1866+
BulkDeleteConversationsMetadata>
1867+
bulkDeleteConversationsOperationCallable() {
1868+
return stub.bulkDeleteConversationsOperationCallable();
1869+
}
1870+
1871+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1872+
/**
1873+
* Deletes multiple conversations in a single request.
1874+
*
1875+
* <p>Sample code:
1876+
*
1877+
* <pre>{@code
1878+
* // This snippet has been automatically generated and should be regarded as a code template only.
1879+
* // It will require modifications to work:
1880+
* // - It may require correct/in-range values for request initialization.
1881+
* // - It may require specifying regional endpoints when creating the service client as shown in
1882+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1883+
* try (ContactCenterInsightsClient contactCenterInsightsClient =
1884+
* ContactCenterInsightsClient.create()) {
1885+
* BulkDeleteConversationsRequest request =
1886+
* BulkDeleteConversationsRequest.newBuilder()
1887+
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1888+
* .setFilter("filter-1274492040")
1889+
* .setMaxDeleteCount(1611707510)
1890+
* .setForce(true)
1891+
* .build();
1892+
* ApiFuture<Operation> future =
1893+
* contactCenterInsightsClient.bulkDeleteConversationsCallable().futureCall(request);
1894+
* // Do something.
1895+
* Operation response = future.get();
1896+
* }
1897+
* }</pre>
1898+
*/
1899+
public final UnaryCallable<BulkDeleteConversationsRequest, Operation>
1900+
bulkDeleteConversationsCallable() {
1901+
return stub.bulkDeleteConversationsCallable();
1902+
}
1903+
17301904
// AUTO-GENERATED DOCUMENTATION AND METHOD.
17311905
/**
17321906
* Imports conversations and processes them according to the user's configuration.
@@ -1808,6 +1982,8 @@ public final UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable(
18081982
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
18091983
* .setConversationConfig(
18101984
* IngestConversationsRequest.ConversationConfig.newBuilder().build())
1985+
* .setRedactionConfig(RedactionConfig.newBuilder().build())
1986+
* .setSpeechConfig(SpeechConfig.newBuilder().build())
18111987
* .build();
18121988
* IngestConversationsResponse response =
18131989
* contactCenterInsightsClient.ingestConversationsAsync(request).get();
@@ -1841,6 +2017,8 @@ public final UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable(
18412017
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
18422018
* .setConversationConfig(
18432019
* IngestConversationsRequest.ConversationConfig.newBuilder().build())
2020+
* .setRedactionConfig(RedactionConfig.newBuilder().build())
2021+
* .setSpeechConfig(SpeechConfig.newBuilder().build())
18442022
* .build();
18452023
* OperationFuture<IngestConversationsResponse, IngestConversationsMetadata> future =
18462024
* contactCenterInsightsClient.ingestConversationsOperationCallable().futureCall(request);
@@ -1874,6 +2052,8 @@ public final UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable(
18742052
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
18752053
* .setConversationConfig(
18762054
* IngestConversationsRequest.ConversationConfig.newBuilder().build())
2055+
* .setRedactionConfig(RedactionConfig.newBuilder().build())
2056+
* .setSpeechConfig(SpeechConfig.newBuilder().build())
18772057
* .build();
18782058
* ApiFuture<Operation> future =
18792059
* contactCenterInsightsClient.ingestConversationsCallable().futureCall(request);

java-contact-center-insights/google-cloud-contact-center-insights/src/main/java/com/google/cloud/contactcenterinsights/v1/ContactCenterInsightsSettings.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,23 @@ public UnaryCallSettings<DeleteAnalysisRequest, Empty> deleteAnalysisSettings()
167167
.bulkAnalyzeConversationsOperationSettings();
168168
}
169169

170+
/** Returns the object with the settings used for calls to bulkDeleteConversations. */
171+
public UnaryCallSettings<BulkDeleteConversationsRequest, Operation>
172+
bulkDeleteConversationsSettings() {
173+
return ((ContactCenterInsightsStubSettings) getStubSettings())
174+
.bulkDeleteConversationsSettings();
175+
}
176+
177+
/** Returns the object with the settings used for calls to bulkDeleteConversations. */
178+
public OperationCallSettings<
179+
BulkDeleteConversationsRequest,
180+
BulkDeleteConversationsResponse,
181+
BulkDeleteConversationsMetadata>
182+
bulkDeleteConversationsOperationSettings() {
183+
return ((ContactCenterInsightsStubSettings) getStubSettings())
184+
.bulkDeleteConversationsOperationSettings();
185+
}
186+
170187
/** Returns the object with the settings used for calls to ingestConversations. */
171188
public UnaryCallSettings<IngestConversationsRequest, Operation> ingestConversationsSettings() {
172189
return ((ContactCenterInsightsStubSettings) getStubSettings()).ingestConversationsSettings();
@@ -560,6 +577,21 @@ public UnaryCallSettings.Builder<DeleteAnalysisRequest, Empty> deleteAnalysisSet
560577
return getStubSettingsBuilder().bulkAnalyzeConversationsOperationSettings();
561578
}
562579

580+
/** Returns the builder for the settings used for calls to bulkDeleteConversations. */
581+
public UnaryCallSettings.Builder<BulkDeleteConversationsRequest, Operation>
582+
bulkDeleteConversationsSettings() {
583+
return getStubSettingsBuilder().bulkDeleteConversationsSettings();
584+
}
585+
586+
/** Returns the builder for the settings used for calls to bulkDeleteConversations. */
587+
public OperationCallSettings.Builder<
588+
BulkDeleteConversationsRequest,
589+
BulkDeleteConversationsResponse,
590+
BulkDeleteConversationsMetadata>
591+
bulkDeleteConversationsOperationSettings() {
592+
return getStubSettingsBuilder().bulkDeleteConversationsOperationSettings();
593+
}
594+
563595
/** Returns the builder for the settings used for calls to ingestConversations. */
564596
public UnaryCallSettings.Builder<IngestConversationsRequest, Operation>
565597
ingestConversationsSettings() {

java-contact-center-insights/google-cloud-contact-center-insights/src/main/java/com/google/cloud/contactcenterinsights/v1/gapic_metadata.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"BulkAnalyzeConversations": {
1414
"methods": ["bulkAnalyzeConversationsAsync", "bulkAnalyzeConversationsAsync", "bulkAnalyzeConversationsAsync", "bulkAnalyzeConversationsOperationCallable", "bulkAnalyzeConversationsCallable"]
1515
},
16+
"BulkDeleteConversations": {
17+
"methods": ["bulkDeleteConversationsAsync", "bulkDeleteConversationsAsync", "bulkDeleteConversationsAsync", "bulkDeleteConversationsOperationCallable", "bulkDeleteConversationsCallable"]
18+
},
1619
"CalculateIssueModelStats": {
1720
"methods": ["calculateIssueModelStats", "calculateIssueModelStats", "calculateIssueModelStats", "calculateIssueModelStatsCallable"]
1821
},

java-contact-center-insights/google-cloud-contact-center-insights/src/main/java/com/google/cloud/contactcenterinsights/v1/stub/ContactCenterInsightsStub.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
import com.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata;
2929
import com.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest;
3030
import com.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse;
31+
import com.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata;
32+
import com.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest;
33+
import com.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse;
3134
import com.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest;
3235
import com.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse;
3336
import com.google.cloud.contactcenterinsights.v1.CalculateStatsRequest;
@@ -188,6 +191,20 @@ public UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable() {
188191
throw new UnsupportedOperationException("Not implemented: bulkAnalyzeConversationsCallable()");
189192
}
190193

194+
public OperationCallable<
195+
BulkDeleteConversationsRequest,
196+
BulkDeleteConversationsResponse,
197+
BulkDeleteConversationsMetadata>
198+
bulkDeleteConversationsOperationCallable() {
199+
throw new UnsupportedOperationException(
200+
"Not implemented: bulkDeleteConversationsOperationCallable()");
201+
}
202+
203+
public UnaryCallable<BulkDeleteConversationsRequest, Operation>
204+
bulkDeleteConversationsCallable() {
205+
throw new UnsupportedOperationException("Not implemented: bulkDeleteConversationsCallable()");
206+
}
207+
191208
public OperationCallable<
192209
IngestConversationsRequest, IngestConversationsResponse, IngestConversationsMetadata>
193210
ingestConversationsOperationCallable() {

0 commit comments

Comments
 (0)