-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add FeedbackLabel resource and APIs (#7838)
feat: Add QueryMetrics API feat: Add Quality AI resources and APIs feat: Add AnalysisRules resource and APIs docs: A comment for method `InitializeEncryptionSpec` in service `ContactCenterInsights` is changed docs: A comment for field `custom_metadata_keys` in message `.google.cloud.contactcenterinsights.v1.IngestConversationsRequest` is changed docs: A comment for field `encryption_spec` in message `.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest` is changed docs: A comment for field `partial_errors` in message `.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata` is changed docs: A comment for field `labels` in message `.google.cloud.contactcenterinsights.v1.Conversation` is changed docs: A comment for field `metadata_json` in message `.google.cloud.contactcenterinsights.v1.Conversation` is changed docs: A comment for message `EncryptionSpec` is changed docs: A comment for field `kms_key` in message `.google.cloud.contactcenterinsights.v1.EncryptionSpec` is changed PiperOrigin-RevId: 696581715 Source-Link: googleapis/googleapis@242a5f1 Source-Link: googleapis/googleapis-gen@1a51252 Copy-Tag: eyJwIjoiQ29udGFjdENlbnRlckluc2lnaHRzLy5Pd2xCb3QueWFtbCIsImgiOiIxYTUxMjUyNTNjM2RiZGQ5MTIyNzhkNDU5MDlhZDZjZmIwMDMxMDg1In0=
- Loading branch information
1 parent
5e8cbaf
commit 8a5ff92
Showing
134 changed files
with
22,209 additions
and
1,190 deletions.
There are no files selected for viewing
Binary file modified
BIN
+19.3 KB
(180%)
ContactCenterInsights/metadata/V1/ContactCenterInsights.php
Binary file not shown.
Binary file not shown.
83 changes: 83 additions & 0 deletions
83
...ctCenterInsights/samples/V1/ContactCenterInsightsClient/bulk_download_feedback_labels.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,83 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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_BulkDownloadFeedbackLabels_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\ApiCore\OperationResponse; | ||
use Google\Cloud\ContactCenterInsights\V1\BulkDownloadFeedbackLabelsRequest; | ||
use Google\Cloud\ContactCenterInsights\V1\BulkDownloadFeedbackLabelsResponse; | ||
use Google\Cloud\ContactCenterInsights\V1\Client\ContactCenterInsightsClient; | ||
use Google\Rpc\Status; | ||
|
||
/** | ||
* Download feedback labels in bulk. | ||
* | ||
* @param string $formattedParent The parent resource for new feedback labels. Please see | ||
* {@see ContactCenterInsightsClient::locationName()} for help formatting this field. | ||
*/ | ||
function bulk_download_feedback_labels_sample(string $formattedParent): void | ||
{ | ||
// Create a client. | ||
$contactCenterInsightsClient = new ContactCenterInsightsClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new BulkDownloadFeedbackLabelsRequest()) | ||
->setParent($formattedParent); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var OperationResponse $response */ | ||
$response = $contactCenterInsightsClient->bulkDownloadFeedbackLabels($request); | ||
$response->pollUntilComplete(); | ||
|
||
if ($response->operationSucceeded()) { | ||
/** @var BulkDownloadFeedbackLabelsResponse $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_download_feedback_labels_sample($formattedParent); | ||
} | ||
// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkDownloadFeedbackLabels_sync] |
83 changes: 83 additions & 0 deletions
83
ContactCenterInsights/samples/V1/ContactCenterInsightsClient/bulk_upload_feedback_labels.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,83 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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_BulkUploadFeedbackLabels_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\ApiCore\OperationResponse; | ||
use Google\Cloud\ContactCenterInsights\V1\BulkUploadFeedbackLabelsRequest; | ||
use Google\Cloud\ContactCenterInsights\V1\BulkUploadFeedbackLabelsResponse; | ||
use Google\Cloud\ContactCenterInsights\V1\Client\ContactCenterInsightsClient; | ||
use Google\Rpc\Status; | ||
|
||
/** | ||
* Upload feedback labels in bulk. | ||
* | ||
* @param string $formattedParent The parent resource for new feedback labels. Please see | ||
* {@see ContactCenterInsightsClient::locationName()} for help formatting this field. | ||
*/ | ||
function bulk_upload_feedback_labels_sample(string $formattedParent): void | ||
{ | ||
// Create a client. | ||
$contactCenterInsightsClient = new ContactCenterInsightsClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new BulkUploadFeedbackLabelsRequest()) | ||
->setParent($formattedParent); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var OperationResponse $response */ | ||
$response = $contactCenterInsightsClient->bulkUploadFeedbackLabels($request); | ||
$response->pollUntilComplete(); | ||
|
||
if ($response->operationSucceeded()) { | ||
/** @var BulkUploadFeedbackLabelsResponse $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_upload_feedback_labels_sample($formattedParent); | ||
} | ||
// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkUploadFeedbackLabels_sync] |
76 changes: 76 additions & 0 deletions
76
ContactCenterInsights/samples/V1/ContactCenterInsightsClient/create_analysis_rule.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,76 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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_CreateAnalysisRule_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Cloud\ContactCenterInsights\V1\AnalysisRule; | ||
use Google\Cloud\ContactCenterInsights\V1\Client\ContactCenterInsightsClient; | ||
use Google\Cloud\ContactCenterInsights\V1\CreateAnalysisRuleRequest; | ||
|
||
/** | ||
* Creates a analysis rule. | ||
* | ||
* @param string $formattedParent The parent resource of the analysis rule. Required. The location | ||
* to create a analysis rule for. Format: `projects/<Project | ||
* ID>/locations/<Location ID>` or `projects/<Project | ||
* Number>/locations/<Location ID>` | ||
* Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. | ||
*/ | ||
function create_analysis_rule_sample(string $formattedParent): void | ||
{ | ||
// Create a client. | ||
$contactCenterInsightsClient = new ContactCenterInsightsClient(); | ||
|
||
// Prepare the request message. | ||
$analysisRule = new AnalysisRule(); | ||
$request = (new CreateAnalysisRuleRequest()) | ||
->setParent($formattedParent) | ||
->setAnalysisRule($analysisRule); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var AnalysisRule $response */ | ||
$response = $contactCenterInsightsClient->createAnalysisRule($request); | ||
printf('Response data: %s' . PHP_EOL, $response->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]'); | ||
|
||
create_analysis_rule_sample($formattedParent); | ||
} | ||
// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysisRule_sync] |
77 changes: 77 additions & 0 deletions
77
ContactCenterInsights/samples/V1/ContactCenterInsightsClient/create_feedback_label.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,77 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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_CreateFeedbackLabel_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Cloud\ContactCenterInsights\V1\Client\ContactCenterInsightsClient; | ||
use Google\Cloud\ContactCenterInsights\V1\CreateFeedbackLabelRequest; | ||
use Google\Cloud\ContactCenterInsights\V1\FeedbackLabel; | ||
|
||
/** | ||
* Create feedback label. | ||
* | ||
* @param string $formattedParent The parent resource of the feedback label. Please see | ||
* {@see ContactCenterInsightsClient::conversationName()} for help formatting this field. | ||
*/ | ||
function create_feedback_label_sample(string $formattedParent): void | ||
{ | ||
// Create a client. | ||
$contactCenterInsightsClient = new ContactCenterInsightsClient(); | ||
|
||
// Prepare the request message. | ||
$feedbackLabel = new FeedbackLabel(); | ||
$request = (new CreateFeedbackLabelRequest()) | ||
->setParent($formattedParent) | ||
->setFeedbackLabel($feedbackLabel); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var FeedbackLabel $response */ | ||
$response = $contactCenterInsightsClient->createFeedbackLabel($request); | ||
printf('Response data: %s' . PHP_EOL, $response->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::conversationName( | ||
'[PROJECT]', | ||
'[LOCATION]', | ||
'[CONVERSATION]' | ||
); | ||
|
||
create_feedback_label_sample($formattedParent); | ||
} | ||
// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateFeedbackLabel_sync] |
Oops, something went wrong.