diff --git a/ContactCenterInsights/metadata/V1/ContactCenterInsights.php b/ContactCenterInsights/metadata/V1/ContactCenterInsights.php
index d959670b9429..2e0d9949d501 100644
Binary files a/ContactCenterInsights/metadata/V1/ContactCenterInsights.php and b/ContactCenterInsights/metadata/V1/ContactCenterInsights.php differ
diff --git a/ContactCenterInsights/metadata/V1/Resources.php b/ContactCenterInsights/metadata/V1/Resources.php
index f6fc935d67b7..d4eaa98b8c3a 100644
Binary files a/ContactCenterInsights/metadata/V1/Resources.php and b/ContactCenterInsights/metadata/V1/Resources.php differ
diff --git a/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/create_conversation.php b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/create_conversation.php
index de5e391e5049..351839a113a1 100644
--- a/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/create_conversation.php
+++ b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/create_conversation.php
@@ -30,6 +30,8 @@
/**
* Creates a conversation.
+ * Note that this method does not support audio transcription or redaction.
+ * Use `conversations.upload` instead.
*
* @param string $formattedParent The parent resource of the conversation. Please see
* {@see ContactCenterInsightsClient::locationName()} for help formatting this field.
diff --git a/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/export_issue_model.php b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/export_issue_model.php
new file mode 100644
index 000000000000..5f3b0fbb3c28
--- /dev/null
+++ b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/export_issue_model.php
@@ -0,0 +1,87 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $contactCenterInsightsClient->exportIssueModel($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var ExportIssueModelResponse $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
+{
+ $formattedName = ContactCenterInsightsClient::issueModelName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[ISSUE_MODEL]'
+ );
+
+ export_issue_model_sample($formattedName);
+}
+// [END contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_sync]
diff --git a/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/get_encryption_spec.php b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/get_encryption_spec.php
new file mode 100644
index 000000000000..82178006a7dc
--- /dev/null
+++ b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/get_encryption_spec.php
@@ -0,0 +1,71 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var EncryptionSpec $response */
+ $response = $contactCenterInsightsClient->getEncryptionSpec($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
+{
+ $formattedName = ContactCenterInsightsClient::encryptionSpecName('[PROJECT]', '[LOCATION]');
+
+ get_encryption_spec_sample($formattedName);
+}
+// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_sync]
diff --git a/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/import_issue_model.php b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/import_issue_model.php
new file mode 100644
index 000000000000..5b023a1d1f7f
--- /dev/null
+++ b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/import_issue_model.php
@@ -0,0 +1,83 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $contactCenterInsightsClient->importIssueModel($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var ImportIssueModelResponse $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]');
+
+ import_issue_model_sample($formattedParent);
+}
+// [END contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_sync]
diff --git a/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/initialize_encryption_spec.php b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/initialize_encryption_spec.php
new file mode 100644
index 000000000000..044a638387ec
--- /dev/null
+++ b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/initialize_encryption_spec.php
@@ -0,0 +1,93 @@
+setKmsKey($encryptionSpecKmsKey);
+ $request = (new InitializeEncryptionSpecRequest())
+ ->setEncryptionSpec($encryptionSpec);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $contactCenterInsightsClient->initializeEncryptionSpec($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var InitializeEncryptionSpecResponse $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
+{
+ $encryptionSpecKmsKey = '[KMS_KEY]';
+
+ initialize_encryption_spec_sample($encryptionSpecKmsKey);
+}
+// [END contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_sync]
diff --git a/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/upload_conversation.php b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/upload_conversation.php
index 282718b15db1..61a2fe2f44ad 100644
--- a/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/upload_conversation.php
+++ b/ContactCenterInsights/samples/V1/ContactCenterInsightsClient/upload_conversation.php
@@ -31,8 +31,8 @@
use Google\Rpc\Status;
/**
- * Create a longrunning conversation upload operation. This method differs
- * from CreateConversation by allowing audio transcription and optional DLP
+ * Create a long-running conversation upload operation. This method differs
+ * from `CreateConversation` by allowing audio transcription and optional DLP
* redaction.
*
* @param string $formattedParent The parent resource of the conversation. Please see
diff --git a/ContactCenterInsights/src/V1/AnalysisResult/CallAnalysisMetadata.php b/ContactCenterInsights/src/V1/AnalysisResult/CallAnalysisMetadata.php
index e5eaf71af190..e3e9ab449b5f 100644
--- a/ContactCenterInsights/src/V1/AnalysisResult/CallAnalysisMetadata.php
+++ b/ContactCenterInsights/src/V1/AnalysisResult/CallAnalysisMetadata.php
@@ -33,6 +33,12 @@ class CallAnalysisMetadata extends \Google\Protobuf\Internal\Message
* Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.ConversationLevelSentiment sentiments = 4;
*/
private $sentiments;
+ /**
+ * Overall conversation-level silence during the call.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationLevelSilence silence = 11;
+ */
+ protected $silence = null;
/**
* All the matched intents in the call.
*
@@ -64,6 +70,8 @@ class CallAnalysisMetadata extends \Google\Protobuf\Internal\Message
* All the entities in the call.
* @type array<\Google\Cloud\ContactCenterInsights\V1\ConversationLevelSentiment>|\Google\Protobuf\Internal\RepeatedField $sentiments
* Overall conversation-level sentiment for each channel of the call.
+ * @type \Google\Cloud\ContactCenterInsights\V1\ConversationLevelSilence $silence
+ * Overall conversation-level silence during the call.
* @type array|\Google\Protobuf\Internal\MapField $intents
* All the matched intents in the call.
* @type array|\Google\Protobuf\Internal\MapField $phrase_matchers
@@ -155,6 +163,42 @@ public function setSentiments($var)
return $this;
}
+ /**
+ * Overall conversation-level silence during the call.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationLevelSilence silence = 11;
+ * @return \Google\Cloud\ContactCenterInsights\V1\ConversationLevelSilence|null
+ */
+ public function getSilence()
+ {
+ return $this->silence;
+ }
+
+ public function hasSilence()
+ {
+ return isset($this->silence);
+ }
+
+ public function clearSilence()
+ {
+ unset($this->silence);
+ }
+
+ /**
+ * Overall conversation-level silence during the call.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationLevelSilence silence = 11;
+ * @param \Google\Cloud\ContactCenterInsights\V1\ConversationLevelSilence $var
+ * @return $this
+ */
+ public function setSilence($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ConversationLevelSilence::class);
+ $this->silence = $var;
+
+ return $this;
+ }
+
/**
* All the matched intents in the call.
*
diff --git a/ContactCenterInsights/src/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php b/ContactCenterInsights/src/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php
index e291cb1d1482..c6be9e6691d7 100644
--- a/ContactCenterInsights/src/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php
+++ b/ContactCenterInsights/src/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php
@@ -25,10 +25,17 @@ class SummarizationModel
* Generated from protobuf enum BASELINE_MODEL = 1;
*/
const BASELINE_MODEL = 1;
+ /**
+ * The CCAI baseline model, V2.0.
+ *
+ * Generated from protobuf enum BASELINE_MODEL_V2_0 = 2;
+ */
+ const BASELINE_MODEL_V2_0 = 2;
private static $valueToName = [
self::SUMMARIZATION_MODEL_UNSPECIFIED => 'SUMMARIZATION_MODEL_UNSPECIFIED',
self::BASELINE_MODEL => 'BASELINE_MODEL',
+ self::BASELINE_MODEL_V2_0 => 'BASELINE_MODEL_V2_0',
];
public static function name($value)
diff --git a/ContactCenterInsights/src/V1/Client/ContactCenterInsightsClient.php b/ContactCenterInsights/src/V1/Client/ContactCenterInsightsClient.php
index fca384bdd4f0..8a87b9d496f1 100644
--- a/ContactCenterInsights/src/V1/Client/ContactCenterInsightsClient.php
+++ b/ContactCenterInsights/src/V1/Client/ContactCenterInsightsClient.php
@@ -54,15 +54,20 @@
use Google\Cloud\ContactCenterInsights\V1\DeletePhraseMatcherRequest;
use Google\Cloud\ContactCenterInsights\V1\DeleteViewRequest;
use Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest;
+use Google\Cloud\ContactCenterInsights\V1\EncryptionSpec;
use Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest;
+use Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest;
use Google\Cloud\ContactCenterInsights\V1\GetAnalysisRequest;
use Google\Cloud\ContactCenterInsights\V1\GetConversationRequest;
+use Google\Cloud\ContactCenterInsights\V1\GetEncryptionSpecRequest;
use Google\Cloud\ContactCenterInsights\V1\GetIssueModelRequest;
use Google\Cloud\ContactCenterInsights\V1\GetIssueRequest;
use Google\Cloud\ContactCenterInsights\V1\GetPhraseMatcherRequest;
use Google\Cloud\ContactCenterInsights\V1\GetSettingsRequest;
use Google\Cloud\ContactCenterInsights\V1\GetViewRequest;
+use Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest;
use Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest;
+use Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecRequest;
use Google\Cloud\ContactCenterInsights\V1\Issue;
use Google\Cloud\ContactCenterInsights\V1\IssueModel;
use Google\Cloud\ContactCenterInsights\V1\ListAnalysesRequest;
@@ -116,14 +121,18 @@
* @method PromiseInterface deleteViewAsync(DeleteViewRequest $request, array $optionalArgs = [])
* @method PromiseInterface deployIssueModelAsync(DeployIssueModelRequest $request, array $optionalArgs = [])
* @method PromiseInterface exportInsightsDataAsync(ExportInsightsDataRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface exportIssueModelAsync(ExportIssueModelRequest $request, array $optionalArgs = [])
* @method PromiseInterface getAnalysisAsync(GetAnalysisRequest $request, array $optionalArgs = [])
* @method PromiseInterface getConversationAsync(GetConversationRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getEncryptionSpecAsync(GetEncryptionSpecRequest $request, array $optionalArgs = [])
* @method PromiseInterface getIssueAsync(GetIssueRequest $request, array $optionalArgs = [])
* @method PromiseInterface getIssueModelAsync(GetIssueModelRequest $request, array $optionalArgs = [])
* @method PromiseInterface getPhraseMatcherAsync(GetPhraseMatcherRequest $request, array $optionalArgs = [])
* @method PromiseInterface getSettingsAsync(GetSettingsRequest $request, array $optionalArgs = [])
* @method PromiseInterface getViewAsync(GetViewRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface importIssueModelAsync(ImportIssueModelRequest $request, array $optionalArgs = [])
* @method PromiseInterface ingestConversationsAsync(IngestConversationsRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface initializeEncryptionSpecAsync(InitializeEncryptionSpecRequest $request, array $optionalArgs = [])
* @method PromiseInterface listAnalysesAsync(ListAnalysesRequest $request, array $optionalArgs = [])
* @method PromiseInterface listConversationsAsync(ListConversationsRequest $request, array $optionalArgs = [])
* @method PromiseInterface listIssueModelsAsync(ListIssueModelsRequest $request, array $optionalArgs = [])
@@ -303,6 +312,23 @@ public static function conversationProfileName(
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * encryption_spec resource.
+ *
+ * @param string $project
+ * @param string $location
+ *
+ * @return string The formatted encryption_spec resource.
+ */
+ public static function encryptionSpecName(string $project, string $location): string
+ {
+ return self::getPathTemplate('encryptionSpec')->render([
+ 'project' => $project,
+ 'location' => $location,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a issue
* resource.
@@ -507,6 +533,7 @@ public static function viewName(string $project, string $location, string $view)
* - analysis: projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}
* - conversation: projects/{project}/locations/{location}/conversations/{conversation}
* - conversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}
+ * - encryptionSpec: projects/{project}/locations/{location}/encryptionSpec
* - issue: projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}
* - issueModel: projects/{project}/locations/{location}/issueModels/{issue_model}
* - location: projects/{project}/locations/{location}
@@ -750,6 +777,8 @@ public function createAnalysis(CreateAnalysisRequest $request, array $callOption
/**
* Creates a conversation.
+ * Note that this method does not support audio transcription or redaction.
+ * Use `conversations.upload` instead.
*
* The async variant is
* {@see ContactCenterInsightsClient::createConversationAsync()} .
@@ -1059,6 +1088,33 @@ public function exportInsightsData(ExportInsightsDataRequest $request, array $ca
return $this->startApiCall('ExportInsightsData', $request, $callOptions)->wait();
}
+ /**
+ * Exports an issue model to the provided destination.
+ *
+ * The async variant is {@see ContactCenterInsightsClient::exportIssueModelAsync()}
+ * .
+ *
+ * @example samples/V1/ContactCenterInsightsClient/export_issue_model.php
+ *
+ * @param ExportIssueModelRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function exportIssueModel(ExportIssueModelRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('ExportIssueModel', $request, $callOptions)->wait();
+ }
+
/**
* Gets an analysis.
*
@@ -1112,6 +1168,33 @@ public function getConversation(GetConversationRequest $request, array $callOpti
return $this->startApiCall('GetConversation', $request, $callOptions)->wait();
}
+ /**
+ * Gets location-level encryption key specification.
+ *
+ * The async variant is
+ * {@see ContactCenterInsightsClient::getEncryptionSpecAsync()} .
+ *
+ * @example samples/V1/ContactCenterInsightsClient/get_encryption_spec.php
+ *
+ * @param GetEncryptionSpecRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return EncryptionSpec
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getEncryptionSpec(GetEncryptionSpecRequest $request, array $callOptions = []): EncryptionSpec
+ {
+ return $this->startApiCall('GetEncryptionSpec', $request, $callOptions)->wait();
+ }
+
/**
* Gets an issue.
*
@@ -1243,6 +1326,33 @@ public function getView(GetViewRequest $request, array $callOptions = []): View
return $this->startApiCall('GetView', $request, $callOptions)->wait();
}
+ /**
+ * Imports an issue model from a Cloud Storage bucket.
+ *
+ * The async variant is {@see ContactCenterInsightsClient::importIssueModelAsync()}
+ * .
+ *
+ * @example samples/V1/ContactCenterInsightsClient/import_issue_model.php
+ *
+ * @param ImportIssueModelRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function importIssueModel(ImportIssueModelRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('ImportIssueModel', $request, $callOptions)->wait();
+ }
+
/**
* Imports conversations and processes them according to the user's
* configuration.
@@ -1271,6 +1381,39 @@ public function ingestConversations(IngestConversationsRequest $request, array $
return $this->startApiCall('IngestConversations', $request, $callOptions)->wait();
}
+ /**
+ * Initializes a location-level encryption key specification. An error will
+ * be thrown if the location has resources already created before the
+ * initialization. Once the encryption specification is initialized at a
+ * location, it is immutable and all newly created resources under the
+ * location will be encrypted with the existing specification.
+ *
+ * The async variant is
+ * {@see ContactCenterInsightsClient::initializeEncryptionSpecAsync()} .
+ *
+ * @example samples/V1/ContactCenterInsightsClient/initialize_encryption_spec.php
+ *
+ * @param InitializeEncryptionSpecRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function initializeEncryptionSpec(
+ InitializeEncryptionSpecRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
+ return $this->startApiCall('InitializeEncryptionSpec', $request, $callOptions)->wait();
+ }
+
/**
* Lists analyses.
*
@@ -1618,8 +1761,8 @@ public function updateView(UpdateViewRequest $request, array $callOptions = []):
}
/**
- * Create a longrunning conversation upload operation. This method differs
- * from CreateConversation by allowing audio transcription and optional DLP
+ * Create a long-running conversation upload operation. This method differs
+ * from `CreateConversation` by allowing audio transcription and optional DLP
* redaction.
*
* The async variant is
diff --git a/ContactCenterInsights/src/V1/Conversation.php b/ContactCenterInsights/src/V1/Conversation.php
index 1de28cfd8c8d..be3e5078a267 100644
--- a/ContactCenterInsights/src/V1/Conversation.php
+++ b/ContactCenterInsights/src/V1/Conversation.php
@@ -73,6 +73,14 @@ class Conversation extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24;
*/
protected $quality_metadata = null;
+ /**
+ * Input only. JSON Metadata encoded as a string.
+ * This field is primarily used by Insights integrations with various telphony
+ * systems and must be in one of Insights' supported formats.
+ *
+ * Generated from protobuf field string metadata_json = 25 [(.google.api.field_behavior) = INPUT_ONLY];
+ */
+ protected $metadata_json = '';
/**
* Output only. The conversation transcript.
*
@@ -170,6 +178,10 @@ class Conversation extends \Google\Protobuf\Internal\Message
* conversation is allowed, with a maximum of 256 characters per entry.
* @type \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata $quality_metadata
* Conversation metadata related to quality management.
+ * @type string $metadata_json
+ * Input only. JSON Metadata encoded as a string.
+ * This field is primarily used by Insights integrations with various telphony
+ * systems and must be in one of Insights' supported formats.
* @type \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript $transcript
* Output only. The conversation transcript.
* @type int $medium
@@ -588,6 +600,36 @@ public function setQualityMetadata($var)
return $this;
}
+ /**
+ * Input only. JSON Metadata encoded as a string.
+ * This field is primarily used by Insights integrations with various telphony
+ * systems and must be in one of Insights' supported formats.
+ *
+ * Generated from protobuf field string metadata_json = 25 [(.google.api.field_behavior) = INPUT_ONLY];
+ * @return string
+ */
+ public function getMetadataJson()
+ {
+ return $this->metadata_json;
+ }
+
+ /**
+ * Input only. JSON Metadata encoded as a string.
+ * This field is primarily used by Insights integrations with various telphony
+ * systems and must be in one of Insights' supported formats.
+ *
+ * Generated from protobuf field string metadata_json = 25 [(.google.api.field_behavior) = INPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setMetadataJson($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->metadata_json = $var;
+
+ return $this;
+ }
+
/**
* Output only. The conversation transcript.
*
diff --git a/ContactCenterInsights/src/V1/ConversationLevelSilence.php b/ContactCenterInsights/src/V1/ConversationLevelSilence.php
new file mode 100644
index 000000000000..859ffc656498
--- /dev/null
+++ b/ContactCenterInsights/src/V1/ConversationLevelSilence.php
@@ -0,0 +1,111 @@
+google.cloud.contactcenterinsights.v1.ConversationLevelSilence
+ */
+class ConversationLevelSilence extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Amount of time calculated to be in silence.
+ *
+ * Generated from protobuf field .google.protobuf.Duration silence_duration = 1;
+ */
+ protected $silence_duration = null;
+ /**
+ * Percentage of the total conversation spent in silence.
+ *
+ * Generated from protobuf field float silence_percentage = 2;
+ */
+ protected $silence_percentage = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Duration $silence_duration
+ * Amount of time calculated to be in silence.
+ * @type float $silence_percentage
+ * Percentage of the total conversation spent in silence.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Amount of time calculated to be in silence.
+ *
+ * Generated from protobuf field .google.protobuf.Duration silence_duration = 1;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getSilenceDuration()
+ {
+ return $this->silence_duration;
+ }
+
+ public function hasSilenceDuration()
+ {
+ return isset($this->silence_duration);
+ }
+
+ public function clearSilenceDuration()
+ {
+ unset($this->silence_duration);
+ }
+
+ /**
+ * Amount of time calculated to be in silence.
+ *
+ * Generated from protobuf field .google.protobuf.Duration silence_duration = 1;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setSilenceDuration($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->silence_duration = $var;
+
+ return $this;
+ }
+
+ /**
+ * Percentage of the total conversation spent in silence.
+ *
+ * Generated from protobuf field float silence_percentage = 2;
+ * @return float
+ */
+ public function getSilencePercentage()
+ {
+ return $this->silence_percentage;
+ }
+
+ /**
+ * Percentage of the total conversation spent in silence.
+ *
+ * Generated from protobuf field float silence_percentage = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setSilencePercentage($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->silence_percentage = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/EncryptionSpec.php b/ContactCenterInsights/src/V1/EncryptionSpec.php
new file mode 100644
index 000000000000..d3efccef926d
--- /dev/null
+++ b/ContactCenterInsights/src/V1/EncryptionSpec.php
@@ -0,0 +1,126 @@
+google.cloud.contactcenterinsights.v1.EncryptionSpec
+ */
+class EncryptionSpec extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Immutable. The resource name of the encryption key specification resource.
+ * Format:
+ * projects/{project}/locations/{location}/encryptionSpec
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ */
+ protected $name = '';
+ /**
+ * Required. The name of customer-managed encryption key that is used to
+ * secure a resource and its sub-resources. If empty, the resource is secured
+ * by the default Google encryption key. Only the key in the same location as
+ * this resource is allowed to be used for encryption. Format:
+ * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}`
+ *
+ * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $kms_key = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Immutable. The resource name of the encryption key specification resource.
+ * Format:
+ * projects/{project}/locations/{location}/encryptionSpec
+ * @type string $kms_key
+ * Required. The name of customer-managed encryption key that is used to
+ * secure a resource and its sub-resources. If empty, the resource is secured
+ * by the default Google encryption key. Only the key in the same location as
+ * this resource is allowed to be used for encryption. Format:
+ * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Immutable. The resource name of the encryption key specification resource.
+ * Format:
+ * projects/{project}/locations/{location}/encryptionSpec
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Immutable. The resource name of the encryption key specification resource.
+ * Format:
+ * projects/{project}/locations/{location}/encryptionSpec
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The name of customer-managed encryption key that is used to
+ * secure a resource and its sub-resources. If empty, the resource is secured
+ * by the default Google encryption key. Only the key in the same location as
+ * this resource is allowed to be used for encryption. Format:
+ * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}`
+ *
+ * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getKmsKey()
+ {
+ return $this->kms_key;
+ }
+
+ /**
+ * Required. The name of customer-managed encryption key that is used to
+ * secure a resource and its sub-resources. If empty, the resource is secured
+ * by the default Google encryption key. Only the key in the same location as
+ * this resource is allowed to be used for encryption. Format:
+ * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}`
+ *
+ * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setKmsKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->kms_key = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/ExportIssueModelMetadata.php b/ContactCenterInsights/src/V1/ExportIssueModelMetadata.php
new file mode 100644
index 000000000000..7a6e77bd3038
--- /dev/null
+++ b/ContactCenterInsights/src/V1/ExportIssueModelMetadata.php
@@ -0,0 +1,165 @@
+google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata
+ */
+class ExportIssueModelMetadata extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The time the operation was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
+ */
+ protected $create_time = null;
+ /**
+ * The time the operation finished running.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
+ */
+ protected $end_time = null;
+ /**
+ * The original export request.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportIssueModelRequest request = 3;
+ */
+ protected $request = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Timestamp $create_time
+ * The time the operation was created.
+ * @type \Google\Protobuf\Timestamp $end_time
+ * The time the operation finished running.
+ * @type \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest $request
+ * The original export request.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The time the operation was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * The time the operation was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * The time the operation finished running.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getEndTime()
+ {
+ return $this->end_time;
+ }
+
+ public function hasEndTime()
+ {
+ return isset($this->end_time);
+ }
+
+ public function clearEndTime()
+ {
+ unset($this->end_time);
+ }
+
+ /**
+ * The time the operation finished running.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setEndTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->end_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * The original export request.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportIssueModelRequest request = 3;
+ * @return \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest|null
+ */
+ public function getRequest()
+ {
+ return $this->request;
+ }
+
+ public function hasRequest()
+ {
+ return isset($this->request);
+ }
+
+ public function clearRequest()
+ {
+ unset($this->request);
+ }
+
+ /**
+ * The original export request.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportIssueModelRequest request = 3;
+ * @param \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest $var
+ * @return $this
+ */
+ public function setRequest($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest::class);
+ $this->request = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/ExportIssueModelRequest.php b/ContactCenterInsights/src/V1/ExportIssueModelRequest.php
new file mode 100644
index 000000000000..5fc916d35604
--- /dev/null
+++ b/ContactCenterInsights/src/V1/ExportIssueModelRequest.php
@@ -0,0 +1,123 @@
+google.cloud.contactcenterinsights.v1.ExportIssueModelRequest
+ */
+class ExportIssueModelRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The issue model to export.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ protected $Destination;
+
+ /**
+ * @param string $name Required. The issue model to export. Please see
+ * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest\GcsDestination $gcs_destination
+ * Google Cloud Storage URI to export the issue model to.
+ * @type string $name
+ * Required. The issue model to export.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Google Cloud Storage URI to export the issue model to.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination gcs_destination = 2;
+ * @return \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest\GcsDestination|null
+ */
+ public function getGcsDestination()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasGcsDestination()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Google Cloud Storage URI to export the issue model to.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination gcs_destination = 2;
+ * @param \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest\GcsDestination $var
+ * @return $this
+ */
+ public function setGcsDestination($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest\GcsDestination::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Required. The issue model to export.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. The issue model to export.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getDestination()
+ {
+ return $this->whichOneof("Destination");
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/ExportIssueModelRequest/GcsDestination.php b/ContactCenterInsights/src/V1/ExportIssueModelRequest/GcsDestination.php
new file mode 100644
index 000000000000..780157daa136
--- /dev/null
+++ b/ContactCenterInsights/src/V1/ExportIssueModelRequest/GcsDestination.php
@@ -0,0 +1,68 @@
+google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination
+ */
+class GcsDestination extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Format: `gs:///`
+ *
+ * Generated from protobuf field string object_uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $object_uri = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $object_uri
+ * Required. Format: `gs:///`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Format: `gs:///`
+ *
+ * Generated from protobuf field string object_uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getObjectUri()
+ {
+ return $this->object_uri;
+ }
+
+ /**
+ * Required. Format: `gs:///`
+ *
+ * Generated from protobuf field string object_uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setObjectUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->object_uri = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/ContactCenterInsights/src/V1/ExportIssueModelResponse.php b/ContactCenterInsights/src/V1/ExportIssueModelResponse.php
new file mode 100644
index 000000000000..cb2c757dea28
--- /dev/null
+++ b/ContactCenterInsights/src/V1/ExportIssueModelResponse.php
@@ -0,0 +1,33 @@
+google.cloud.contactcenterinsights.v1.ExportIssueModelResponse
+ */
+class ExportIssueModelResponse extends \Google\Protobuf\Internal\Message
+{
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/GetEncryptionSpecRequest.php b/ContactCenterInsights/src/V1/GetEncryptionSpecRequest.php
new file mode 100644
index 000000000000..c0076eb9be97
--- /dev/null
+++ b/ContactCenterInsights/src/V1/GetEncryptionSpecRequest.php
@@ -0,0 +1,81 @@
+google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest
+ */
+class GetEncryptionSpecRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the encryption spec resource to get.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+
+ /**
+ * @param string $name Required. The name of the encryption spec resource to get. Please see
+ * {@see ContactCenterInsightsClient::encryptionSpecName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\ContactCenterInsights\V1\GetEncryptionSpecRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The name of the encryption spec resource to get.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the encryption spec resource to get.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. The name of the encryption spec resource to get.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/ImportIssueModelMetadata.php b/ContactCenterInsights/src/V1/ImportIssueModelMetadata.php
new file mode 100644
index 000000000000..ed2259957dce
--- /dev/null
+++ b/ContactCenterInsights/src/V1/ImportIssueModelMetadata.php
@@ -0,0 +1,165 @@
+google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata
+ */
+class ImportIssueModelMetadata extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The time the operation was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
+ */
+ protected $create_time = null;
+ /**
+ * The time the operation finished running.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
+ */
+ protected $end_time = null;
+ /**
+ * The original import request.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ImportIssueModelRequest request = 3;
+ */
+ protected $request = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Timestamp $create_time
+ * The time the operation was created.
+ * @type \Google\Protobuf\Timestamp $end_time
+ * The time the operation finished running.
+ * @type \Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest $request
+ * The original import request.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The time the operation was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * The time the operation was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * The time the operation finished running.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getEndTime()
+ {
+ return $this->end_time;
+ }
+
+ public function hasEndTime()
+ {
+ return isset($this->end_time);
+ }
+
+ public function clearEndTime()
+ {
+ unset($this->end_time);
+ }
+
+ /**
+ * The time the operation finished running.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setEndTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->end_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * The original import request.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ImportIssueModelRequest request = 3;
+ * @return \Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest|null
+ */
+ public function getRequest()
+ {
+ return $this->request;
+ }
+
+ public function hasRequest()
+ {
+ return isset($this->request);
+ }
+
+ public function clearRequest()
+ {
+ unset($this->request);
+ }
+
+ /**
+ * The original import request.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ImportIssueModelRequest request = 3;
+ * @param \Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest $var
+ * @return $this
+ */
+ public function setRequest($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest::class);
+ $this->request = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/ImportIssueModelRequest.php b/ContactCenterInsights/src/V1/ImportIssueModelRequest.php
new file mode 100644
index 000000000000..871dd620e2c9
--- /dev/null
+++ b/ContactCenterInsights/src/V1/ImportIssueModelRequest.php
@@ -0,0 +1,165 @@
+google.cloud.contactcenterinsights.v1.ImportIssueModelRequest
+ */
+class ImportIssueModelRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent resource of the issue model.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. If set to true, will create an issue model from the imported file
+ * with randomly generated IDs for the issue model and corresponding issues.
+ * Otherwise, replaces an existing model with the same ID as the file.
+ *
+ * Generated from protobuf field bool create_new_model = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $create_new_model = false;
+ protected $Source;
+
+ /**
+ * @param string $parent Required. The parent resource of the issue model. Please see
+ * {@see ContactCenterInsightsClient::locationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent): self
+ {
+ return (new self())
+ ->setParent($parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest\GcsSource $gcs_source
+ * Google Cloud Storage source message.
+ * @type string $parent
+ * Required. The parent resource of the issue model.
+ * @type bool $create_new_model
+ * Optional. If set to true, will create an issue model from the imported file
+ * with randomly generated IDs for the issue model and corresponding issues.
+ * Otherwise, replaces an existing model with the same ID as the file.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Google Cloud Storage source message.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource gcs_source = 2;
+ * @return \Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest\GcsSource|null
+ */
+ public function getGcsSource()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasGcsSource()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Google Cloud Storage source message.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource gcs_source = 2;
+ * @param \Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest\GcsSource $var
+ * @return $this
+ */
+ public function setGcsSource($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest\GcsSource::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Required. The parent resource of the issue model.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. The parent resource of the issue model.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, will create an issue model from the imported file
+ * with randomly generated IDs for the issue model and corresponding issues.
+ * Otherwise, replaces an existing model with the same ID as the file.
+ *
+ * Generated from protobuf field bool create_new_model = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getCreateNewModel()
+ {
+ return $this->create_new_model;
+ }
+
+ /**
+ * Optional. If set to true, will create an issue model from the imported file
+ * with randomly generated IDs for the issue model and corresponding issues.
+ * Otherwise, replaces an existing model with the same ID as the file.
+ *
+ * Generated from protobuf field bool create_new_model = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setCreateNewModel($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->create_new_model = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getSource()
+ {
+ return $this->whichOneof("Source");
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/ImportIssueModelRequest/GcsSource.php b/ContactCenterInsights/src/V1/ImportIssueModelRequest/GcsSource.php
new file mode 100644
index 000000000000..3080f8b29f24
--- /dev/null
+++ b/ContactCenterInsights/src/V1/ImportIssueModelRequest/GcsSource.php
@@ -0,0 +1,68 @@
+google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource
+ */
+class GcsSource extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Format: `gs:///`
+ *
+ * Generated from protobuf field string object_uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $object_uri = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $object_uri
+ * Required. Format: `gs:///`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Format: `gs:///`
+ *
+ * Generated from protobuf field string object_uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getObjectUri()
+ {
+ return $this->object_uri;
+ }
+
+ /**
+ * Required. Format: `gs:///`
+ *
+ * Generated from protobuf field string object_uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setObjectUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->object_uri = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/ContactCenterInsights/src/V1/ImportIssueModelResponse.php b/ContactCenterInsights/src/V1/ImportIssueModelResponse.php
new file mode 100644
index 000000000000..0bd1db15abb5
--- /dev/null
+++ b/ContactCenterInsights/src/V1/ImportIssueModelResponse.php
@@ -0,0 +1,33 @@
+google.cloud.contactcenterinsights.v1.ImportIssueModelResponse
+ */
+class ImportIssueModelResponse extends \Google\Protobuf\Internal\Message
+{
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/IngestConversationsRequest.php b/ContactCenterInsights/src/V1/IngestConversationsRequest.php
index 96c359e2ee87..435d372507c8 100644
--- a/ContactCenterInsights/src/V1/IngestConversationsRequest.php
+++ b/ContactCenterInsights/src/V1/IngestConversationsRequest.php
@@ -41,6 +41,15 @@ class IngestConversationsRequest extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $speech_config = null;
+ /**
+ * Optional. If set, this fields indicates the number of objects to ingest
+ * from the Cloud Storage bucket. If empty, the entire bucket will be
+ * ingested. Unless they are first deleted, conversations produced through
+ * sampling won't be ingested by subsequent ingest requests.
+ *
+ * Generated from protobuf field optional int32 sample_size = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $sample_size = null;
protected $source;
protected $object_config;
@@ -79,6 +88,11 @@ public static function build(string $parent): self
* @type \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $speech_config
* Optional. Default Speech-to-Text configuration. Optional, will default to
* the config specified in Settings.
+ * @type int $sample_size
+ * Optional. If set, this fields indicates the number of objects to ingest
+ * from the Cloud Storage bucket. If empty, the entire bucket will be
+ * ingested. Unless they are first deleted, conversations produced through
+ * sampling won't be ingested by subsequent ingest requests.
* }
*/
public function __construct($data = NULL) {
@@ -288,6 +302,48 @@ public function setSpeechConfig($var)
return $this;
}
+ /**
+ * Optional. If set, this fields indicates the number of objects to ingest
+ * from the Cloud Storage bucket. If empty, the entire bucket will be
+ * ingested. Unless they are first deleted, conversations produced through
+ * sampling won't be ingested by subsequent ingest requests.
+ *
+ * Generated from protobuf field optional int32 sample_size = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getSampleSize()
+ {
+ return isset($this->sample_size) ? $this->sample_size : 0;
+ }
+
+ public function hasSampleSize()
+ {
+ return isset($this->sample_size);
+ }
+
+ public function clearSampleSize()
+ {
+ unset($this->sample_size);
+ }
+
+ /**
+ * Optional. If set, this fields indicates the number of objects to ingest
+ * from the Cloud Storage bucket. If empty, the entire bucket will be
+ * ingested. Unless they are first deleted, conversations produced through
+ * sampling won't be ingested by subsequent ingest requests.
+ *
+ * Generated from protobuf field optional int32 sample_size = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setSampleSize($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->sample_size = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/ContactCenterInsights/src/V1/IngestConversationsRequest/ConversationConfig.php b/ContactCenterInsights/src/V1/IngestConversationsRequest/ConversationConfig.php
index d1fce0b70425..0c6d03321d54 100644
--- a/ContactCenterInsights/src/V1/IngestConversationsRequest/ConversationConfig.php
+++ b/ContactCenterInsights/src/V1/IngestConversationsRequest/ConversationConfig.php
@@ -16,10 +16,12 @@
class ConversationConfig extends \Google\Protobuf\Internal\Message
{
/**
- * An opaque, user-specified string representing the human agent who handled
- * the conversations.
+ * Optional. An opaque, user-specified string representing a human agent who
+ * handled all conversations in the import. Note that this will be
+ * overridden if per-conversation metadata is provided through the
+ * `metadata_bucket_uri`.
*
- * Generated from protobuf field string agent_id = 1;
+ * Generated from protobuf field string agent_id = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $agent_id = '';
/**
@@ -46,8 +48,10 @@ class ConversationConfig extends \Google\Protobuf\Internal\Message
* Optional. Data for populating the Message object.
*
* @type string $agent_id
- * An opaque, user-specified string representing the human agent who handled
- * the conversations.
+ * Optional. An opaque, user-specified string representing a human agent who
+ * handled all conversations in the import. Note that this will be
+ * overridden if per-conversation metadata is provided through the
+ * `metadata_bucket_uri`.
* @type int $agent_channel
* Optional. Indicates which of the channels, 1 or 2, contains the agent.
* Note that this must be set for conversations to be properly displayed and
@@ -64,10 +68,12 @@ public function __construct($data = NULL) {
}
/**
- * An opaque, user-specified string representing the human agent who handled
- * the conversations.
+ * Optional. An opaque, user-specified string representing a human agent who
+ * handled all conversations in the import. Note that this will be
+ * overridden if per-conversation metadata is provided through the
+ * `metadata_bucket_uri`.
*
- * Generated from protobuf field string agent_id = 1;
+ * Generated from protobuf field string agent_id = 1 [(.google.api.field_behavior) = OPTIONAL];
* @return string
*/
public function getAgentId()
@@ -76,10 +82,12 @@ public function getAgentId()
}
/**
- * An opaque, user-specified string representing the human agent who handled
- * the conversations.
+ * Optional. An opaque, user-specified string representing a human agent who
+ * handled all conversations in the import. Note that this will be
+ * overridden if per-conversation metadata is provided through the
+ * `metadata_bucket_uri`.
*
- * Generated from protobuf field string agent_id = 1;
+ * Generated from protobuf field string agent_id = 1 [(.google.api.field_behavior) = OPTIONAL];
* @param string $var
* @return $this
*/
diff --git a/ContactCenterInsights/src/V1/IngestConversationsRequest/GcsSource.php b/ContactCenterInsights/src/V1/IngestConversationsRequest/GcsSource.php
index ac6730cabde1..b09e2ad81e11 100644
--- a/ContactCenterInsights/src/V1/IngestConversationsRequest/GcsSource.php
+++ b/ContactCenterInsights/src/V1/IngestConversationsRequest/GcsSource.php
@@ -27,6 +27,27 @@ class GcsSource extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType bucket_object_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $bucket_object_type = 0;
+ /**
+ * Optional. The Cloud Storage path to the conversation metadata. Note that:
+ * [1] Metadata files are expected to be in JSON format.
+ * [2] Metadata and source files (transcripts or audio) must be in
+ * separate buckets.
+ * [3] A source file and its corresponding metadata file must share the same
+ * name to
+ * be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and
+ * `gs://bucket/metadata/conversation1.json`.
+ *
+ * Generated from protobuf field optional string metadata_bucket_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $metadata_bucket_uri = null;
+ /**
+ * Optional. Custom keys to extract as conversation labels from metadata
+ * files in `metadata_bucket_uri`. Keys not included in this field will be
+ * ignored. Note that there is a limit of 20 labels per conversation.
+ *
+ * Generated from protobuf field repeated string custom_metadata_keys = 12 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $custom_metadata_keys;
/**
* Constructor.
@@ -38,6 +59,19 @@ class GcsSource extends \Google\Protobuf\Internal\Message
* Required. The Cloud Storage bucket containing source objects.
* @type int $bucket_object_type
* Optional. Specifies the type of the objects in `bucket_uri`.
+ * @type string $metadata_bucket_uri
+ * Optional. The Cloud Storage path to the conversation metadata. Note that:
+ * [1] Metadata files are expected to be in JSON format.
+ * [2] Metadata and source files (transcripts or audio) must be in
+ * separate buckets.
+ * [3] A source file and its corresponding metadata file must share the same
+ * name to
+ * be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and
+ * `gs://bucket/metadata/conversation1.json`.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $custom_metadata_keys
+ * Optional. Custom keys to extract as conversation labels from metadata
+ * files in `metadata_bucket_uri`. Keys not included in this field will be
+ * ignored. Note that there is a limit of 20 labels per conversation.
* }
*/
public function __construct($data = NULL) {
@@ -97,6 +131,86 @@ public function setBucketObjectType($var)
return $this;
}
+ /**
+ * Optional. The Cloud Storage path to the conversation metadata. Note that:
+ * [1] Metadata files are expected to be in JSON format.
+ * [2] Metadata and source files (transcripts or audio) must be in
+ * separate buckets.
+ * [3] A source file and its corresponding metadata file must share the same
+ * name to
+ * be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and
+ * `gs://bucket/metadata/conversation1.json`.
+ *
+ * Generated from protobuf field optional string metadata_bucket_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getMetadataBucketUri()
+ {
+ return isset($this->metadata_bucket_uri) ? $this->metadata_bucket_uri : '';
+ }
+
+ public function hasMetadataBucketUri()
+ {
+ return isset($this->metadata_bucket_uri);
+ }
+
+ public function clearMetadataBucketUri()
+ {
+ unset($this->metadata_bucket_uri);
+ }
+
+ /**
+ * Optional. The Cloud Storage path to the conversation metadata. Note that:
+ * [1] Metadata files are expected to be in JSON format.
+ * [2] Metadata and source files (transcripts or audio) must be in
+ * separate buckets.
+ * [3] A source file and its corresponding metadata file must share the same
+ * name to
+ * be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and
+ * `gs://bucket/metadata/conversation1.json`.
+ *
+ * Generated from protobuf field optional string metadata_bucket_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setMetadataBucketUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->metadata_bucket_uri = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Custom keys to extract as conversation labels from metadata
+ * files in `metadata_bucket_uri`. Keys not included in this field will be
+ * ignored. Note that there is a limit of 20 labels per conversation.
+ *
+ * Generated from protobuf field repeated string custom_metadata_keys = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getCustomMetadataKeys()
+ {
+ return $this->custom_metadata_keys;
+ }
+
+ /**
+ * Optional. Custom keys to extract as conversation labels from metadata
+ * files in `metadata_bucket_uri`. Keys not included in this field will be
+ * ignored. Note that there is a limit of 20 labels per conversation.
+ *
+ * Generated from protobuf field repeated string custom_metadata_keys = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setCustomMetadataKeys($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->custom_metadata_keys = $arr;
+
+ return $this;
+ }
+
}
diff --git a/ContactCenterInsights/src/V1/InitializeEncryptionSpecMetadata.php b/ContactCenterInsights/src/V1/InitializeEncryptionSpecMetadata.php
new file mode 100644
index 000000000000..c0baf71e1a3d
--- /dev/null
+++ b/ContactCenterInsights/src/V1/InitializeEncryptionSpecMetadata.php
@@ -0,0 +1,203 @@
+google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata
+ */
+class InitializeEncryptionSpecMetadata extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. The time the operation was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The time the operation finished running.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $end_time = null;
+ /**
+ * Output only. The original request for initialization.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $request = null;
+ /**
+ * Partial errors during initialising operation that might cause the operation
+ * output to be incomplete.
+ *
+ * Generated from protobuf field repeated .google.rpc.Status partial_errors = 4;
+ */
+ private $partial_errors;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The time the operation was created.
+ * @type \Google\Protobuf\Timestamp $end_time
+ * Output only. The time the operation finished running.
+ * @type \Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecRequest $request
+ * Output only. The original request for initialization.
+ * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors
+ * Partial errors during initialising operation that might cause the operation
+ * output to be incomplete.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. The time the operation was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The time the operation was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time the operation finished running.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getEndTime()
+ {
+ return $this->end_time;
+ }
+
+ public function hasEndTime()
+ {
+ return isset($this->end_time);
+ }
+
+ public function clearEndTime()
+ {
+ unset($this->end_time);
+ }
+
+ /**
+ * Output only. The time the operation finished running.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setEndTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->end_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The original request for initialization.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecRequest|null
+ */
+ public function getRequest()
+ {
+ return $this->request;
+ }
+
+ public function hasRequest()
+ {
+ return isset($this->request);
+ }
+
+ public function clearRequest()
+ {
+ unset($this->request);
+ }
+
+ /**
+ * Output only. The original request for initialization.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecRequest $var
+ * @return $this
+ */
+ public function setRequest($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecRequest::class);
+ $this->request = $var;
+
+ return $this;
+ }
+
+ /**
+ * Partial errors during initialising operation that might cause the operation
+ * output to be incomplete.
+ *
+ * Generated from protobuf field repeated .google.rpc.Status partial_errors = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPartialErrors()
+ {
+ return $this->partial_errors;
+ }
+
+ /**
+ * Partial errors during initialising operation that might cause the operation
+ * output to be incomplete.
+ *
+ * Generated from protobuf field repeated .google.rpc.Status partial_errors = 4;
+ * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPartialErrors($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class);
+ $this->partial_errors = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/InitializeEncryptionSpecRequest.php b/ContactCenterInsights/src/V1/InitializeEncryptionSpecRequest.php
new file mode 100644
index 000000000000..a140e2788c3e
--- /dev/null
+++ b/ContactCenterInsights/src/V1/InitializeEncryptionSpecRequest.php
@@ -0,0 +1,105 @@
+google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest
+ */
+class InitializeEncryptionSpecRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The encryption spec used for CMEK encryption. It is required that
+ * the kms key is in the same region as the endpoint. The same key will be
+ * used for all provisioned resources, if encryption is available. If the
+ * kms_key_name is left empty, no encryption will be enforced.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EncryptionSpec encryption_spec = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $encryption_spec = null;
+
+ /**
+ * @param \Google\Cloud\ContactCenterInsights\V1\EncryptionSpec $encryptionSpec Required. The encryption spec used for CMEK encryption. It is required that
+ * the kms key is in the same region as the endpoint. The same key will be
+ * used for all provisioned resources, if encryption is available. If the
+ * kms_key_name is left empty, no encryption will be enforced.
+ *
+ * @return \Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecRequest
+ *
+ * @experimental
+ */
+ public static function build(\Google\Cloud\ContactCenterInsights\V1\EncryptionSpec $encryptionSpec): self
+ {
+ return (new self())
+ ->setEncryptionSpec($encryptionSpec);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\ContactCenterInsights\V1\EncryptionSpec $encryption_spec
+ * Required. The encryption spec used for CMEK encryption. It is required that
+ * the kms key is in the same region as the endpoint. The same key will be
+ * used for all provisioned resources, if encryption is available. If the
+ * kms_key_name is left empty, no encryption will be enforced.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The encryption spec used for CMEK encryption. It is required that
+ * the kms key is in the same region as the endpoint. The same key will be
+ * used for all provisioned resources, if encryption is available. If the
+ * kms_key_name is left empty, no encryption will be enforced.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EncryptionSpec encryption_spec = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\ContactCenterInsights\V1\EncryptionSpec|null
+ */
+ public function getEncryptionSpec()
+ {
+ return $this->encryption_spec;
+ }
+
+ public function hasEncryptionSpec()
+ {
+ return isset($this->encryption_spec);
+ }
+
+ public function clearEncryptionSpec()
+ {
+ unset($this->encryption_spec);
+ }
+
+ /**
+ * Required. The encryption spec used for CMEK encryption. It is required that
+ * the kms key is in the same region as the endpoint. The same key will be
+ * used for all provisioned resources, if encryption is available. If the
+ * kms_key_name is left empty, no encryption will be enforced.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EncryptionSpec encryption_spec = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\ContactCenterInsights\V1\EncryptionSpec $var
+ * @return $this
+ */
+ public function setEncryptionSpec($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\EncryptionSpec::class);
+ $this->encryption_spec = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/InitializeEncryptionSpecResponse.php b/ContactCenterInsights/src/V1/InitializeEncryptionSpecResponse.php
new file mode 100644
index 000000000000..a56abe51d282
--- /dev/null
+++ b/ContactCenterInsights/src/V1/InitializeEncryptionSpecResponse.php
@@ -0,0 +1,33 @@
+google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse
+ */
+class InitializeEncryptionSpecResponse extends \Google\Protobuf\Internal\Message
+{
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
+ parent::__construct($data);
+ }
+
+}
+
diff --git a/ContactCenterInsights/src/V1/Issue.php b/ContactCenterInsights/src/V1/Issue.php
index 7c46c7d9df38..710d57742358 100644
--- a/ContactCenterInsights/src/V1/Issue.php
+++ b/ContactCenterInsights/src/V1/Issue.php
@@ -48,6 +48,12 @@ class Issue extends \Google\Protobuf\Internal\Message
* Generated from protobuf field repeated string sample_utterances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
private $sample_utterances;
+ /**
+ * Representative description of the issue.
+ *
+ * Generated from protobuf field string display_description = 14;
+ */
+ protected $display_description = '';
/**
* Constructor.
@@ -68,6 +74,8 @@ class Issue extends \Google\Protobuf\Internal\Message
* @type array|\Google\Protobuf\Internal\RepeatedField $sample_utterances
* Output only. Resource names of the sample representative utterances that
* match to this issue.
+ * @type string $display_description
+ * Representative description of the issue.
* }
*/
public function __construct($data = NULL) {
@@ -231,5 +239,31 @@ public function setSampleUtterances($var)
return $this;
}
+ /**
+ * Representative description of the issue.
+ *
+ * Generated from protobuf field string display_description = 14;
+ * @return string
+ */
+ public function getDisplayDescription()
+ {
+ return $this->display_description;
+ }
+
+ /**
+ * Representative description of the issue.
+ *
+ * Generated from protobuf field string display_description = 14;
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_description = $var;
+
+ return $this;
+ }
+
}
diff --git a/ContactCenterInsights/src/V1/ListConversationsRequest.php b/ContactCenterInsights/src/V1/ListConversationsRequest.php
index cfe31fa3fb41..42dfc06a5ec7 100644
--- a/ContactCenterInsights/src/V1/ListConversationsRequest.php
+++ b/ContactCenterInsights/src/V1/ListConversationsRequest.php
@@ -23,7 +23,7 @@ class ListConversationsRequest extends \Google\Protobuf\Internal\Message
protected $parent = '';
/**
* The maximum number of conversations to return in the response. A valid page
- * size ranges from 0 to 1,000 inclusive. If the page size is zero or
+ * size ranges from 0 to 100,000 inclusive. If the page size is zero or
* unspecified, a default page size of 100 will be chosen. Note that a call
* might return fewer results than the requested page size.
*
@@ -45,6 +45,24 @@ class ListConversationsRequest extends \Google\Protobuf\Internal\Message
* Generated from protobuf field string filter = 4;
*/
protected $filter = '';
+ /**
+ * Optional. The attribute by which to order conversations in the response.
+ * If empty, conversations will be ordered by descending creation time.
+ * Supported values are one of the following:
+ * * create_time
+ * * customer_satisfaction_rating
+ * * duration
+ * * latest_analysis
+ * * start_time
+ * * turn_count
+ * The default sort order is ascending. To specify order, append `asc` or
+ * `desc` (`create_time desc`).
+ * For more details, see [Google AIPs
+ * Ordering](https://google.aip.dev/132#ordering).
+ *
+ * Generated from protobuf field string order_by = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
/**
* The level of details of the conversation. Default is `BASIC`.
*
@@ -76,7 +94,7 @@ public static function build(string $parent): self
* Required. The parent resource of the conversation.
* @type int $page_size
* The maximum number of conversations to return in the response. A valid page
- * size ranges from 0 to 1,000 inclusive. If the page size is zero or
+ * size ranges from 0 to 100,000 inclusive. If the page size is zero or
* unspecified, a default page size of 100 will be chosen. Note that a call
* might return fewer results than the requested page size.
* @type string $page_token
@@ -86,6 +104,20 @@ public static function build(string $parent): self
* @type string $filter
* A filter to reduce results to a specific subset. Useful for querying
* conversations with specific properties.
+ * @type string $order_by
+ * Optional. The attribute by which to order conversations in the response.
+ * If empty, conversations will be ordered by descending creation time.
+ * Supported values are one of the following:
+ * * create_time
+ * * customer_satisfaction_rating
+ * * duration
+ * * latest_analysis
+ * * start_time
+ * * turn_count
+ * The default sort order is ascending. To specify order, append `asc` or
+ * `desc` (`create_time desc`).
+ * For more details, see [Google AIPs
+ * Ordering](https://google.aip.dev/132#ordering).
* @type int $view
* The level of details of the conversation. Default is `BASIC`.
* }
@@ -123,7 +155,7 @@ public function setParent($var)
/**
* The maximum number of conversations to return in the response. A valid page
- * size ranges from 0 to 1,000 inclusive. If the page size is zero or
+ * size ranges from 0 to 100,000 inclusive. If the page size is zero or
* unspecified, a default page size of 100 will be chosen. Note that a call
* might return fewer results than the requested page size.
*
@@ -137,7 +169,7 @@ public function getPageSize()
/**
* The maximum number of conversations to return in the response. A valid page
- * size ranges from 0 to 1,000 inclusive. If the page size is zero or
+ * size ranges from 0 to 100,000 inclusive. If the page size is zero or
* unspecified, a default page size of 100 will be chosen. Note that a call
* might return fewer results than the requested page size.
*
@@ -211,6 +243,56 @@ public function setFilter($var)
return $this;
}
+ /**
+ * Optional. The attribute by which to order conversations in the response.
+ * If empty, conversations will be ordered by descending creation time.
+ * Supported values are one of the following:
+ * * create_time
+ * * customer_satisfaction_rating
+ * * duration
+ * * latest_analysis
+ * * start_time
+ * * turn_count
+ * The default sort order is ascending. To specify order, append `asc` or
+ * `desc` (`create_time desc`).
+ * For more details, see [Google AIPs
+ * Ordering](https://google.aip.dev/132#ordering).
+ *
+ * Generated from protobuf field string order_by = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. The attribute by which to order conversations in the response.
+ * If empty, conversations will be ordered by descending creation time.
+ * Supported values are one of the following:
+ * * create_time
+ * * customer_satisfaction_rating
+ * * duration
+ * * latest_analysis
+ * * start_time
+ * * turn_count
+ * The default sort order is ascending. To specify order, append `asc` or
+ * `desc` (`create_time desc`).
+ * For more details, see [Google AIPs
+ * Ordering](https://google.aip.dev/132#ordering).
+ *
+ * Generated from protobuf field string order_by = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
/**
* The level of details of the conversation. Default is `BASIC`.
*
diff --git a/ContactCenterInsights/src/V1/RedactionConfig.php b/ContactCenterInsights/src/V1/RedactionConfig.php
index ebcf981ef8e4..293547129dc3 100644
--- a/ContactCenterInsights/src/V1/RedactionConfig.php
+++ b/ContactCenterInsights/src/V1/RedactionConfig.php
@@ -10,6 +10,12 @@
/**
* DLP resources used for redaction while ingesting conversations.
+ * DLP settings are applied to conversations ingested from the
+ * `UploadConversation` and `IngestConversations` endpoints, including
+ * conversation coming from CCAI Platform. They are not applied to conversations
+ * ingested from the `CreateConversation` endpoint or the Dialogflow / Agent
+ * Assist runtime integrations. When using Dialogflow / Agent Assist runtime
+ * integrations, redaction should be performed in Dialogflow / Agent Assist.
*
* Generated from protobuf message google.cloud.contactcenterinsights.v1.RedactionConfig
*/
diff --git a/ContactCenterInsights/src/V1/RuntimeAnnotation.php b/ContactCenterInsights/src/V1/RuntimeAnnotation.php
index 6d27085452d2..4c7f365eabe0 100644
--- a/ContactCenterInsights/src/V1/RuntimeAnnotation.php
+++ b/ContactCenterInsights/src/V1/RuntimeAnnotation.php
@@ -47,6 +47,12 @@ class RuntimeAnnotation extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback answer_feedback = 5;
*/
protected $answer_feedback = null;
+ /**
+ * Explicit input used for generating the answer
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput user_input = 16;
+ */
+ protected $user_input = null;
protected $data;
/**
@@ -79,6 +85,8 @@ class RuntimeAnnotation extends \Google\Protobuf\Internal\Message
* The boundary in the conversation where the annotation ends, inclusive.
* @type \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback $answer_feedback
* The feedback that the customer has about the answer in `data`.
+ * @type \Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation\UserInput $user_input
+ * Explicit input used for generating the answer
* }
*/
public function __construct($data = NULL) {
@@ -446,6 +454,42 @@ public function setAnswerFeedback($var)
return $this;
}
+ /**
+ * Explicit input used for generating the answer
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput user_input = 16;
+ * @return \Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation\UserInput|null
+ */
+ public function getUserInput()
+ {
+ return $this->user_input;
+ }
+
+ public function hasUserInput()
+ {
+ return isset($this->user_input);
+ }
+
+ public function clearUserInput()
+ {
+ unset($this->user_input);
+ }
+
+ /**
+ * Explicit input used for generating the answer
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput user_input = 16;
+ * @param \Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation\UserInput $var
+ * @return $this
+ */
+ public function setUserInput($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation\UserInput::class);
+ $this->user_input = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/ContactCenterInsights/src/V1/RuntimeAnnotation/UserInput.php b/ContactCenterInsights/src/V1/RuntimeAnnotation/UserInput.php
new file mode 100644
index 000000000000..276d80d14d1a
--- /dev/null
+++ b/ContactCenterInsights/src/V1/RuntimeAnnotation/UserInput.php
@@ -0,0 +1,144 @@
+google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput
+ */
+class UserInput extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Query text. Article Search uses this to store the input query used
+ * to generate the search results.
+ *
+ * Generated from protobuf field string query = 1;
+ */
+ protected $query = '';
+ /**
+ * The resource name of associated generator. Format:
+ * `projects//locations//generators/`
+ *
+ * Generated from protobuf field string generator_name = 2;
+ */
+ protected $generator_name = '';
+ /**
+ * Query source for the answer.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource query_source = 3;
+ */
+ protected $query_source = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $query
+ * Query text. Article Search uses this to store the input query used
+ * to generate the search results.
+ * @type string $generator_name
+ * The resource name of associated generator. Format:
+ * `projects//locations//generators/`
+ * @type int $query_source
+ * Query source for the answer.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Query text. Article Search uses this to store the input query used
+ * to generate the search results.
+ *
+ * Generated from protobuf field string query = 1;
+ * @return string
+ */
+ public function getQuery()
+ {
+ return $this->query;
+ }
+
+ /**
+ * Query text. Article Search uses this to store the input query used
+ * to generate the search results.
+ *
+ * Generated from protobuf field string query = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setQuery($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->query = $var;
+
+ return $this;
+ }
+
+ /**
+ * The resource name of associated generator. Format:
+ * `projects//locations//generators/`
+ *
+ * Generated from protobuf field string generator_name = 2;
+ * @return string
+ */
+ public function getGeneratorName()
+ {
+ return $this->generator_name;
+ }
+
+ /**
+ * The resource name of associated generator. Format:
+ * `projects//locations//generators/`
+ *
+ * Generated from protobuf field string generator_name = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setGeneratorName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->generator_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Query source for the answer.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource query_source = 3;
+ * @return int
+ */
+ public function getQuerySource()
+ {
+ return $this->query_source;
+ }
+
+ /**
+ * Query source for the answer.
+ *
+ * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource query_source = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setQuerySource($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation\UserInput\QuerySource::class);
+ $this->query_source = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/ContactCenterInsights/src/V1/RuntimeAnnotation/UserInput/QuerySource.php b/ContactCenterInsights/src/V1/RuntimeAnnotation/UserInput/QuerySource.php
new file mode 100644
index 000000000000..5edc374d4137
--- /dev/null
+++ b/ContactCenterInsights/src/V1/RuntimeAnnotation/UserInput/QuerySource.php
@@ -0,0 +1,63 @@
+google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource
+ */
+class QuerySource
+{
+ /**
+ * Unknown query source.
+ *
+ * Generated from protobuf enum QUERY_SOURCE_UNSPECIFIED = 0;
+ */
+ const QUERY_SOURCE_UNSPECIFIED = 0;
+ /**
+ * The query is from agents.
+ *
+ * Generated from protobuf enum AGENT_QUERY = 1;
+ */
+ const AGENT_QUERY = 1;
+ /**
+ * The query is a query from previous suggestions, e.g. from a preceding
+ * SuggestKnowledgeAssist response.
+ *
+ * Generated from protobuf enum SUGGESTED_QUERY = 2;
+ */
+ const SUGGESTED_QUERY = 2;
+
+ private static $valueToName = [
+ self::QUERY_SOURCE_UNSPECIFIED => 'QUERY_SOURCE_UNSPECIFIED',
+ self::AGENT_QUERY => 'AGENT_QUERY',
+ self::SUGGESTED_QUERY => 'SUGGESTED_QUERY',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/ContactCenterInsights/src/V1/Settings.php b/ContactCenterInsights/src/V1/Settings.php
index 4c92a6b67f20..a728e5d6bc4f 100644
--- a/ContactCenterInsights/src/V1/Settings.php
+++ b/ContactCenterInsights/src/V1/Settings.php
@@ -9,7 +9,12 @@
use Google\Protobuf\Internal\GPBUtil;
/**
- * The settings resource.
+ * The CCAI Insights project wide settings.
+ * Use these settings to configure the behavior of Insights.
+ * View these settings with
+ * [`getsettings`](https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations/getSettings)
+ * and change the settings with
+ * [`updateSettings`](https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations/updateSettings).
*
* Generated from protobuf message google.cloud.contactcenterinsights.v1.Settings
*/
@@ -61,8 +66,11 @@ class Settings extends \Google\Protobuf\Internal\Message
* * "create-analysis": Notify each time an analysis is created.
* * "create-conversation": Notify each time a conversation is created.
* * "export-insights-data": Notify each time an export is complete.
+ * * "ingest-conversations": Notify each time an IngestConversations LRO is
+ * complete.
* * "update-conversation": Notify each time a conversation is updated via
* UpdateConversation.
+ * * "upload-conversation": Notify when an UploadConversation LRO is complete.
* Values are Pub/Sub topics. The format of each Pub/Sub topic is:
* projects/{project}/topics/{topic}
*
@@ -77,14 +85,19 @@ class Settings extends \Google\Protobuf\Internal\Message
protected $analysis_config = null;
/**
* Default DLP redaction resources to be applied while ingesting
- * conversations.
+ * conversations. This applies to conversations ingested from the
+ * `UploadConversation` and `IngestConversations` endpoints, including
+ * conversations coming from CCAI Platform.
*
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 10;
*/
protected $redaction_config = null;
/**
- * Optional. Default Speech-to-Text resources to be used while ingesting audio
- * files. Optional, CCAI Insights will create a default if not provided.
+ * Optional. Default Speech-to-Text resources to use while ingesting audio
+ * files. Optional, CCAI Insights will create a default if not provided. This
+ * applies to conversations ingested from the `UploadConversation` and
+ * `IngestConversations` endpoints, including conversations coming from CCAI
+ * Platform.
*
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*/
@@ -122,18 +135,26 @@ class Settings extends \Google\Protobuf\Internal\Message
* * "create-analysis": Notify each time an analysis is created.
* * "create-conversation": Notify each time a conversation is created.
* * "export-insights-data": Notify each time an export is complete.
+ * * "ingest-conversations": Notify each time an IngestConversations LRO is
+ * complete.
* * "update-conversation": Notify each time a conversation is updated via
* UpdateConversation.
+ * * "upload-conversation": Notify when an UploadConversation LRO is complete.
* Values are Pub/Sub topics. The format of each Pub/Sub topic is:
* projects/{project}/topics/{topic}
* @type \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig $analysis_config
* Default analysis settings.
* @type \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $redaction_config
* Default DLP redaction resources to be applied while ingesting
- * conversations.
+ * conversations. This applies to conversations ingested from the
+ * `UploadConversation` and `IngestConversations` endpoints, including
+ * conversations coming from CCAI Platform.
* @type \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $speech_config
- * Optional. Default Speech-to-Text resources to be used while ingesting audio
- * files. Optional, CCAI Insights will create a default if not provided.
+ * Optional. Default Speech-to-Text resources to use while ingesting audio
+ * files. Optional, CCAI Insights will create a default if not provided. This
+ * applies to conversations ingested from the `UploadConversation` and
+ * `IngestConversations` endpoints, including conversations coming from CCAI
+ * Platform.
* }
*/
public function __construct($data = NULL) {
@@ -324,8 +345,11 @@ public function setConversationTtl($var)
* * "create-analysis": Notify each time an analysis is created.
* * "create-conversation": Notify each time a conversation is created.
* * "export-insights-data": Notify each time an export is complete.
+ * * "ingest-conversations": Notify each time an IngestConversations LRO is
+ * complete.
* * "update-conversation": Notify each time a conversation is updated via
* UpdateConversation.
+ * * "upload-conversation": Notify when an UploadConversation LRO is complete.
* Values are Pub/Sub topics. The format of each Pub/Sub topic is:
* projects/{project}/topics/{topic}
*
@@ -346,8 +370,11 @@ public function getPubsubNotificationSettings()
* * "create-analysis": Notify each time an analysis is created.
* * "create-conversation": Notify each time a conversation is created.
* * "export-insights-data": Notify each time an export is complete.
+ * * "ingest-conversations": Notify each time an IngestConversations LRO is
+ * complete.
* * "update-conversation": Notify each time a conversation is updated via
* UpdateConversation.
+ * * "upload-conversation": Notify when an UploadConversation LRO is complete.
* Values are Pub/Sub topics. The format of each Pub/Sub topic is:
* projects/{project}/topics/{topic}
*
@@ -401,7 +428,9 @@ public function setAnalysisConfig($var)
/**
* Default DLP redaction resources to be applied while ingesting
- * conversations.
+ * conversations. This applies to conversations ingested from the
+ * `UploadConversation` and `IngestConversations` endpoints, including
+ * conversations coming from CCAI Platform.
*
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 10;
* @return \Google\Cloud\ContactCenterInsights\V1\RedactionConfig|null
@@ -423,7 +452,9 @@ public function clearRedactionConfig()
/**
* Default DLP redaction resources to be applied while ingesting
- * conversations.
+ * conversations. This applies to conversations ingested from the
+ * `UploadConversation` and `IngestConversations` endpoints, including
+ * conversations coming from CCAI Platform.
*
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 10;
* @param \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $var
@@ -438,8 +469,11 @@ public function setRedactionConfig($var)
}
/**
- * Optional. Default Speech-to-Text resources to be used while ingesting audio
- * files. Optional, CCAI Insights will create a default if not provided.
+ * Optional. Default Speech-to-Text resources to use while ingesting audio
+ * files. Optional, CCAI Insights will create a default if not provided. This
+ * applies to conversations ingested from the `UploadConversation` and
+ * `IngestConversations` endpoints, including conversations coming from CCAI
+ * Platform.
*
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL];
* @return \Google\Cloud\ContactCenterInsights\V1\SpeechConfig|null
@@ -460,8 +494,11 @@ public function clearSpeechConfig()
}
/**
- * Optional. Default Speech-to-Text resources to be used while ingesting audio
- * files. Optional, CCAI Insights will create a default if not provided.
+ * Optional. Default Speech-to-Text resources to use while ingesting audio
+ * files. Optional, CCAI Insights will create a default if not provided. This
+ * applies to conversations ingested from the `UploadConversation` and
+ * `IngestConversations` endpoints, including conversations coming from CCAI
+ * Platform.
*
* Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL];
* @param \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $var
diff --git a/ContactCenterInsights/src/V1/SpeechConfig.php b/ContactCenterInsights/src/V1/SpeechConfig.php
index 26829b4fdee5..714218e8fcc2 100644
--- a/ContactCenterInsights/src/V1/SpeechConfig.php
+++ b/ContactCenterInsights/src/V1/SpeechConfig.php
@@ -10,6 +10,10 @@
/**
* Speech-to-Text configuration.
+ * Speech-to-Text settings are applied to conversations ingested from the
+ * `UploadConversation` and `IngestConversations` endpoints, including
+ * conversation coming from CCAI Platform. They are not applied to conversations
+ * ingested from the `CreateConversation` endpoint.
*
* Generated from protobuf message google.cloud.contactcenterinsights.v1.SpeechConfig
*/
diff --git a/ContactCenterInsights/src/V1/UpdateConversationRequest.php b/ContactCenterInsights/src/V1/UpdateConversationRequest.php
index 454731ba405c..94c6827f7a67 100644
--- a/ContactCenterInsights/src/V1/UpdateConversationRequest.php
+++ b/ContactCenterInsights/src/V1/UpdateConversationRequest.php
@@ -22,7 +22,19 @@ class UpdateConversationRequest extends \Google\Protobuf\Internal\Message
*/
protected $conversation = null;
/**
- * The list of fields to be updated.
+ * The list of fields to be updated. All possible fields can be updated by
+ * passing `*`, or a subset of the following updateable fields can be
+ * provided:
+ * * `agent_id`
+ * * `language_code`
+ * * `labels`
+ * * `metadata`
+ * * `quality_metadata`
+ * * `call_metadata`
+ * * `start_time`
+ * * `expire_time` or `ttl`
+ * * `data_source.gcs_source.audio_uri` or
+ * `data_source.dialogflow_source.audio_uri`
*
* Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
*/
@@ -30,7 +42,20 @@ class UpdateConversationRequest extends \Google\Protobuf\Internal\Message
/**
* @param \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation Required. The new values for the conversation.
- * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated.
+ * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. All possible fields can be updated by
+ * passing `*`, or a subset of the following updateable fields can be
+ * provided:
+ *
+ * * `agent_id`
+ * * `language_code`
+ * * `labels`
+ * * `metadata`
+ * * `quality_metadata`
+ * * `call_metadata`
+ * * `start_time`
+ * * `expire_time` or `ttl`
+ * * `data_source.gcs_source.audio_uri` or
+ * `data_source.dialogflow_source.audio_uri`
*
* @return \Google\Cloud\ContactCenterInsights\V1\UpdateConversationRequest
*
@@ -52,7 +77,19 @@ public static function build(\Google\Cloud\ContactCenterInsights\V1\Conversation
* @type \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation
* Required. The new values for the conversation.
* @type \Google\Protobuf\FieldMask $update_mask
- * The list of fields to be updated.
+ * The list of fields to be updated. All possible fields can be updated by
+ * passing `*`, or a subset of the following updateable fields can be
+ * provided:
+ * * `agent_id`
+ * * `language_code`
+ * * `labels`
+ * * `metadata`
+ * * `quality_metadata`
+ * * `call_metadata`
+ * * `start_time`
+ * * `expire_time` or `ttl`
+ * * `data_source.gcs_source.audio_uri` or
+ * `data_source.dialogflow_source.audio_uri`
* }
*/
public function __construct($data = NULL) {
@@ -97,7 +134,19 @@ public function setConversation($var)
}
/**
- * The list of fields to be updated.
+ * The list of fields to be updated. All possible fields can be updated by
+ * passing `*`, or a subset of the following updateable fields can be
+ * provided:
+ * * `agent_id`
+ * * `language_code`
+ * * `labels`
+ * * `metadata`
+ * * `quality_metadata`
+ * * `call_metadata`
+ * * `start_time`
+ * * `expire_time` or `ttl`
+ * * `data_source.gcs_source.audio_uri` or
+ * `data_source.dialogflow_source.audio_uri`
*
* Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
* @return \Google\Protobuf\FieldMask|null
@@ -118,7 +167,19 @@ public function clearUpdateMask()
}
/**
- * The list of fields to be updated.
+ * The list of fields to be updated. All possible fields can be updated by
+ * passing `*`, or a subset of the following updateable fields can be
+ * provided:
+ * * `agent_id`
+ * * `language_code`
+ * * `labels`
+ * * `metadata`
+ * * `quality_metadata`
+ * * `call_metadata`
+ * * `start_time`
+ * * `expire_time` or `ttl`
+ * * `data_source.gcs_source.audio_uri` or
+ * `data_source.dialogflow_source.audio_uri`
*
* Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
* @param \Google\Protobuf\FieldMask $var
diff --git a/ContactCenterInsights/src/V1/UploadConversationMetadata.php b/ContactCenterInsights/src/V1/UploadConversationMetadata.php
index 3d20791c0681..b893a1d41d46 100644
--- a/ContactCenterInsights/src/V1/UploadConversationMetadata.php
+++ b/ContactCenterInsights/src/V1/UploadConversationMetadata.php
@@ -9,7 +9,7 @@
use Google\Protobuf\Internal\GPBUtil;
/**
- * The metadata for an UploadConversation operation.
+ * The metadata for an `UploadConversation` operation.
*
* Generated from protobuf message google.cloud.contactcenterinsights.v1.UploadConversationMetadata
*/
diff --git a/ContactCenterInsights/src/V1/gapic_metadata.json b/ContactCenterInsights/src/V1/gapic_metadata.json
index 66263ef3f61f..a1bab090cfad 100644
--- a/ContactCenterInsights/src/V1/gapic_metadata.json
+++ b/ContactCenterInsights/src/V1/gapic_metadata.json
@@ -95,6 +95,11 @@
"exportInsightsData"
]
},
+ "ExportIssueModel": {
+ "methods": [
+ "exportIssueModel"
+ ]
+ },
"GetAnalysis": {
"methods": [
"getAnalysis"
@@ -105,6 +110,11 @@
"getConversation"
]
},
+ "GetEncryptionSpec": {
+ "methods": [
+ "getEncryptionSpec"
+ ]
+ },
"GetIssue": {
"methods": [
"getIssue"
@@ -130,11 +140,21 @@
"getView"
]
},
+ "ImportIssueModel": {
+ "methods": [
+ "importIssueModel"
+ ]
+ },
"IngestConversations": {
"methods": [
"ingestConversations"
]
},
+ "InitializeEncryptionSpec": {
+ "methods": [
+ "initializeEncryptionSpec"
+ ]
+ },
"ListAnalyses": {
"methods": [
"listAnalyses"
diff --git a/ContactCenterInsights/src/V1/resources/contact_center_insights_client_config.json b/ContactCenterInsights/src/V1/resources/contact_center_insights_client_config.json
index 38c4895e8611..4f2e84193db6 100644
--- a/ContactCenterInsights/src/V1/resources/contact_center_insights_client_config.json
+++ b/ContactCenterInsights/src/V1/resources/contact_center_insights_client_config.json
@@ -113,6 +113,11 @@
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
+ "ExportIssueModel": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
"GetAnalysis": {
"timeout_millis": 60000,
"retry_codes_name": "retry_policy_1_codes",
@@ -123,6 +128,11 @@
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
+ "GetEncryptionSpec": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
"GetIssue": {
"timeout_millis": 60000,
"retry_codes_name": "retry_policy_1_codes",
@@ -148,11 +158,21 @@
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
+ "ImportIssueModel": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
"IngestConversations": {
"timeout_millis": 60000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
+ "InitializeEncryptionSpec": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
"ListAnalyses": {
"timeout_millis": 60000,
"retry_codes_name": "retry_policy_1_codes",
diff --git a/ContactCenterInsights/src/V1/resources/contact_center_insights_descriptor_config.php b/ContactCenterInsights/src/V1/resources/contact_center_insights_descriptor_config.php
index aa0bfa54c9d4..b529d00be28f 100644
--- a/ContactCenterInsights/src/V1/resources/contact_center_insights_descriptor_config.php
+++ b/ContactCenterInsights/src/V1/resources/contact_center_insights_descriptor_config.php
@@ -156,6 +156,44 @@
],
],
],
+ 'ExportIssueModel' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\ExportIssueModelResponse',
+ 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\ExportIssueModelMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'ImportIssueModel' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\ImportIssueModelResponse',
+ 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\ImportIssueModelMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'IngestConversations' => [
'longRunning' => [
'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\IngestConversationsResponse',
@@ -175,6 +213,26 @@
],
],
],
+ 'InitializeEncryptionSpec' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecResponse',
+ 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'encryption_spec.name',
+ 'fieldAccessors' => [
+ 'getEncryptionSpec',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'UndeployIssueModel' => [
'longRunning' => [
'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelResponse',
@@ -357,6 +415,18 @@
],
],
],
+ 'GetEncryptionSpec' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\EncryptionSpec',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetIssue' => [
'callType' => \Google\ApiCore\Call::UNARY_CALL,
'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Issue',
@@ -603,6 +673,7 @@
'analysis' => 'projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}',
'conversation' => 'projects/{project}/locations/{location}/conversations/{conversation}',
'conversationProfile' => 'projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}',
+ 'encryptionSpec' => 'projects/{project}/locations/{location}/encryptionSpec',
'issue' => 'projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}',
'issueModel' => 'projects/{project}/locations/{location}/issueModels/{issue_model}',
'location' => 'projects/{project}/locations/{location}',
diff --git a/ContactCenterInsights/src/V1/resources/contact_center_insights_rest_client_config.php b/ContactCenterInsights/src/V1/resources/contact_center_insights_rest_client_config.php
index 1da13d22d3a7..a3735d966ff5 100644
--- a/ContactCenterInsights/src/V1/resources/contact_center_insights_rest_client_config.php
+++ b/ContactCenterInsights/src/V1/resources/contact_center_insights_rest_client_config.php
@@ -219,6 +219,18 @@
],
],
],
+ 'ExportIssueModel' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*}:export',
+ 'body' => '*',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetAnalysis' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=projects/*/locations/*/conversations/*/analyses/*}',
@@ -241,6 +253,17 @@
],
],
],
+ 'GetEncryptionSpec' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/encryptionSpec}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetIssue' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*/issues/*}',
@@ -296,6 +319,18 @@
],
],
],
+ 'ImportIssueModel' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/issueModels:import',
+ 'body' => '*',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'IngestConversations' => [
'method' => 'post',
'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations:ingest',
@@ -308,6 +343,19 @@
],
],
],
+ 'InitializeEncryptionSpec' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{encryption_spec.name=projects/*/locations/*/encryptionSpec}:initialize',
+ 'body' => '*',
+ 'placeholders' => [
+ 'encryption_spec.name' => [
+ 'getters' => [
+ 'getEncryptionSpec',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'ListAnalyses' => [
'method' => 'get',
'uriTemplate' => '/v1/{parent=projects/*/locations/*/conversations/*}/analyses',
diff --git a/ContactCenterInsights/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php b/ContactCenterInsights/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php
index 3d50510bcf7a..bfce002f77dd 100644
--- a/ContactCenterInsights/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php
+++ b/ContactCenterInsights/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php
@@ -50,17 +50,25 @@
use Google\Cloud\ContactCenterInsights\V1\DeleteViewRequest;
use Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest;
use Google\Cloud\ContactCenterInsights\V1\DeployIssueModelResponse;
+use Google\Cloud\ContactCenterInsights\V1\EncryptionSpec;
use Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest;
use Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataResponse;
+use Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest;
+use Google\Cloud\ContactCenterInsights\V1\ExportIssueModelResponse;
use Google\Cloud\ContactCenterInsights\V1\GetAnalysisRequest;
use Google\Cloud\ContactCenterInsights\V1\GetConversationRequest;
+use Google\Cloud\ContactCenterInsights\V1\GetEncryptionSpecRequest;
use Google\Cloud\ContactCenterInsights\V1\GetIssueModelRequest;
use Google\Cloud\ContactCenterInsights\V1\GetIssueRequest;
use Google\Cloud\ContactCenterInsights\V1\GetPhraseMatcherRequest;
use Google\Cloud\ContactCenterInsights\V1\GetSettingsRequest;
use Google\Cloud\ContactCenterInsights\V1\GetViewRequest;
+use Google\Cloud\ContactCenterInsights\V1\ImportIssueModelRequest;
+use Google\Cloud\ContactCenterInsights\V1\ImportIssueModelResponse;
use Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest;
use Google\Cloud\ContactCenterInsights\V1\IngestConversationsResponse;
+use Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecRequest;
+use Google\Cloud\ContactCenterInsights\V1\InitializeEncryptionSpecResponse;
use Google\Cloud\ContactCenterInsights\V1\Issue;
use Google\Cloud\ContactCenterInsights\V1\IssueModel;
use Google\Cloud\ContactCenterInsights\V1\ListAnalysesRequest;
@@ -674,12 +682,14 @@ public function createConversationTest()
$name = 'name3373707';
$languageCode = 'languageCode-412800396';
$agentId = 'agentId1469158549';
+ $metadataJson = 'metadataJson-2002268168';
$turnCount = 428155597;
$obfuscatedUserId = 'obfuscatedUserId-227848300';
$expectedResponse = new Conversation();
$expectedResponse->setName($name);
$expectedResponse->setLanguageCode($languageCode);
$expectedResponse->setAgentId($agentId);
+ $expectedResponse->setMetadataJson($metadataJson);
$expectedResponse->setTurnCount($turnCount);
$expectedResponse->setObfuscatedUserId($obfuscatedUserId);
$transport->addResponse($expectedResponse);
@@ -1730,6 +1740,131 @@ public function exportInsightsDataExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
}
+ /** @test */
+ public function exportIssueModelTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/exportIssueModelTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new ExportIssueModelResponse();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/exportIssueModelTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]');
+ $request = (new ExportIssueModelRequest())->setName($formattedName);
+ $response = $gapicClient->exportIssueModel($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame(
+ '/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ExportIssueModel',
+ $actualApiFuncCall
+ );
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/exportIssueModelTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function exportIssueModelExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/exportIssueModelTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]');
+ $request = (new ExportIssueModelRequest())->setName($formattedName);
+ $response = $gapicClient->exportIssueModel($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/exportIssueModelTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
/** @test */
public function getAnalysisTest()
{
@@ -1807,12 +1942,14 @@ public function getConversationTest()
$name2 = 'name2-1052831874';
$languageCode = 'languageCode-412800396';
$agentId = 'agentId1469158549';
+ $metadataJson = 'metadataJson-2002268168';
$turnCount = 428155597;
$obfuscatedUserId = 'obfuscatedUserId-227848300';
$expectedResponse = new Conversation();
$expectedResponse->setName($name2);
$expectedResponse->setLanguageCode($languageCode);
$expectedResponse->setAgentId($agentId);
+ $expectedResponse->setMetadataJson($metadataJson);
$expectedResponse->setTurnCount($turnCount);
$expectedResponse->setObfuscatedUserId($obfuscatedUserId);
$transport->addResponse($expectedResponse);
@@ -1871,6 +2008,76 @@ public function getConversationExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function getEncryptionSpecTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $kmsKey = 'kmsKey-591635343';
+ $expectedResponse = new EncryptionSpec();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setKmsKey($kmsKey);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->encryptionSpecName('[PROJECT]', '[LOCATION]');
+ $request = (new GetEncryptionSpecRequest())->setName($formattedName);
+ $response = $gapicClient->getEncryptionSpec($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame(
+ '/google.cloud.contactcenterinsights.v1.ContactCenterInsights/GetEncryptionSpec',
+ $actualFuncCall
+ );
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getEncryptionSpecExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->encryptionSpecName('[PROJECT]', '[LOCATION]');
+ $request = (new GetEncryptionSpecRequest())->setName($formattedName);
+ try {
+ $gapicClient->getEncryptionSpec($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
/** @test */
public function getIssueTest()
{
@@ -1882,9 +2089,11 @@ public function getIssueTest()
// Mock response
$name2 = 'name2-1052831874';
$displayName = 'displayName1615086568';
+ $displayDescription = 'displayDescription-1876039681';
$expectedResponse = new Issue();
$expectedResponse->setName($name2);
$expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setDisplayDescription($displayDescription);
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]');
@@ -2224,6 +2433,131 @@ public function getViewExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function importIssueModelTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/importIssueModelTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new ImportIssueModelResponse();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/importIssueModelTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ImportIssueModelRequest())->setParent($formattedParent);
+ $response = $gapicClient->importIssueModel($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame(
+ '/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ImportIssueModel',
+ $actualApiFuncCall
+ );
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/importIssueModelTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function importIssueModelExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/importIssueModelTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ImportIssueModelRequest())->setParent($formattedParent);
+ $response = $gapicClient->importIssueModel($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/importIssueModelTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
/** @test */
public function ingestConversationsTest()
{
@@ -2349,6 +2683,135 @@ public function ingestConversationsExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
}
+ /** @test */
+ public function initializeEncryptionSpecTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/initializeEncryptionSpecTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new InitializeEncryptionSpecResponse();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/initializeEncryptionSpecTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $encryptionSpec = new EncryptionSpec();
+ $encryptionSpecKmsKey = 'encryptionSpecKmsKey627607756';
+ $encryptionSpec->setKmsKey($encryptionSpecKmsKey);
+ $request = (new InitializeEncryptionSpecRequest())->setEncryptionSpec($encryptionSpec);
+ $response = $gapicClient->initializeEncryptionSpec($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame(
+ '/google.cloud.contactcenterinsights.v1.ContactCenterInsights/InitializeEncryptionSpec',
+ $actualApiFuncCall
+ );
+ $actualValue = $actualApiRequestObject->getEncryptionSpec();
+ $this->assertProtobufEquals($encryptionSpec, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/initializeEncryptionSpecTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function initializeEncryptionSpecExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/initializeEncryptionSpecTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $encryptionSpec = new EncryptionSpec();
+ $encryptionSpecKmsKey = 'encryptionSpecKmsKey627607756';
+ $encryptionSpec->setKmsKey($encryptionSpecKmsKey);
+ $request = (new InitializeEncryptionSpecRequest())->setEncryptionSpec($encryptionSpec);
+ $response = $gapicClient->initializeEncryptionSpec($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/initializeEncryptionSpecTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
/** @test */
public function listAnalysesTest()
{
@@ -2905,12 +3368,14 @@ public function updateConversationTest()
$name = 'name3373707';
$languageCode = 'languageCode-412800396';
$agentId = 'agentId1469158549';
+ $metadataJson = 'metadataJson-2002268168';
$turnCount = 428155597;
$obfuscatedUserId = 'obfuscatedUserId-227848300';
$expectedResponse = new Conversation();
$expectedResponse->setName($name);
$expectedResponse->setLanguageCode($languageCode);
$expectedResponse->setAgentId($agentId);
+ $expectedResponse->setMetadataJson($metadataJson);
$expectedResponse->setTurnCount($turnCount);
$expectedResponse->setObfuscatedUserId($obfuscatedUserId);
$transport->addResponse($expectedResponse);
@@ -2980,9 +3445,11 @@ public function updateIssueTest()
// Mock response
$name = 'name3373707';
$displayName = 'displayName1615086568';
+ $displayDescription = 'displayDescription-1876039681';
$expectedResponse = new Issue();
$expectedResponse->setName($name);
$expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setDisplayDescription($displayDescription);
$transport->addResponse($expectedResponse);
// Mock request
$issue = new Issue();
@@ -3357,12 +3824,14 @@ public function uploadConversationTest()
$name = 'name3373707';
$languageCode = 'languageCode-412800396';
$agentId = 'agentId1469158549';
+ $metadataJson = 'metadataJson-2002268168';
$turnCount = 428155597;
$obfuscatedUserId = 'obfuscatedUserId-227848300';
$expectedResponse = new Conversation();
$expectedResponse->setName($name);
$expectedResponse->setLanguageCode($languageCode);
$expectedResponse->setAgentId($agentId);
+ $expectedResponse->setMetadataJson($metadataJson);
$expectedResponse->setTurnCount($turnCount);
$expectedResponse->setObfuscatedUserId($obfuscatedUserId);
$anyResponse = new Any();