forked from googleapis/google-cloud-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Launch BulkDelete API, and bulk audio import via the IngestConv…
…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
1 parent
e2cf85e
commit 72417b6
Showing
19 changed files
with
1,256 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
80 changes: 80 additions & 0 deletions
80
ContactCenterInsights/samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
2 changes: 1 addition & 1 deletion
2
ContactCenterInsights/src/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
ContactCenterInsights/src/V1/BulkAnalyzeConversationsMetadata.php
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
203 changes: 203 additions & 0 deletions
203
ContactCenterInsights/src/V1/BulkDeleteConversationsMetadata.php
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.