Skip to content

Commit

Permalink
feat: Launch BulkDelete API, and bulk audio import via the IngestConv…
Browse files Browse the repository at this point in the history
…ersations API (googleapis#6772)

PiperOrigin-RevId: 579178675
Source-Link: googleapis/googleapis@7e33fcb
Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb25a3fccb79bb35f227b0b1939ff62f056dfbea
Copy-Tag: eyJwIjoiQ29udGFjdENlbnRlckluc2lnaHRzLy5Pd2xCb3QueWFtbCIsImgiOiJjYjI1YTNmY2NiNzliYjM1ZjIyN2IwYjE5MzlmZjYyZjA1NmRmYmVhIn0=
  • Loading branch information
gcf-owl-bot[bot] authored Nov 6, 2023
1 parent e2cf85e commit 72417b6
Show file tree
Hide file tree
Showing 19 changed files with 1,256 additions and 1 deletion.
Binary file modified ContactCenterInsights/metadata/V1/ContactCenterInsights.php
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?php
/*
* Copyright 2023 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 CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsResponse;
use Google\Cloud\ContactCenterInsights\V1\ContactCenterInsightsClient;
use Google\Rpc\Status;

/**
* Deletes multiple conversations in a single request.
*
* @param string $formattedParent The parent resource to create analyses in.
* Format:
* projects/{project}/locations/{location}
* Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field.
*/
function bulk_delete_conversations_sample(string $formattedParent): void
{
// Create a client.
$contactCenterInsightsClient = new ContactCenterInsightsClient();

// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $contactCenterInsightsClient->bulkDeleteConversations($formattedParent);
$response->pollUntilComplete();

if ($response->operationSucceeded()) {
/** @var BulkDeleteConversationsResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]');

bulk_delete_conversations_sample($formattedParent);
}
// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_sync]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions ContactCenterInsights/src/V1/BulkAnalyzeConversationsMetadata.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

203 changes: 203 additions & 0 deletions ContactCenterInsights/src/V1/BulkDeleteConversationsMetadata.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 72417b6

Please sign in to comment.