From 4769d32db3d7fa9a73f82b952b4aebc22910ff27 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 25 Jan 2024 17:59:37 +0000 Subject: [PATCH 1/2] feat: add Conversation QualityMetadata docs: clarify usage of agent and customer channel fields in IngestConversationsRequest PiperOrigin-RevId: 601446672 Source-Link: https://github.com/googleapis/googleapis/commit/6f0527b716d3581415b5ade997bd4c6a04480a7d Source-Link: https://github.com/googleapis/googleapis-gen/commit/5678b00d61bed0bac64a63725d276eacd980b04a Copy-Tag: eyJwIjoiQ29udGFjdENlbnRlckluc2lnaHRzLy5Pd2xCb3QueWFtbCIsImgiOiI1Njc4YjAwZDYxYmVkMGJhYzY0YTYzNzI1ZDI3NmVhY2Q5ODBiMDRhIn0= --- .../V1/ContactCenterInsights.php | Bin 0 -> 22895 bytes .../Contactcenterinsights/V1/Resources.php | Bin 0 -> 17721 bytes .../ContactCenterInsights/V1/Analysis.php | 263 ++ .../V1/AnalysisResult.php | 119 + .../AnalysisResult/CallAnalysisMetadata.php | 250 ++ .../V1/AnnotationBoundary.php | 116 + .../V1/AnnotatorSelector.php | 453 +++ .../AnnotatorSelector/SummarizationConfig.php | 117 + .../SummarizationModel.php | 57 + .../V1/AnswerFeedback.php | 140 + .../V1/AnswerFeedback/CorrectnessLevel.php | 71 + .../V1/ArticleSuggestionData.php | 265 ++ .../V1/BulkAnalyzeConversationsMetadata.php | 309 ++ .../V1/BulkAnalyzeConversationsRequest.php | 206 + .../V1/BulkAnalyzeConversationsResponse.php | 101 + .../V1/BulkDeleteConversationsMetadata.php | 203 + .../V1/BulkDeleteConversationsRequest.php | 203 + .../V1/BulkDeleteConversationsResponse.php | 33 + .../V1/CalculateIssueModelStatsRequest.php | 81 + .../V1/CalculateIssueModelStatsResponse.php | 81 + .../V1/CalculateStatsRequest.php | 119 + .../V1/CalculateStatsResponse.php | 366 ++ .../V1/CalculateStatsResponse/TimeSeries.php | 122 + .../TimeSeries/Interval.php | 114 + .../V1/CallAnnotation.php | 432 +++ .../ContactCenterInsights/V1/Conversation.php | 890 +++++ .../V1/Conversation/CallMetadata.php | 104 + .../V1/Conversation/Medium.php | 64 + .../V1/Conversation/QualityMetadata.php | 182 + .../QualityMetadata/AgentInfo.php | 176 + .../V1/Conversation/Transcript.php | 70 + .../Transcript/TranscriptSegment.php | 406 ++ .../DialogflowSegmentMetadata.php | 74 + .../Transcript/TranscriptSegment/WordInfo.php | 204 + .../V1/ConversationDataSource.php | 108 + .../V1/ConversationLevelSentiment.php | 111 + .../V1/ConversationParticipant.php | 226 ++ .../V1/ConversationParticipant/Role.php | 78 + ...onversationSummarizationSuggestionData.php | 265 ++ .../V1/ConversationView.php | 63 + .../V1/CreateAnalysisOperationMetadata.php | 199 + .../V1/CreateAnalysisRequest.php | 127 + .../V1/CreateConversationRequest.php | 184 + .../V1/CreateIssueModelMetadata.php | 165 + .../V1/CreateIssueModelRequest.php | 127 + .../V1/CreatePhraseMatcherRequest.php | 142 + .../V1/CreateViewRequest.php | 142 + .../V1/DeleteAnalysisRequest.php | 81 + .../V1/DeleteConversationRequest.php | 123 + .../V1/DeleteIssueModelMetadata.php | 165 + .../V1/DeleteIssueModelRequest.php | 81 + .../V1/DeleteIssueRequest.php | 81 + .../V1/DeletePhraseMatcherRequest.php | 81 + .../V1/DeleteViewRequest.php | 81 + .../V1/DeployIssueModelMetadata.php | 165 + .../V1/DeployIssueModelRequest.php | 81 + .../V1/DeployIssueModelResponse.php | 33 + .../V1/DialogflowIntent.php | 68 + .../V1/DialogflowInteractionData.php | 109 + .../V1/DialogflowSource.php | 113 + .../Cloud/ContactCenterInsights/V1/Entity.php | 243 ++ .../ContactCenterInsights/V1/Entity/Type.php | 163 + .../V1/EntityMentionData.php | 150 + .../V1/EntityMentionData/MentionType.php | 64 + .../V1/ExactMatchConfig.php | 67 + .../V1/ExportInsightsDataMetadata.php | 203 + .../V1/ExportInsightsDataRequest.php | 237 ++ .../BigQueryDestination.php | 162 + .../WriteDisposition.php | 65 + .../V1/ExportInsightsDataResponse.php | 33 + .../V1/FaqAnswerData.php | 265 ++ .../ContactCenterInsights/V1/GcsSource.php | 109 + .../V1/GetAnalysisRequest.php | 81 + .../V1/GetConversationRequest.php | 115 + .../V1/GetIssueModelRequest.php | 81 + .../V1/GetIssueRequest.php | 81 + .../V1/GetPhraseMatcherRequest.php | 81 + .../V1/GetSettingsRequest.php | 81 + .../V1/GetViewRequest.php | 81 + .../ContactCenterInsights/V1/HoldData.php | 33 + .../V1/IngestConversationsMetadata.php | 247 ++ .../IngestConversationsStats.php | 184 + .../V1/IngestConversationsRequest.php | 308 ++ .../ConversationConfig.php | 158 + .../IngestConversationsRequest/GcsSource.php | 104 + .../GcsSource/BucketObjectType.php | 62 + .../TranscriptObjectConfig.php | 70 + .../V1/IngestConversationsResponse.php | 33 + .../Cloud/ContactCenterInsights/V1/Intent.php | 102 + .../V1/IntentMatchData.php | 74 + .../V1/InterruptionData.php | 33 + .../Cloud/ContactCenterInsights/V1/Issue.php | 235 ++ .../V1/IssueAssignment.php | 143 + .../V1/IssueMatchData.php | 77 + .../ContactCenterInsights/V1/IssueModel.php | 425 ++ .../V1/IssueModel/InputDataConfig.php | 155 + .../V1/IssueModel/ModelType.php | 64 + .../V1/IssueModel/State.php | 86 + .../V1/IssueModelLabelStats.php | 139 + .../V1/IssueModelLabelStats/IssueStats.php | 146 + .../V1/IssueModelResult.php | 105 + .../V1/ListAnalysesRequest.php | 207 + .../V1/ListAnalysesResponse.php | 105 + .../V1/ListConversationsRequest.php | 241 ++ .../V1/ListConversationsResponse.php | 109 + .../V1/ListIssueModelsRequest.php | 81 + .../V1/ListIssueModelsResponse.php | 67 + .../V1/ListIssuesRequest.php | 81 + .../V1/ListIssuesResponse.php | 67 + .../V1/ListPhraseMatchersRequest.php | 207 + .../V1/ListPhraseMatchersResponse.php | 105 + .../V1/ListViewsRequest.php | 169 + .../V1/ListViewsResponse.php | 105 + .../V1/PhraseMatchData.php | 102 + .../V1/PhraseMatchRule.php | 153 + .../V1/PhraseMatchRuleConfig.php | 75 + .../V1/PhraseMatchRuleGroup.php | 101 + .../PhraseMatchRuleGroupType.php | 65 + .../V1/PhraseMatcher.php | 477 +++ .../V1/PhraseMatcher/PhraseMatcherType.php | 65 + .../V1/RedactionConfig.php | 117 + .../V1/RuntimeAnnotation.php | 458 +++ .../V1/SentimentData.php | 105 + .../ContactCenterInsights/V1/Settings.php | 479 +++ .../V1/Settings/AnalysisConfig.php | 160 + .../ContactCenterInsights/V1/SilenceData.php | 33 + .../V1/SmartComposeSuggestionData.php | 189 + .../V1/SmartReplyData.php | 189 + .../ContactCenterInsights/V1/SpeechConfig.php | 75 + .../V1/UndeployIssueModelMetadata.php | 165 + .../V1/UndeployIssueModelRequest.php | 81 + .../V1/UndeployIssueModelResponse.php | 33 + .../V1/UpdateConversationRequest.php | 136 + .../V1/UpdateIssueModelRequest.php | 136 + .../V1/UpdateIssueRequest.php | 136 + .../V1/UpdatePhraseMatcherRequest.php | 136 + .../V1/UpdateSettingsRequest.php | 136 + .../V1/UpdateViewRequest.php | 136 + .../V1/UploadConversationMetadata.php | 247 ++ .../V1/UploadConversationRequest.php | 257 ++ .../Cloud/ContactCenterInsights/V1/View.php | 231 ++ .../bulk_analyze_conversations.php | 93 + .../bulk_delete_conversations.php | 85 + .../calculate_issue_model_stats.php | 75 + .../calculate_stats.php | 71 + .../create_analysis.php | 90 + .../create_conversation.php | 73 + .../create_issue_model.php | 85 + .../create_phrase_matcher.php | 80 + .../create_view.php | 76 + .../delete_analysis.php | 74 + .../delete_conversation.php | 73 + .../delete_issue.php | 74 + .../delete_issue_model.php | 84 + .../delete_phrase_matcher.php | 73 + .../delete_view.php | 69 + .../deploy_issue_model.php | 88 + .../export_insights_data.php | 83 + .../get_analysis.php | 76 + .../get_conversation.php | 75 + .../ContactCenterInsightsClient/get_issue.php | 76 + .../get_issue_model.php | 75 + .../get_phrase_matcher.php | 75 + .../get_settings.php | 71 + .../ContactCenterInsightsClient/get_view.php | 71 + .../ingest_conversations.php | 84 + .../list_analyses.php | 80 + .../list_conversations.php | 76 + .../list_issue_models.php | 71 + .../list_issues.php | 75 + .../list_phrase_matchers.php | 76 + .../list_views.php | 76 + .../undeploy_issue_model.php | 88 + .../update_conversation.php | 59 + .../update_issue.php | 59 + .../update_issue_model.php | 59 + .../update_phrase_matcher.php | 73 + .../update_settings.php | 62 + .../update_view.php | 59 + .../upload_conversation.php | 87 + .../V1/Client/ContactCenterInsightsClient.php | 1609 ++++++++ .../v1/src/V1/ContactCenterInsightsClient.php | 34 + .../ContactCenterInsightsGapicClient.php | 2882 ++++++++++++++ .../v1/src/V1/gapic_metadata.json | 213 + ...contact_center_insights_client_config.json | 229 ++ ...tact_center_insights_descriptor_config.php | 599 +++ ...act_center_insights_rest_client_config.php | 500 +++ .../ContactCenterInsightsClientTest.php | 3448 +++++++++++++++++ .../V1/ContactCenterInsightsClientTest.php | 3159 +++++++++++++++ 189 files changed, 36774 insertions(+) create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/ContactCenterInsights.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/Resources.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Analysis.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult/CallAnalysisMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotationBoundary.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback/CorrectnessLevel.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ArticleSuggestionData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries/Interval.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CallAnnotation.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/CallMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Medium.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata/AgentInfo.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/DialogflowSegmentMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/WordInfo.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationDataSource.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationLevelSentiment.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant/Role.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationSummarizationSuggestionData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationView.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisOperationMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateConversationRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreatePhraseMatcherRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateViewRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteAnalysisRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteConversationRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeletePhraseMatcherRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteViewRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowIntent.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowInteractionData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowSource.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity/Type.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData/MentionType.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExactMatchConfig.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/BigQueryDestination.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/WriteDisposition.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/FaqAnswerData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GcsSource.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetAnalysisRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetConversationRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueModelRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetPhraseMatcherRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetSettingsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetViewRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/HoldData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata/IngestConversationsStats.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/ConversationConfig.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource/BucketObjectType.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/TranscriptObjectConfig.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Intent.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IntentMatchData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/InterruptionData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Issue.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueAssignment.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueMatchData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/InputDataConfig.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/ModelType.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/State.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats/IssueStats.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelResult.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRule.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleConfig.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup/PhraseMatchRuleGroupType.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher/PhraseMatcherType.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RedactionConfig.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RuntimeAnnotation.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SentimentData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings/AnalysisConfig.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SilenceData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartComposeSuggestionData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartReplyData.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SpeechConfig.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelResponse.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateConversationRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueModelRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdatePhraseMatcherRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateSettingsRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateViewRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationMetadata.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationRequest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/View.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_stats.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_analysis.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_conversation.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_issue_model.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_view.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_analysis.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_conversation.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue_model.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_view.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/deploy_issue_model.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/export_insights_data.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_analysis.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_conversation.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue_model.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_settings.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_view.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/ingest_conversations.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_analyses.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_conversations.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issue_models.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issues.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_views.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_conversation.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue_model.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_settings.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_view.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/upload_conversation.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/Client/ContactCenterInsightsClient.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/ContactCenterInsightsClient.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/Gapic/ContactCenterInsightsGapicClient.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_client_config.json create mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_descriptor_config.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_rest_client_config.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php create mode 100644 owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/ContactCenterInsightsClientTest.php diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/ContactCenterInsights.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/ContactCenterInsights.php new file mode 100644 index 0000000000000000000000000000000000000000..268019807493e93f7b33f9f522704b658283580f GIT binary patch literal 22895 zcmdTsTWlNIbs=rp(v@XX*K12=*1Pn0H?g%|5~97kUi!5|N|w26OR_|1^I*V^$dNQ_ zzA`hE*GYvGX_}%RO@Tg;d;~%JQMAoR5FmY^{pnB97HYqeqG*Mt$VZBzMSofp{a7?b z&wb64Ltc`q(d^I4oO|v)@8_MleXqUSMwe4ddQ&$wTd$?Io~7(vJ=Hc_cB|T|r?xuV z+q#*mwi<1tuAAvpYGEa{yi!UnE)+|b0Mu%A%&MMC?X+4ubv;w9w>q^s$JEa zwr(0t%h=hqt<2uMcu-+aD&kR^o`+CVYv@*6tLmwx)%+vf)@quqm6zz&=a(R-Dy^Bqt#3ifR$!dzj8Ij_9SaxX}5q^cTxh?Rl+`CUAagY(A4VX1>LHeM%!+g ztFSbe+tF=@>ExFySNXAIJ7YU_h2faXg^;|Hvdxa}Jw25&b-QCWZ&AF-2K&xm?#gMqH;T*0J~?5!qcvEcw@ zKWsI3%ucguGVq9#r?Po)PQtm&}tS3XjmJBdRTWhrC zVb|K#@;aziCxXM&R$jkraLZ6@HOCO{gNwQ1s4h|DPokgvZVVNUz`5X8*(Pb~q0(JF zRC;edIm6G=+6Fi?qU+2#C13VD*d_{H+2R__7hLcxFuB_DM{n>)eY~T9vN+gf4pw&+ zFw=4rkS}_PFQP6Kd`_muwTwUic<{MS^oTzcZrcH7lr=zG_zFR`v%(fC!50XIneA$Z zIIRxHUa6sT1+8A~)FH4Cg|OE2&v!tZ@GUf6Z&j%k&Bju(D--#vKT_i#sh80u@w=5~ zSc4QSkX0k|kOSb;=)|^B2d_FCC!or&Aap)>jMWCWrsL}fX5i#M;EMyX4;iq2zGT6@N~1% z(Cq52Zp|J~9lJ7_{fs!Zw+g1alapR2+dpu3f5bLlY})2C{3VpEb}YNq=z9JbJ^!<# zonN5)MQSe>F7?RTFdy` zMlXd$Um>Ev9KonpEgfZOKlHy3=LDGaOSk`Dq7!)z=vE*I!Vo!~q zM8}@!&zJ+jQ)mou>FCT*bMc$83NW>#C4>KC=wVNm@io4catWrAs6w zl|S|)^%$N<<9f5kK!}hgvps~%KvvKxuieZNXE~978+Q9hy^iL)hv9(lFL-<|{xtY! zmbnjjU6uGHzj$tCcuFY0L`{tK~q*+*Q>i?&q=B^vT|6bu$~Q-AI4EK%3p6d!V2>dd!HReJpPTol+F~Jsm4$W%qHe|`QN=RU1l({1a?3nU{ z7@B=(ShiQ0oh)($dz?lSZITsQQ1S}PZdoPuo<{scQ~%Jecqn5@Gt^Y)mvkRr zg_Br9$4M84J2`OFkeCnUs0Fvki6e09o4~D&HuQmXFKGhXpl2oJ#Bj_a3LVE8G})nt zK^kj4p}Ns6$T=moVxbEQ5Jb9TcVxVT^k%ySZ8nO~xbg?%C|PXoKoaHUiDMZWLOWHf z!Wt)>hW8}3HG13hQq@|g&Ata8!#|5=ZBuKqo>rx`^#O!o;Z;e9pUi%0^aD%I2`lsf zAQpW2gBTvc^r3X9ddy4U%<>1>(xC^FyaHkPc8z8uJI5FfMY9tF>3%4hCI2giCL9@q z??79f>J#0rbWDSL18O4s2=fPA?Dn%ZQ_R!Za(Q&AJ1C^{^n51!5*$LKxbhe!f)B8Q zUdnG2-dikHR`TyI7D|=Ur&kv%8_Vmfi-qF-;^IQ$W8lqEX-!>TFRT?;ONkhsKx690 zLUAP#Pa5cacU=P}pJ?bcqtl=qIGxQ&(&tr!^dq_hbudW{Ved1pA_+7O@u+E6Ad{mV z5vYu&*e}&xNO$!*3saN>_##TMS|2(L;xTPP(8u|4bb^_F{tTM(nWplW$I-{TDDU&n zSl$n2EUF}9yI}82Su*G}Wa*@(U(rpoWs2Sl7W+e+Dotvojzze241Xntk_Ppq#1}X@ zHMmdOQ(%TF+d1iio!~7L%pr$OYc`5T@;i{~M6JM=(RnDItGZ=DqUA`G^reWhj4?u9 zMYFXI=iU)b*f~q?M@xW9|S4B%F&@?IEBt`YtW6Y`BxA( z$&OPlcGV>4uG8L|^6eOO|9nNL2-(Fz9W_FVaUaZv=chc(WrUdf)X}0cCOnBNUyq@) zBqL+L>P{d%LR5!KITaJV;75#SiK?I+8c!@i9F+3tbqNFWE5PtV3B!XAa?QNVYTv3<`#e zleFB53KuZch~&EPefScL0$dmCXa_@|dh8JTFp2hfYUS5skkEi4hf9m2(Br@e1<#^H zL;J7-O-10hHx`h#DyusP)5n#sKxZ)mt>>k3p;pJDq{olITWH)|ND!5R6#!dw^(|iVOw``-yreUlxC|ia^9+1u(JCDic zaO*(q4Mp1suFq8&+Q7wU(8(tat3n#^L^URG9Zf$q4N#w&0U^qQOBJmqZ7s8-ix^OBTidF$x@AK7EJ_5=04u)u z{#voLSXn5pudb{YOU0GtKuLkoX||-awy|7LON&reB+x1Lo4UHXxV(^v=cmx5N5;g6 zl3`LE`+07i`NzQ&T()T#MqcRkAV&0JH!e8#^II`A!_r50;vr5ML5<%-lLi}7k`W5e z8RsQEh>Ho!8vh1T_8^YWUyLh3G2WFVCx|*{FG+@HSi{XFSg=08Kh|v5xa)P<^3#=*Gk+5Z{il7w%;6L^WtnCgG{Q^iz2 z>Vm0T(64XSLPWExKS!kT5Ink_!5RB^(9#J%e*UZ-I>LsL7tCEpXM`saCjO4kiDao0 zxrXMX3UjLWq$;0we4yh~mjZp7q21FO!rtAvbG?mD7$g)6w|Y%7Y%!F7F@~@wNV&Wi zqnpyc*kpE~Jz23n@BnBNVUK%p5%GHVVT96xOB~|%9HsdYNm*#eP#p5mpUu$5aeinq z?V(ikfm~>7Fr4g|aGcSI=k&<3L;0y_8vn` zN4Mm6(%6;3$?OeDbba`+obQ+U?AG_lF_{r?9kM@2y4S?Gg7|QGJwj*v91zwv6bqtT zhE+5JZpnv)klzEJd&*JwbOU9j+>>uZWg8`#rTKn7`g4Ahgbz9d?s`yIt5_O56ibJ6 zI;=&zuG>)E?>Oo=N{d$PrThjo?iuysC&6LpwnG(7Pvrhpw&yH%V$?!~+ZklW&Mfb1 zF*MEG1i3^Za2mnl?(*9ltmpEYq)#A+GlW17KVM2yN5X_7QIcZ4iDWPfR zNW55#D!jROQKH}(Ad)Syt%lxuG03=W^wWTKo4mg9lyWv@L?iO2GV(Ty;w-Z zvj4CE(=#?%@xRA}KZ3-EnSu8(EZe&YgK{Y(hq+*+G`{?UAOBihRp!aNU0-C^Bk%AQ zoRyi&IM?|zbNi&Mb;qkY-?h*~^)ds#=3V6b2aLw?Khvx)c)d}Y_{iIC$&14JJ#Sj1 zom;a?o054)xj8tQFp-7Zn7P>8fjWmy`DE7X>fnDn`K=E`R?N)Eyr3hAxkc$;&fcZ; zdqtEc{fh{R`vndf5R^I0cwCLR=7|aTFJg$)IbH(r9U-GWqul`9NQA#b3BQh+eh)(H zp-Kw?dBdZ8qHee23$@@qf#B>i;ei0gf7qpalQZISZ_80~g z7O`Dd5`kqE@r$K zz?>XLfEN*#^|vu}il{f+UAM68-7GJVAVs!<^}}*gdgLRkrzu5?*tM$ffr>KI5R8*n zQ9qa<1DUz!bb15A&w`u1=DxVsWE}1%Cs+)2`=NNmX=gtL_%b8@ zu9A@=p1!S0`m|QgJ7_*sF*gg^ovt*@CU*4=FvX0J@GgeW4=U5AbEivx~0+fOqkxAm#87EE}SIP$N)#mr^^AndEyV zD}D+^e)4^&VMw~*l3+>KFabD0g{;g&;5<=b>9ZiIXQHy7@lfUFCjSJg$h^Hvmb489 z0R>ro9FWNbF*l?j4%B&cj=fRpzV1)U2^>As{trs0f515aoqj+`I=@8eyrsNJ%}ZY4 za%|X2-7GCS57ZmcV`oCNA3Y}#fj7=^c=RY8VZxx2g#Us+$__wzhYy;)v_pXDh6(R$ zc6sK||Hm;jF1!bpeQ{9$2wDf4IVww3<~htdOVX4x<0Sr6c$>e5uLU?}Z(-Sc#V&}z zU$!3fLUQ*~^byn3y?DI~P{HYO{mkD(mFkIHSQaY}j38(*foPP5CEn_yK2Scoxnjw& zIrO1AO}Frcw%-HVJg!ihHV=%TEvmBPYBe{qTKy_ibx~7c>8dVj13|@-WD6pCAFhBp z72adK5=>B{I+UImM{<*D#K8Sf^=5Mzg2P#si24SE()CCeSiy>+hKR}*rF%ii$|R|6 z@08uj1xDnD>N%dOvUOr~j{gcGBKSH##j*)W5O6edRZ8v+%*gHKH2t)C+~q$)s3RWC zM~)>O>cXIcBH5a>+YVfd3qJCCy3zfNpF-DxLKEpMa~M7nrFFCmtROMU>2R^kjUbk< zLZ#1K_;6TvffZN}XIXnx7VBA+S(fiMNzb_8mkV(&Awx^DHNwJtG2+LhO)b0;z4Rm9 z1N4Il@@1zdL1?a%8_dJtJmrHJ>qWTLV2j9ctCWyK)%p4t{(aVr7WV_BLm~JR0V4>M zZAJ??g7c&e(S+WwtfiGVX7u}la`JjY-r@mWs3d1>~)I0z_6!EibeZ5 z=N`wQ`hxh?r+$9|*(8fnbc`*VO}Ze0utBEz$|9v{Ub)JQjecw=QpNVj?SvftAP0nJ z9<#`g_;+IHBq#{Q{0+&}g0CM6?VA+s*Dyo7mm*P|Jy8hQJV62hLDj;t9~5yQ1h%r` z@c?qO&iPR96KW{-ZiM+W&=IE1l+&_ExF7=kfplbrV*F+{O?8Bz)Kljv&cyq2MM;n! ze5(EpAcF1VGeZEHix8vkmQbW!-@=2KP5+wXrQC7(}ZdYTUsj#sr@34?>HSV;? zm@ABS25@q}0qlRhp}lphD@=Rq+woVI=m&t)1@ZylbXR23oAU=^U73F=SbQqjk9HZp z75uO9D{RYLj_wKn>qcQNw>iIcf{viCf71CZ={5HKUC-xwE%;J^QSI`nUb>QfQgq@# literal 0 HcmV?d00001 diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/Resources.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/Resources.php new file mode 100644 index 0000000000000000000000000000000000000000..f6fc935d67b78b997359dd878f2e670ed34b5dd1 GIT binary patch literal 17721 zcmd5^U2Gdyb`Gf@lZTQljTM__k_|J75hsnQSV_8DCE0|OsGmdMS;E*=<7cFv1p4TPyNolcm7CP8Z&NC zKUn0<+;i_a_uTLN4&QmNcif{Fvm0i|v}%so$R3_%ontfGv${^V-fd?O`$tEnm92MA zdabr;<+9neQg*jg%@)_TsxM%u-R)a-b0ypCcAIT;sow7P8%ya||W(`~8RneV7uLeZfmOARF! zb^rOn`;N=Id_e!|8qGlW@0*q_#Hrn**?O(rHcr$rNngswZl;#s&qZ2mE=Vi43PSF2 z+k8s9O)2y9Udu8KUPbz{Ae?atyDa3q?b(cJw`js~+Ua@m==GsTT_q??{4PI<#}{al z&w4tB=aYPKN-I-}PrD%@AsrW#-gPORFZmERYoJmQIHbKvsk&tX$|NHb7cs&sncz|V z9@e5pO-37)BZ974j+|=YqCwizG~2Fqn*CbSH0s@knV!Rtq&80pTtXfLY5uc5@XtB*l_xFMyE+c(A4poR{%CiJ9IMum z*q2TS!rvcR5cI%Z9SsvD33c+rAfZ#(A-ONQ&o1sa^tevP;LaO{s*M^4$ zF$i2^{7h#4^b(POptTda;)8@?n@#Ww#fS;M_Qv7MC!X^^RwUufpHI`m&{geqnt_91 zL#`6Er?Jx1@;Qc1a{IX>?Uts&=j?WlS`8DbghOBfiPI#d(y1r?t(gR z*RTN*g4V9U=1F}voLW=ZkSXm)bVbP+I%UBTZuM#aFvii;@;KnU=Tp&s6QgGWhuodW zb4(<(e)7a6;X{GiX3qp|P|}7z0nrpnrhN*B2%j~sJ4S-$uLAwQu zRPVxTG#f%`6Pa6-3OWNRn)uW_RSG>zQ}=7_zSQO9O8k4V%x84fpE3x!T4>~YaAa!v zyAh>5NSdeAS7=&VY3(X$I|wcJcZ~hr%3g7GYkjM@Hvg11N3^$D+ASKZ`R(obn3kZ) z)y;f$KECpY5A&yV8>ezO;#5n5b8f?hKUoTz6>SY(?I&g(ap{-p)7etH3q!)DaOq3; z;~59Do)3;2!LMfpqJ*pUg&Axa83Lu@Aoa5vCPl<>_7;gTPn*rP$Vth zcn)rbF1ua|l*R719Thyh6>-~KP7oGiuv|)&H03>XEdY8O!t7eg{fp{EDDR7tLRGdJtu};*i+iv{AHZ!&SdPIS4 z)NL8EAo{A(Lc?=%TyipWdHiGLQY|ECT1Hm-+m!UCV^5>jZ?w8b-)bokc!uTzrkSq` zOV7JJrGH5C{+U%#)=P9Pu;Ac{kQAkUgk};xjsDLGnsfI|s*={Gt0Jm(CGJNk@RFN$UAJ5N zgqP&NeKK7a;)fA+$X%9{@OZgnnV-;Xcz;3`_MNbWy%mu|LGe_W@*mSoNP16#yd)^d!=)c3 zs?aROFcZHYk%<6Z23(#lXlwPqjnVv|IJGTG1@=fm(VJiAZ`0_Ev|5YjANT~db($8W zY(OEaSJZV25_uaL?+&}7`p+nH&bb-z+!>Ijv~8O6&ZyA<^C~komOrb1K$i#Bq`~JC zy!kGmUGG}b1&nFe2ZBBU+|m^M*EG!yfEP>`pM1;e_eA_B)+^or$fqJOp7$Cky*nfV zPP~li(u3Xy@Z*smM$9G!Dibx!5p}U5hpM%$QS!LkZb(A2Vp&l$KARY)sNAJ1P!E}q z!(T+sLUJNt%{=G?eb)QAzE6qlMU;lm(bZX=g1GB6@Y)AhmPQrbntIzx%=(rUiCg>P{%F;gmUZZodT{T5vX6vudS7fmC8JE zsJxc17UxsQFHEaPW_bKwd26*eKdZk=)6%HpfjH8qa^FWL|Md6h^1w+($UYYY2h%#2 zz|CMdp{5<2N-RLvVBrT$gFZ{C02=FvzFkb!e-oz#sV@OQTGd`YNS@bf2a44palGV?093$|Wcovfn7;s#s)kb{u?9A+8_NTo{41Jr~kZmRBB- z7&^ZH^dCqf%SqU69+gKKR2~t!eyerBwCi@t8WG0?6EXt+5CTJS#S}T&xyU&(pW$4E zhf89xWAL?leUufjKgjVR58XtCkZnxV7%o70i%IcL!#@QfB#b!;fEIyHlWinY^Rm1g z6{~&HBH73bw+qv#u5zijL?q)TVM=5%@9_!eMC>F^+E6W(ea>X&Z(^+TVa9g7A|h+? zH!C8>(=qK8de##ZHo?ygsv03HpxXaAnm%f^;U3Ejul@;5i48?2f1y$ZC=b{RWI6YD z*NS`FrF+PF#&F=0^4r$#28;$wh<9^>t%Un9-=37Ww~JN&Hl^n&>5D5vS9eNl#qCk> z0b?OR<<4!)=zUp6YW2axyz}^>Q$A`cuH}WpNVthFGPp+0ElyKHpZx=YEn>!uOUE`pQ5HW4$RE5U=RN)H8emHfp{$zL(1&_a+rrCfWWm;Tk z^!sD9XDDTv_ggjxhVWQ~O=B>f;%*g0IlOCpkL!Jc8SPzK^hN|bU}SuAPLfj^mq7`! z7o9}Mk@Wr9$jmKA6+nowT<9BPH%}NxL1&sP=l4xvW)f&oNe8`1!|LOBHLY&HXQQOR zDVV7CA~0bYL^ha)_8wgo(}~)Q5p4F6710X?gdP{GizSJuTJ(<0EsxVY6DXtR${;w{ zdn6Mb7cEEMqlEyUrX`Hxi}d{7W;tIe8aw&wDuRPia1Rd=B{akq(p${$-s8{lm7fE& z&S*IjXoaTMHll);++Y!~Lw`|s3uSW8^uLeOVt};2drhT>(tuYZ9>h_kg6ine_qDQ2 zT5wT93m-QHI54gLF{KAC36&H(_8Q#`?wC>D-!2*(<gH&O;G?~EteRY61loSq(FRNg?E!v8N zmdeC()Rbe{9j+*rXx8qTX8qWWog~)25mh8&tfa-89?SeT=2tV-97}ZYvfEn6k#tfy(vumA-goqq6s~{#Tc1VW=+>DPm1D zPr-e#y>3huxkrWEJoj+5&2TrTC~eSD?K5bL{Q!%VM=xs5X}$JYUX0^30BCJfD$q}) zIys^y<15^WROUt`Ma`tNq{c6gbQy_#-lfwOHESVAuSzOI0yw0rfnEeYbCv`R)!-Yo zJ>G9}*z##8R(?h|>Onx3ExM|~HprJOEIr|#UF-~ZsCs?2ehzaf-0gm$twPOZ4q+NP z#=IJZv{d8QD3IEj2^BrQaY1F5EedP1ab%i}!&?1QW&EOQqSWbiHP|bn{36b1&4k@s zXt7;D7XmrXmeMCK#l0ZPM9KIOYq2v9trlj>UbOJQ_tr@SBz?^#U+-0LhsT1 z(6|@qxz$p+TwJa0B8_isqc*TTkS#(2Xtz`~)MIexkyYA5!C(vi{XOq;98S*c`hM`z zg#O2IdU_<3ULTxlD~a5e|c7gqJUz0!xDI1&wlqMg)dhe-GVj`@^v0Vg4v_u!qV z2)sHZfkBD98YhxLDl>k>w6-g(hS>YL4xtjFNa`+F_ZJy8SU@QfF5%0M#4rv7J) zGLJSG+`%2NL+9^u3;;36YGenR&EZI!^?$?mPOwpUz=CPd(&B)Pl&>2}_8}5~r$uBK z*Z*|_Zs}^k=AH9S3FodH)9aCcK(qV}k%#czZJ;-&Z$6HA7$Q!Zt749dnnI$)2tKsV z&;}kHJmH0ep-Nb4VZ9Vq2{qR6q6%c}C0k{pTjAClcvE4BnG1aF#|OJ#PSCZWYy*iX zxCOy>{=oYJ^1Tm{3@p6*b^hRGy5TF*pdTEd2$yAnF1hdHaM+T>B|YS-1*VaZQ{d_f z^0|RGdLS0@X07*X51X4L);r0`IH9XgCJm<>G%35317jc@r(=s27N#QBA2n0j@zO zxa}=)+eSdd?2OkCiE}A<3BFnwSTP553A8dVhC?H$3}+W*qGdZG@aAQt#uO z1I^5D<8)=jb-Y!)h*^E4g({*3tNhu*^4Iw#y7g!b195NYo*W6_`YBxr^CgPe3Vw_y z$yS(EQM=oGO5Y(Z#HzRssC*tRK|A@fY9caZi8qW~8qF0@5!l|syEEece5^2sx8Ot< zvvi*ezndZ)?vrSI6z0&pEMB&@At0x_7yHPN?`pfRq2o=PW_NVQ?GlnE_!$Un&@htp z4&Q#n^}mbX*bu)6krTfNfgno^U&XO7tu6KQ61h9K|HXaoK>c)t``Z!WClB!B5f9@x zCCQZ)K@)#Q5nWlqqj}`lA5UepN>l&@$AkI?JPcknlmeeU%>P>~qWRT67%_j4=)fFj zO99iwg&Fv+>W#rOjTi8ZUz9p$f`|FW#hEqj{iv&8w@aq(z=;3l>~Igoogle.cloud.contactcenterinsights.v1.Analysis + */ +class Analysis extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of the analysis. + * Format: + * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The time at which the analysis was requested. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $request_time = null; + /** + * Output only. The time at which the analysis was created, which occurs when + * the long-running operation completes. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The result of the analysis, which is populated when the + * analysis finishes. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult analysis_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $analysis_result = null; + /** + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; + */ + protected $annotator_selector = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of the analysis. + * Format: + * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} + * @type \Google\Protobuf\Timestamp $request_time + * Output only. The time at which the analysis was requested. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the analysis was created, which occurs when + * the long-running operation completes. + * @type \Google\Cloud\ContactCenterInsights\V1\AnalysisResult $analysis_result + * Output only. The result of the analysis, which is populated when the + * analysis finishes. + * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $annotator_selector + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of the analysis. + * Format: + * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} + * + * 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 analysis. + * Format: + * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} + * + * 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; + } + + /** + * Output only. The time at which the analysis was requested. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * Output only. The time at which the analysis was requested. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * Output only. The time at which the analysis was created, which occurs when + * the long-running operation completes. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which the analysis was created, which occurs when + * the long-running operation completes. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 result of the analysis, which is populated when the + * analysis finishes. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult analysis_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ContactCenterInsights\V1\AnalysisResult|null + */ + public function getAnalysisResult() + { + return $this->analysis_result; + } + + public function hasAnalysisResult() + { + return isset($this->analysis_result); + } + + public function clearAnalysisResult() + { + unset($this->analysis_result); + } + + /** + * Output only. The result of the analysis, which is populated when the + * analysis finishes. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult analysis_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ContactCenterInsights\V1\AnalysisResult $var + * @return $this + */ + public function setAnalysisResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnalysisResult::class); + $this->analysis_result = $var; + + return $this; + } + + /** + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; + * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector|null + */ + public function getAnnotatorSelector() + { + return $this->annotator_selector; + } + + public function hasAnnotatorSelector() + { + return isset($this->annotator_selector); + } + + public function clearAnnotatorSelector() + { + unset($this->annotator_selector); + } + + /** + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; + * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $var + * @return $this + */ + public function setAnnotatorSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector::class); + $this->annotator_selector = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult.php new file mode 100644 index 000000000000..f3f49c60cfdc --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult.php @@ -0,0 +1,119 @@ +google.cloud.contactcenterinsights.v1.AnalysisResult + */ +class AnalysisResult extends \Google\Protobuf\Internal\Message +{ + /** + * The time at which the analysis ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 1; + */ + protected $end_time = null; + protected $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\AnalysisResult\CallAnalysisMetadata $call_analysis_metadata + * Call-specific metadata created by the analysis. + * @type \Google\Protobuf\Timestamp $end_time + * The time at which the analysis ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Call-specific metadata created by the analysis. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata call_analysis_metadata = 2; + * @return \Google\Cloud\ContactCenterInsights\V1\AnalysisResult\CallAnalysisMetadata|null + */ + public function getCallAnalysisMetadata() + { + return $this->readOneof(2); + } + + public function hasCallAnalysisMetadata() + { + return $this->hasOneof(2); + } + + /** + * Call-specific metadata created by the analysis. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata call_analysis_metadata = 2; + * @param \Google\Cloud\ContactCenterInsights\V1\AnalysisResult\CallAnalysisMetadata $var + * @return $this + */ + public function setCallAnalysisMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnalysisResult\CallAnalysisMetadata::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The time at which the analysis ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 1; + * @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 at which the analysis ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getMetadata() + { + return $this->whichOneof("metadata"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult/CallAnalysisMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult/CallAnalysisMetadata.php new file mode 100644 index 000000000000..fbd877ddba3e --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult/CallAnalysisMetadata.php @@ -0,0 +1,250 @@ +google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + */ +class CallAnalysisMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * A list of call annotations that apply to this call. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CallAnnotation annotations = 2; + */ + private $annotations; + /** + * All the entities in the call. + * + * Generated from protobuf field map entities = 3; + */ + private $entities; + /** + * Overall conversation-level sentiment for each channel of the call. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.ConversationLevelSentiment sentiments = 4; + */ + private $sentiments; + /** + * All the matched intents in the call. + * + * Generated from protobuf field map intents = 6; + */ + private $intents; + /** + * All the matched phrase matchers in the call. + * + * Generated from protobuf field map phrase_matchers = 7; + */ + private $phrase_matchers; + /** + * Overall conversation-level issue modeling result. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelResult issue_model_result = 8; + */ + protected $issue_model_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ContactCenterInsights\V1\CallAnnotation>|\Google\Protobuf\Internal\RepeatedField $annotations + * A list of call annotations that apply to this call. + * @type array|\Google\Protobuf\Internal\MapField $entities + * 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 array|\Google\Protobuf\Internal\MapField $intents + * All the matched intents in the call. + * @type array|\Google\Protobuf\Internal\MapField $phrase_matchers + * All the matched phrase matchers in the call. + * @type \Google\Cloud\ContactCenterInsights\V1\IssueModelResult $issue_model_result + * Overall conversation-level issue modeling result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A list of call annotations that apply to this call. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CallAnnotation annotations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * A list of call annotations that apply to this call. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CallAnnotation annotations = 2; + * @param array<\Google\Cloud\ContactCenterInsights\V1\CallAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\CallAnnotation::class); + $this->annotations = $arr; + + return $this; + } + + /** + * All the entities in the call. + * + * Generated from protobuf field map entities = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * All the entities in the call. + * + * Generated from protobuf field map entities = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * Overall conversation-level sentiment for each channel of the call. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.ConversationLevelSentiment sentiments = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSentiments() + { + return $this->sentiments; + } + + /** + * Overall conversation-level sentiment for each channel of the call. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.ConversationLevelSentiment sentiments = 4; + * @param array<\Google\Cloud\ContactCenterInsights\V1\ConversationLevelSentiment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSentiments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\ConversationLevelSentiment::class); + $this->sentiments = $arr; + + return $this; + } + + /** + * All the matched intents in the call. + * + * Generated from protobuf field map intents = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getIntents() + { + return $this->intents; + } + + /** + * All the matched intents in the call. + * + * Generated from protobuf field map intents = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setIntents($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Intent::class); + $this->intents = $arr; + + return $this; + } + + /** + * All the matched phrase matchers in the call. + * + * Generated from protobuf field map phrase_matchers = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getPhraseMatchers() + { + return $this->phrase_matchers; + } + + /** + * All the matched phrase matchers in the call. + * + * Generated from protobuf field map phrase_matchers = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setPhraseMatchers($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData::class); + $this->phrase_matchers = $arr; + + return $this; + } + + /** + * Overall conversation-level issue modeling result. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelResult issue_model_result = 8; + * @return \Google\Cloud\ContactCenterInsights\V1\IssueModelResult|null + */ + public function getIssueModelResult() + { + return $this->issue_model_result; + } + + public function hasIssueModelResult() + { + return isset($this->issue_model_result); + } + + public function clearIssueModelResult() + { + unset($this->issue_model_result); + } + + /** + * Overall conversation-level issue modeling result. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelResult issue_model_result = 8; + * @param \Google\Cloud\ContactCenterInsights\V1\IssueModelResult $var + * @return $this + */ + public function setIssueModelResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModelResult::class); + $this->issue_model_result = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CallAnalysisMetadata::class, \Google\Cloud\ContactCenterInsights\V1\AnalysisResult_CallAnalysisMetadata::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotationBoundary.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotationBoundary.php new file mode 100644 index 000000000000..f36dc2dfdf24 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotationBoundary.php @@ -0,0 +1,116 @@ +google.cloud.contactcenterinsights.v1.AnnotationBoundary + */ +class AnnotationBoundary extends \Google\Protobuf\Internal\Message +{ + /** + * The index in the sequence of transcribed pieces of the conversation where + * the boundary is located. This index starts at zero. + * + * Generated from protobuf field int32 transcript_index = 1; + */ + protected $transcript_index = 0; + protected $detailed_boundary; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $word_index + * The word index of this boundary with respect to the first word in the + * transcript piece. This index starts at zero. + * @type int $transcript_index + * The index in the sequence of transcribed pieces of the conversation where + * the boundary is located. This index starts at zero. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The word index of this boundary with respect to the first word in the + * transcript piece. This index starts at zero. + * + * Generated from protobuf field int32 word_index = 3; + * @return int + */ + public function getWordIndex() + { + return $this->readOneof(3); + } + + public function hasWordIndex() + { + return $this->hasOneof(3); + } + + /** + * The word index of this boundary with respect to the first word in the + * transcript piece. This index starts at zero. + * + * Generated from protobuf field int32 word_index = 3; + * @param int $var + * @return $this + */ + public function setWordIndex($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The index in the sequence of transcribed pieces of the conversation where + * the boundary is located. This index starts at zero. + * + * Generated from protobuf field int32 transcript_index = 1; + * @return int + */ + public function getTranscriptIndex() + { + return $this->transcript_index; + } + + /** + * The index in the sequence of transcribed pieces of the conversation where + * the boundary is located. This index starts at zero. + * + * Generated from protobuf field int32 transcript_index = 1; + * @param int $var + * @return $this + */ + public function setTranscriptIndex($var) + { + GPBUtil::checkInt32($var); + $this->transcript_index = $var; + + return $this; + } + + /** + * @return string + */ + public function getDetailedBoundary() + { + return $this->whichOneof("detailed_boundary"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector.php new file mode 100644 index 000000000000..d2548d2c4a3f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector.php @@ -0,0 +1,453 @@ +google.cloud.contactcenterinsights.v1.AnnotatorSelector + */ +class AnnotatorSelector extends \Google\Protobuf\Internal\Message +{ + /** + * Whether to run the interruption annotator. + * + * Generated from protobuf field bool run_interruption_annotator = 1; + */ + protected $run_interruption_annotator = false; + /** + * Whether to run the silence annotator. + * + * Generated from protobuf field bool run_silence_annotator = 2; + */ + protected $run_silence_annotator = false; + /** + * Whether to run the active phrase matcher annotator(s). + * + * Generated from protobuf field bool run_phrase_matcher_annotator = 3; + */ + protected $run_phrase_matcher_annotator = false; + /** + * The list of phrase matchers to run. If not provided, all active phrase + * matchers will be used. If inactive phrase matchers are provided, they will + * not be used. Phrase matchers will be run only if + * run_phrase_matcher_annotator is set to true. Format: + * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * + * Generated from protobuf field repeated string phrase_matchers = 4 [(.google.api.resource_reference) = { + */ + private $phrase_matchers; + /** + * Whether to run the sentiment annotator. + * + * Generated from protobuf field bool run_sentiment_annotator = 5; + */ + protected $run_sentiment_annotator = false; + /** + * Whether to run the entity annotator. + * + * Generated from protobuf field bool run_entity_annotator = 6; + */ + protected $run_entity_annotator = false; + /** + * Whether to run the intent annotator. + * + * Generated from protobuf field bool run_intent_annotator = 7; + */ + protected $run_intent_annotator = false; + /** + * Whether to run the issue model annotator. A model should have already been + * deployed for this to take effect. + * + * Generated from protobuf field bool run_issue_model_annotator = 8; + */ + protected $run_issue_model_annotator = false; + /** + * The issue model to run. If not provided, the most recently deployed topic + * model will be used. The provided issue model will only be used for + * inference if the issue model is deployed and if run_issue_model_annotator + * is set to true. If more than one issue model is provided, only the first + * provided issue model will be used for inference. + * + * Generated from protobuf field repeated string issue_models = 10 [(.google.api.resource_reference) = { + */ + private $issue_models; + /** + * Whether to run the summarization annotator. + * + * Generated from protobuf field bool run_summarization_annotator = 9; + */ + protected $run_summarization_annotator = false; + /** + * Configuration for the summarization annotator. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig summarization_config = 11; + */ + protected $summarization_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $run_interruption_annotator + * Whether to run the interruption annotator. + * @type bool $run_silence_annotator + * Whether to run the silence annotator. + * @type bool $run_phrase_matcher_annotator + * Whether to run the active phrase matcher annotator(s). + * @type array|\Google\Protobuf\Internal\RepeatedField $phrase_matchers + * The list of phrase matchers to run. If not provided, all active phrase + * matchers will be used. If inactive phrase matchers are provided, they will + * not be used. Phrase matchers will be run only if + * run_phrase_matcher_annotator is set to true. Format: + * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * @type bool $run_sentiment_annotator + * Whether to run the sentiment annotator. + * @type bool $run_entity_annotator + * Whether to run the entity annotator. + * @type bool $run_intent_annotator + * Whether to run the intent annotator. + * @type bool $run_issue_model_annotator + * Whether to run the issue model annotator. A model should have already been + * deployed for this to take effect. + * @type array|\Google\Protobuf\Internal\RepeatedField $issue_models + * The issue model to run. If not provided, the most recently deployed topic + * model will be used. The provided issue model will only be used for + * inference if the issue model is deployed and if run_issue_model_annotator + * is set to true. If more than one issue model is provided, only the first + * provided issue model will be used for inference. + * @type bool $run_summarization_annotator + * Whether to run the summarization annotator. + * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig $summarization_config + * Configuration for the summarization annotator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Whether to run the interruption annotator. + * + * Generated from protobuf field bool run_interruption_annotator = 1; + * @return bool + */ + public function getRunInterruptionAnnotator() + { + return $this->run_interruption_annotator; + } + + /** + * Whether to run the interruption annotator. + * + * Generated from protobuf field bool run_interruption_annotator = 1; + * @param bool $var + * @return $this + */ + public function setRunInterruptionAnnotator($var) + { + GPBUtil::checkBool($var); + $this->run_interruption_annotator = $var; + + return $this; + } + + /** + * Whether to run the silence annotator. + * + * Generated from protobuf field bool run_silence_annotator = 2; + * @return bool + */ + public function getRunSilenceAnnotator() + { + return $this->run_silence_annotator; + } + + /** + * Whether to run the silence annotator. + * + * Generated from protobuf field bool run_silence_annotator = 2; + * @param bool $var + * @return $this + */ + public function setRunSilenceAnnotator($var) + { + GPBUtil::checkBool($var); + $this->run_silence_annotator = $var; + + return $this; + } + + /** + * Whether to run the active phrase matcher annotator(s). + * + * Generated from protobuf field bool run_phrase_matcher_annotator = 3; + * @return bool + */ + public function getRunPhraseMatcherAnnotator() + { + return $this->run_phrase_matcher_annotator; + } + + /** + * Whether to run the active phrase matcher annotator(s). + * + * Generated from protobuf field bool run_phrase_matcher_annotator = 3; + * @param bool $var + * @return $this + */ + public function setRunPhraseMatcherAnnotator($var) + { + GPBUtil::checkBool($var); + $this->run_phrase_matcher_annotator = $var; + + return $this; + } + + /** + * The list of phrase matchers to run. If not provided, all active phrase + * matchers will be used. If inactive phrase matchers are provided, they will + * not be used. Phrase matchers will be run only if + * run_phrase_matcher_annotator is set to true. Format: + * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * + * Generated from protobuf field repeated string phrase_matchers = 4 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPhraseMatchers() + { + return $this->phrase_matchers; + } + + /** + * The list of phrase matchers to run. If not provided, all active phrase + * matchers will be used. If inactive phrase matchers are provided, they will + * not be used. Phrase matchers will be run only if + * run_phrase_matcher_annotator is set to true. Format: + * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * + * Generated from protobuf field repeated string phrase_matchers = 4 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPhraseMatchers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->phrase_matchers = $arr; + + return $this; + } + + /** + * Whether to run the sentiment annotator. + * + * Generated from protobuf field bool run_sentiment_annotator = 5; + * @return bool + */ + public function getRunSentimentAnnotator() + { + return $this->run_sentiment_annotator; + } + + /** + * Whether to run the sentiment annotator. + * + * Generated from protobuf field bool run_sentiment_annotator = 5; + * @param bool $var + * @return $this + */ + public function setRunSentimentAnnotator($var) + { + GPBUtil::checkBool($var); + $this->run_sentiment_annotator = $var; + + return $this; + } + + /** + * Whether to run the entity annotator. + * + * Generated from protobuf field bool run_entity_annotator = 6; + * @return bool + */ + public function getRunEntityAnnotator() + { + return $this->run_entity_annotator; + } + + /** + * Whether to run the entity annotator. + * + * Generated from protobuf field bool run_entity_annotator = 6; + * @param bool $var + * @return $this + */ + public function setRunEntityAnnotator($var) + { + GPBUtil::checkBool($var); + $this->run_entity_annotator = $var; + + return $this; + } + + /** + * Whether to run the intent annotator. + * + * Generated from protobuf field bool run_intent_annotator = 7; + * @return bool + */ + public function getRunIntentAnnotator() + { + return $this->run_intent_annotator; + } + + /** + * Whether to run the intent annotator. + * + * Generated from protobuf field bool run_intent_annotator = 7; + * @param bool $var + * @return $this + */ + public function setRunIntentAnnotator($var) + { + GPBUtil::checkBool($var); + $this->run_intent_annotator = $var; + + return $this; + } + + /** + * Whether to run the issue model annotator. A model should have already been + * deployed for this to take effect. + * + * Generated from protobuf field bool run_issue_model_annotator = 8; + * @return bool + */ + public function getRunIssueModelAnnotator() + { + return $this->run_issue_model_annotator; + } + + /** + * Whether to run the issue model annotator. A model should have already been + * deployed for this to take effect. + * + * Generated from protobuf field bool run_issue_model_annotator = 8; + * @param bool $var + * @return $this + */ + public function setRunIssueModelAnnotator($var) + { + GPBUtil::checkBool($var); + $this->run_issue_model_annotator = $var; + + return $this; + } + + /** + * The issue model to run. If not provided, the most recently deployed topic + * model will be used. The provided issue model will only be used for + * inference if the issue model is deployed and if run_issue_model_annotator + * is set to true. If more than one issue model is provided, only the first + * provided issue model will be used for inference. + * + * Generated from protobuf field repeated string issue_models = 10 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIssueModels() + { + return $this->issue_models; + } + + /** + * The issue model to run. If not provided, the most recently deployed topic + * model will be used. The provided issue model will only be used for + * inference if the issue model is deployed and if run_issue_model_annotator + * is set to true. If more than one issue model is provided, only the first + * provided issue model will be used for inference. + * + * Generated from protobuf field repeated string issue_models = 10 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIssueModels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->issue_models = $arr; + + return $this; + } + + /** + * Whether to run the summarization annotator. + * + * Generated from protobuf field bool run_summarization_annotator = 9; + * @return bool + */ + public function getRunSummarizationAnnotator() + { + return $this->run_summarization_annotator; + } + + /** + * Whether to run the summarization annotator. + * + * Generated from protobuf field bool run_summarization_annotator = 9; + * @param bool $var + * @return $this + */ + public function setRunSummarizationAnnotator($var) + { + GPBUtil::checkBool($var); + $this->run_summarization_annotator = $var; + + return $this; + } + + /** + * Configuration for the summarization annotator. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig summarization_config = 11; + * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig|null + */ + public function getSummarizationConfig() + { + return $this->summarization_config; + } + + public function hasSummarizationConfig() + { + return isset($this->summarization_config); + } + + public function clearSummarizationConfig() + { + unset($this->summarization_config); + } + + /** + * Configuration for the summarization annotator. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig summarization_config = 11; + * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig $var + * @return $this + */ + public function setSummarizationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig::class); + $this->summarization_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig.php new file mode 100644 index 000000000000..b050ddc9554a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig.php @@ -0,0 +1,117 @@ +google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + */ +class SummarizationConfig extends \Google\Protobuf\Internal\Message +{ + protected $model_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_profile + * Resource name of the Dialogflow conversation profile. + * Format: + * projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} + * @type int $summarization_model + * Default summarization model to be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the Dialogflow conversation profile. + * Format: + * projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} + * + * Generated from protobuf field string conversation_profile = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getConversationProfile() + { + return $this->readOneof(1); + } + + public function hasConversationProfile() + { + return $this->hasOneof(1); + } + + /** + * Resource name of the Dialogflow conversation profile. + * Format: + * projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} + * + * Generated from protobuf field string conversation_profile = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setConversationProfile($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Default summarization model to be used. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel summarization_model = 2; + * @return int + */ + public function getSummarizationModel() + { + return $this->readOneof(2); + } + + public function hasSummarizationModel() + { + return $this->hasOneof(2); + } + + /** + * Default summarization model to be used. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel summarization_model = 2; + * @param int $var + * @return $this + */ + public function setSummarizationModel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig\SummarizationModel::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getModelSource() + { + return $this->whichOneof("model_source"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SummarizationConfig::class, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector_SummarizationConfig::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php new file mode 100644 index 000000000000..e086c9ea930b --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php @@ -0,0 +1,57 @@ +google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel + */ +class SummarizationModel +{ + /** + * Unspecified summarization model. + * + * Generated from protobuf enum SUMMARIZATION_MODEL_UNSPECIFIED = 0; + */ + const SUMMARIZATION_MODEL_UNSPECIFIED = 0; + /** + * The CCAI baseline model. + * + * Generated from protobuf enum BASELINE_MODEL = 1; + */ + const BASELINE_MODEL = 1; + + private static $valueToName = [ + self::SUMMARIZATION_MODEL_UNSPECIFIED => 'SUMMARIZATION_MODEL_UNSPECIFIED', + self::BASELINE_MODEL => 'BASELINE_MODEL', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SummarizationModel::class, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector_SummarizationConfig_SummarizationModel::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback.php new file mode 100644 index 000000000000..213afb4ccc53 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback.php @@ -0,0 +1,140 @@ +google.cloud.contactcenterinsights.v1.AnswerFeedback + */ +class AnswerFeedback extends \Google\Protobuf\Internal\Message +{ + /** + * The correctness level of an answer. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel correctness_level = 1; + */ + protected $correctness_level = 0; + /** + * Indicates whether an answer or item was clicked by the human agent. + * + * Generated from protobuf field bool clicked = 2; + */ + protected $clicked = false; + /** + * Indicates whether an answer or item was displayed to the human agent in the + * agent desktop UI. + * + * Generated from protobuf field bool displayed = 3; + */ + protected $displayed = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $correctness_level + * The correctness level of an answer. + * @type bool $clicked + * Indicates whether an answer or item was clicked by the human agent. + * @type bool $displayed + * Indicates whether an answer or item was displayed to the human agent in the + * agent desktop UI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The correctness level of an answer. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel correctness_level = 1; + * @return int + */ + public function getCorrectnessLevel() + { + return $this->correctness_level; + } + + /** + * The correctness level of an answer. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel correctness_level = 1; + * @param int $var + * @return $this + */ + public function setCorrectnessLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback\CorrectnessLevel::class); + $this->correctness_level = $var; + + return $this; + } + + /** + * Indicates whether an answer or item was clicked by the human agent. + * + * Generated from protobuf field bool clicked = 2; + * @return bool + */ + public function getClicked() + { + return $this->clicked; + } + + /** + * Indicates whether an answer or item was clicked by the human agent. + * + * Generated from protobuf field bool clicked = 2; + * @param bool $var + * @return $this + */ + public function setClicked($var) + { + GPBUtil::checkBool($var); + $this->clicked = $var; + + return $this; + } + + /** + * Indicates whether an answer or item was displayed to the human agent in the + * agent desktop UI. + * + * Generated from protobuf field bool displayed = 3; + * @return bool + */ + public function getDisplayed() + { + return $this->displayed; + } + + /** + * Indicates whether an answer or item was displayed to the human agent in the + * agent desktop UI. + * + * Generated from protobuf field bool displayed = 3; + * @param bool $var + * @return $this + */ + public function setDisplayed($var) + { + GPBUtil::checkBool($var); + $this->displayed = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback/CorrectnessLevel.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback/CorrectnessLevel.php new file mode 100644 index 000000000000..2695eda6c4bd --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback/CorrectnessLevel.php @@ -0,0 +1,71 @@ +google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel + */ +class CorrectnessLevel +{ + /** + * Correctness level unspecified. + * + * Generated from protobuf enum CORRECTNESS_LEVEL_UNSPECIFIED = 0; + */ + const CORRECTNESS_LEVEL_UNSPECIFIED = 0; + /** + * Answer is totally wrong. + * + * Generated from protobuf enum NOT_CORRECT = 1; + */ + const NOT_CORRECT = 1; + /** + * Answer is partially correct. + * + * Generated from protobuf enum PARTIALLY_CORRECT = 2; + */ + const PARTIALLY_CORRECT = 2; + /** + * Answer is fully correct. + * + * Generated from protobuf enum FULLY_CORRECT = 3; + */ + const FULLY_CORRECT = 3; + + private static $valueToName = [ + self::CORRECTNESS_LEVEL_UNSPECIFIED => 'CORRECTNESS_LEVEL_UNSPECIFIED', + self::NOT_CORRECT => 'NOT_CORRECT', + self::PARTIALLY_CORRECT => 'PARTIALLY_CORRECT', + self::FULLY_CORRECT => 'FULLY_CORRECT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CorrectnessLevel::class, \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback_CorrectnessLevel::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ArticleSuggestionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ArticleSuggestionData.php new file mode 100644 index 000000000000..e6fec5e3efb9 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ArticleSuggestionData.php @@ -0,0 +1,265 @@ +google.cloud.contactcenterinsights.v1.ArticleSuggestionData + */ +class ArticleSuggestionData extends \Google\Protobuf\Internal\Message +{ + /** + * Article title. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * Article URI. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * The system's confidence score that this article is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field float confidence_score = 3; + */ + protected $confidence_score = 0.0; + /** + * Map that contains metadata about the Article Suggestion and the document + * that it originates from. + * + * Generated from protobuf field map metadata = 4; + */ + private $metadata; + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 5; + */ + protected $query_record = ''; + /** + * The knowledge document that this answer was extracted from. + * Format: + * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} + * + * Generated from protobuf field string source = 6; + */ + protected $source = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Article title. + * @type string $uri + * Article URI. + * @type float $confidence_score + * The system's confidence score that this article is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Map that contains metadata about the Article Suggestion and the document + * that it originates from. + * @type string $query_record + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * @type string $source + * The knowledge document that this answer was extracted from. + * Format: + * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Article title. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Article title. + * + * Generated from protobuf field string title = 1; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Article URI. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Article URI. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The system's confidence score that this article is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field float confidence_score = 3; + * @return float + */ + public function getConfidenceScore() + { + return $this->confidence_score; + } + + /** + * The system's confidence score that this article is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field float confidence_score = 3; + * @param float $var + * @return $this + */ + public function setConfidenceScore($var) + { + GPBUtil::checkFloat($var); + $this->confidence_score = $var; + + return $this; + } + + /** + * Map that contains metadata about the Article Suggestion and the document + * that it originates from. + * + * Generated from protobuf field map metadata = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Map that contains metadata about the Article Suggestion and the document + * that it originates from. + * + * Generated from protobuf field map metadata = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 5; + * @return string + */ + public function getQueryRecord() + { + return $this->query_record; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 5; + * @param string $var + * @return $this + */ + public function setQueryRecord($var) + { + GPBUtil::checkString($var, True); + $this->query_record = $var; + + return $this; + } + + /** + * The knowledge document that this answer was extracted from. + * Format: + * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} + * + * Generated from protobuf field string source = 6; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * The knowledge document that this answer was extracted from. + * Format: + * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} + * + * Generated from protobuf field string source = 6; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsMetadata.php new file mode 100644 index 000000000000..f93ac9e68a44 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsMetadata.php @@ -0,0 +1,309 @@ +google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + */ +class BulkAnalyzeConversationsMetadata 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 request for bulk analyze. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest request = 3; + */ + protected $request = null; + /** + * The number of requested analyses that have completed successfully so far. + * + * Generated from protobuf field int32 completed_analyses_count = 4; + */ + protected $completed_analyses_count = 0; + /** + * The number of requested analyses that have failed so far. + * + * Generated from protobuf field int32 failed_analyses_count = 5; + */ + protected $failed_analyses_count = 0; + /** + * Total number of analyses requested. Computed by the number of conversations + * returned by `filter` multiplied by `analysis_percentage` in the request. + * + * Generated from protobuf field int32 total_requested_analyses_count = 6; + */ + protected $total_requested_analyses_count = 0; + /** + * Output only. Partial errors during bulk analyze operation that might cause + * the operation output to be incomplete. + * + * Generated from protobuf field repeated .google.rpc.Status partial_errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $partial_errors; + + /** + * 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\BulkAnalyzeConversationsRequest $request + * The original request for bulk analyze. + * @type int $completed_analyses_count + * The number of requested analyses that have completed successfully so far. + * @type int $failed_analyses_count + * The number of requested analyses that have failed so far. + * @type int $total_requested_analyses_count + * Total number of analyses requested. Computed by the number of conversations + * returned by `filter` multiplied by `analysis_percentage` in the request. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors + * Output only. Partial errors during bulk analyze 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); + } + + /** + * 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 request for bulk analyze. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest request = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsRequest|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The original request for bulk analyze. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest request = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsRequest::class); + $this->request = $var; + + return $this; + } + + /** + * The number of requested analyses that have completed successfully so far. + * + * Generated from protobuf field int32 completed_analyses_count = 4; + * @return int + */ + public function getCompletedAnalysesCount() + { + return $this->completed_analyses_count; + } + + /** + * The number of requested analyses that have completed successfully so far. + * + * Generated from protobuf field int32 completed_analyses_count = 4; + * @param int $var + * @return $this + */ + public function setCompletedAnalysesCount($var) + { + GPBUtil::checkInt32($var); + $this->completed_analyses_count = $var; + + return $this; + } + + /** + * The number of requested analyses that have failed so far. + * + * Generated from protobuf field int32 failed_analyses_count = 5; + * @return int + */ + public function getFailedAnalysesCount() + { + return $this->failed_analyses_count; + } + + /** + * The number of requested analyses that have failed so far. + * + * Generated from protobuf field int32 failed_analyses_count = 5; + * @param int $var + * @return $this + */ + public function setFailedAnalysesCount($var) + { + GPBUtil::checkInt32($var); + $this->failed_analyses_count = $var; + + return $this; + } + + /** + * Total number of analyses requested. Computed by the number of conversations + * returned by `filter` multiplied by `analysis_percentage` in the request. + * + * Generated from protobuf field int32 total_requested_analyses_count = 6; + * @return int + */ + public function getTotalRequestedAnalysesCount() + { + return $this->total_requested_analyses_count; + } + + /** + * Total number of analyses requested. Computed by the number of conversations + * returned by `filter` multiplied by `analysis_percentage` in the request. + * + * Generated from protobuf field int32 total_requested_analyses_count = 6; + * @param int $var + * @return $this + */ + public function setTotalRequestedAnalysesCount($var) + { + GPBUtil::checkInt32($var); + $this->total_requested_analyses_count = $var; + + return $this; + } + + /** + * Output only. Partial errors during bulk analyze operation that might cause + * the operation output to be incomplete. + * + * Generated from protobuf field repeated .google.rpc.Status partial_errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartialErrors() + { + return $this->partial_errors; + } + + /** + * Output only. Partial errors during bulk analyze operation that might cause + * the operation output to be incomplete. + * + * Generated from protobuf field repeated .google.rpc.Status partial_errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsRequest.php new file mode 100644 index 000000000000..b73df51d31e4 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsRequest.php @@ -0,0 +1,206 @@ +google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest + */ +class BulkAnalyzeConversationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource to create analyses in. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Filter used to select the subset of conversations to analyze. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Required. Percentage of selected conversation to analyze, between + * [0, 100]. + * + * Generated from protobuf field float analysis_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $analysis_percentage = 0.0; + /** + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; + */ + protected $annotator_selector = null; + + /** + * @param string $parent Required. The parent resource to create analyses in. Please see + * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * @param string $filter Required. Filter used to select the subset of conversations to analyze. + * @param float $analysisPercentage Required. Percentage of selected conversation to analyze, between + * [0, 100]. + * + * @return \Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsRequest + * + * @experimental + */ + public static function build(string $parent, string $filter, float $analysisPercentage): self + { + return (new self()) + ->setParent($parent) + ->setFilter($filter) + ->setAnalysisPercentage($analysisPercentage); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource to create analyses in. + * @type string $filter + * Required. Filter used to select the subset of conversations to analyze. + * @type float $analysis_percentage + * Required. Percentage of selected conversation to analyze, between + * [0, 100]. + * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $annotator_selector + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource to create analyses in. + * + * 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 to create analyses in. + * + * 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; + } + + /** + * Required. Filter used to select the subset of conversations to analyze. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. Filter used to select the subset of conversations to analyze. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Required. Percentage of selected conversation to analyze, between + * [0, 100]. + * + * Generated from protobuf field float analysis_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getAnalysisPercentage() + { + return $this->analysis_percentage; + } + + /** + * Required. Percentage of selected conversation to analyze, between + * [0, 100]. + * + * Generated from protobuf field float analysis_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setAnalysisPercentage($var) + { + GPBUtil::checkFloat($var); + $this->analysis_percentage = $var; + + return $this; + } + + /** + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; + * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector|null + */ + public function getAnnotatorSelector() + { + return $this->annotator_selector; + } + + public function hasAnnotatorSelector() + { + return isset($this->annotator_selector); + } + + public function clearAnnotatorSelector() + { + unset($this->annotator_selector); + } + + /** + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; + * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $var + * @return $this + */ + public function setAnnotatorSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector::class); + $this->annotator_selector = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsResponse.php new file mode 100644 index 000000000000..adccae48897f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsResponse.php @@ -0,0 +1,101 @@ +google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse + */ +class BulkAnalyzeConversationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Count of successful analyses. + * + * Generated from protobuf field int32 successful_analysis_count = 1; + */ + protected $successful_analysis_count = 0; + /** + * Count of failed analyses. + * + * Generated from protobuf field int32 failed_analysis_count = 2; + */ + protected $failed_analysis_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $successful_analysis_count + * Count of successful analyses. + * @type int $failed_analysis_count + * Count of failed analyses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Count of successful analyses. + * + * Generated from protobuf field int32 successful_analysis_count = 1; + * @return int + */ + public function getSuccessfulAnalysisCount() + { + return $this->successful_analysis_count; + } + + /** + * Count of successful analyses. + * + * Generated from protobuf field int32 successful_analysis_count = 1; + * @param int $var + * @return $this + */ + public function setSuccessfulAnalysisCount($var) + { + GPBUtil::checkInt32($var); + $this->successful_analysis_count = $var; + + return $this; + } + + /** + * Count of failed analyses. + * + * Generated from protobuf field int32 failed_analysis_count = 2; + * @return int + */ + public function getFailedAnalysisCount() + { + return $this->failed_analysis_count; + } + + /** + * Count of failed analyses. + * + * Generated from protobuf field int32 failed_analysis_count = 2; + * @param int $var + * @return $this + */ + public function setFailedAnalysisCount($var) + { + GPBUtil::checkInt32($var); + $this->failed_analysis_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsMetadata.php new file mode 100644 index 000000000000..753b1ea23b0e --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsMetadata.php @@ -0,0 +1,203 @@ +google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata + */ +class BulkDeleteConversationsMetadata 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 request for bulk delete. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest request = 3; + */ + protected $request = null; + /** + * Partial errors during bulk delete conversations 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 + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest $request + * The original request for bulk delete. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors + * Partial errors during bulk delete conversations 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); + } + + /** + * 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 request for bulk delete. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest request = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The original request for bulk delete. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest request = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest::class); + $this->request = $var; + + return $this; + } + + /** + * Partial errors during bulk delete conversations 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 bulk delete conversations 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsRequest.php new file mode 100644 index 000000000000..90e90424bd7f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsRequest.php @@ -0,0 +1,203 @@ +google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest + */ +class BulkDeleteConversationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource to delete conversations from. + * Format: + * projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Filter used to select the subset of conversations to delete. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Maximum number of conversations to delete. + * + * Generated from protobuf field int32 max_delete_count = 3; + */ + protected $max_delete_count = 0; + /** + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * + * Generated from protobuf field bool force = 4; + */ + protected $force = false; + + /** + * @param string $parent Required. The parent resource to delete conversations from. + * Format: + * projects/{project}/locations/{location} + * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * @param string $filter Filter used to select the subset of conversations to delete. + * + * @return \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest + * + * @experimental + */ + public static function build(string $parent, string $filter): self + { + return (new self()) + ->setParent($parent) + ->setFilter($filter); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource to delete conversations from. + * Format: + * projects/{project}/locations/{location} + * @type string $filter + * Filter used to select the subset of conversations to delete. + * @type int $max_delete_count + * Maximum number of conversations to delete. + * @type bool $force + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource to delete conversations from. + * Format: + * projects/{project}/locations/{location} + * + * 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 to delete conversations from. + * Format: + * projects/{project}/locations/{location} + * + * 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; + } + + /** + * Filter used to select the subset of conversations to delete. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter used to select the subset of conversations to delete. + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Maximum number of conversations to delete. + * + * Generated from protobuf field int32 max_delete_count = 3; + * @return int + */ + public function getMaxDeleteCount() + { + return $this->max_delete_count; + } + + /** + * Maximum number of conversations to delete. + * + * Generated from protobuf field int32 max_delete_count = 3; + * @param int $var + * @return $this + */ + public function setMaxDeleteCount($var) + { + GPBUtil::checkInt32($var); + $this->max_delete_count = $var; + + return $this; + } + + /** + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * + * Generated from protobuf field bool force = 4; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * + * Generated from protobuf field bool force = 4; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsResponse.php new file mode 100644 index 000000000000..ca52f6da6873 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsResponse.php @@ -0,0 +1,33 @@ +google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse + */ +class BulkDeleteConversationsResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsRequest.php new file mode 100644 index 000000000000..8daa93a4a679 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + */ +class CalculateIssueModelStatsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the issue model to query against. + * + * Generated from protobuf field string issue_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $issue_model = ''; + + /** + * @param string $issueModel Required. The resource name of the issue model to query against. Please see + * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\CalculateIssueModelStatsRequest + * + * @experimental + */ + public static function build(string $issueModel): self + { + return (new self()) + ->setIssueModel($issueModel); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issue_model + * Required. The resource name of the issue model to query against. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the issue model to query against. + * + * Generated from protobuf field string issue_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getIssueModel() + { + return $this->issue_model; + } + + /** + * Required. The resource name of the issue model to query against. + * + * Generated from protobuf field string issue_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIssueModel($var) + { + GPBUtil::checkString($var, True); + $this->issue_model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsResponse.php new file mode 100644 index 000000000000..932814766c92 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsResponse.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + */ +class CalculateIssueModelStatsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The latest label statistics for the queried issue model. Includes results + * on both training data and data labeled after deployment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats current_stats = 4; + */ + protected $current_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats $current_stats + * The latest label statistics for the queried issue model. Includes results + * on both training data and data labeled after deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The latest label statistics for the queried issue model. Includes results + * on both training data and data labeled after deployment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats current_stats = 4; + * @return \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats|null + */ + public function getCurrentStats() + { + return $this->current_stats; + } + + public function hasCurrentStats() + { + return isset($this->current_stats); + } + + public function clearCurrentStats() + { + unset($this->current_stats); + } + + /** + * The latest label statistics for the queried issue model. Includes results + * on both training data and data labeled after deployment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats current_stats = 4; + * @param \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats $var + * @return $this + */ + public function setCurrentStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats::class); + $this->current_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsRequest.php new file mode 100644 index 000000000000..5f422bb77f78 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsRequest.php @@ -0,0 +1,119 @@ +google.cloud.contactcenterinsights.v1.CalculateStatsRequest + */ +class CalculateStatsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location of the conversations. + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + /** + * A filter to reduce results to a specific subset. This field is useful for + * getting statistics about conversations with specific properties. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + + /** + * @param string $location Required. The location of the conversations. Please see + * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\CalculateStatsRequest + * + * @experimental + */ + public static function build(string $location): self + { + return (new self()) + ->setLocation($location); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Required. The location of the conversations. + * @type string $filter + * A filter to reduce results to a specific subset. This field is useful for + * getting statistics about conversations with specific properties. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location of the conversations. + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The location of the conversations. + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * A filter to reduce results to a specific subset. This field is useful for + * getting statistics about conversations with specific properties. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter to reduce results to a specific subset. This field is useful for + * getting statistics about conversations with specific properties. + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse.php new file mode 100644 index 000000000000..973f3b649b1e --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse.php @@ -0,0 +1,366 @@ +google.cloud.contactcenterinsights.v1.CalculateStatsResponse + */ +class CalculateStatsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The average duration of all conversations. The average is calculated using + * only conversations that have a time duration. + * + * Generated from protobuf field .google.protobuf.Duration average_duration = 1; + */ + protected $average_duration = null; + /** + * The average number of turns per conversation. + * + * Generated from protobuf field int32 average_turn_count = 2; + */ + protected $average_turn_count = 0; + /** + * The total number of conversations. + * + * Generated from protobuf field int32 conversation_count = 3; + */ + protected $conversation_count = 0; + /** + * A map associating each smart highlighter display name with its respective + * number of matches in the set of conversations. + * + * Generated from protobuf field map smart_highlighter_matches = 4; + */ + private $smart_highlighter_matches; + /** + * A map associating each custom highlighter resource name with its respective + * number of matches in the set of conversations. + * + * Generated from protobuf field map custom_highlighter_matches = 5; + */ + private $custom_highlighter_matches; + /** + * A map associating each issue resource name with its respective number of + * matches in the set of conversations. Key has the format: + * `projects//locations//issueModels//issues/` + * Deprecated, use `issue_matches_stats` field instead. + * + * Generated from protobuf field map issue_matches = 6 [deprecated = true]; + * @deprecated + */ + private $issue_matches; + /** + * A map associating each issue resource name with its respective number of + * matches in the set of conversations. Key has the format: + * `projects//locations//issueModels//issues/` + * + * Generated from protobuf field map issue_matches_stats = 8; + */ + private $issue_matches_stats; + /** + * A time series representing the count of conversations created over time + * that match that requested filter criteria. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries conversation_count_time_series = 7; + */ + protected $conversation_count_time_series = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $average_duration + * The average duration of all conversations. The average is calculated using + * only conversations that have a time duration. + * @type int $average_turn_count + * The average number of turns per conversation. + * @type int $conversation_count + * The total number of conversations. + * @type array|\Google\Protobuf\Internal\MapField $smart_highlighter_matches + * A map associating each smart highlighter display name with its respective + * number of matches in the set of conversations. + * @type array|\Google\Protobuf\Internal\MapField $custom_highlighter_matches + * A map associating each custom highlighter resource name with its respective + * number of matches in the set of conversations. + * @type array|\Google\Protobuf\Internal\MapField $issue_matches + * A map associating each issue resource name with its respective number of + * matches in the set of conversations. Key has the format: + * `projects//locations//issueModels//issues/` + * Deprecated, use `issue_matches_stats` field instead. + * @type array|\Google\Protobuf\Internal\MapField $issue_matches_stats + * A map associating each issue resource name with its respective number of + * matches in the set of conversations. Key has the format: + * `projects//locations//issueModels//issues/` + * @type \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries $conversation_count_time_series + * A time series representing the count of conversations created over time + * that match that requested filter criteria. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The average duration of all conversations. The average is calculated using + * only conversations that have a time duration. + * + * Generated from protobuf field .google.protobuf.Duration average_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getAverageDuration() + { + return $this->average_duration; + } + + public function hasAverageDuration() + { + return isset($this->average_duration); + } + + public function clearAverageDuration() + { + unset($this->average_duration); + } + + /** + * The average duration of all conversations. The average is calculated using + * only conversations that have a time duration. + * + * Generated from protobuf field .google.protobuf.Duration average_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setAverageDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->average_duration = $var; + + return $this; + } + + /** + * The average number of turns per conversation. + * + * Generated from protobuf field int32 average_turn_count = 2; + * @return int + */ + public function getAverageTurnCount() + { + return $this->average_turn_count; + } + + /** + * The average number of turns per conversation. + * + * Generated from protobuf field int32 average_turn_count = 2; + * @param int $var + * @return $this + */ + public function setAverageTurnCount($var) + { + GPBUtil::checkInt32($var); + $this->average_turn_count = $var; + + return $this; + } + + /** + * The total number of conversations. + * + * Generated from protobuf field int32 conversation_count = 3; + * @return int + */ + public function getConversationCount() + { + return $this->conversation_count; + } + + /** + * The total number of conversations. + * + * Generated from protobuf field int32 conversation_count = 3; + * @param int $var + * @return $this + */ + public function setConversationCount($var) + { + GPBUtil::checkInt32($var); + $this->conversation_count = $var; + + return $this; + } + + /** + * A map associating each smart highlighter display name with its respective + * number of matches in the set of conversations. + * + * Generated from protobuf field map smart_highlighter_matches = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSmartHighlighterMatches() + { + return $this->smart_highlighter_matches; + } + + /** + * A map associating each smart highlighter display name with its respective + * number of matches in the set of conversations. + * + * Generated from protobuf field map smart_highlighter_matches = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSmartHighlighterMatches($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); + $this->smart_highlighter_matches = $arr; + + return $this; + } + + /** + * A map associating each custom highlighter resource name with its respective + * number of matches in the set of conversations. + * + * Generated from protobuf field map custom_highlighter_matches = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCustomHighlighterMatches() + { + return $this->custom_highlighter_matches; + } + + /** + * A map associating each custom highlighter resource name with its respective + * number of matches in the set of conversations. + * + * Generated from protobuf field map custom_highlighter_matches = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCustomHighlighterMatches($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); + $this->custom_highlighter_matches = $arr; + + return $this; + } + + /** + * A map associating each issue resource name with its respective number of + * matches in the set of conversations. Key has the format: + * `projects//locations//issueModels//issues/` + * Deprecated, use `issue_matches_stats` field instead. + * + * Generated from protobuf field map issue_matches = 6 [deprecated = true]; + * @return \Google\Protobuf\Internal\MapField + * @deprecated + */ + public function getIssueMatches() + { + @trigger_error('issue_matches is deprecated.', E_USER_DEPRECATED); + return $this->issue_matches; + } + + /** + * A map associating each issue resource name with its respective number of + * matches in the set of conversations. Key has the format: + * `projects//locations//issueModels//issues/` + * Deprecated, use `issue_matches_stats` field instead. + * + * Generated from protobuf field map issue_matches = 6 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + * @deprecated + */ + public function setIssueMatches($var) + { + @trigger_error('issue_matches is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); + $this->issue_matches = $arr; + + return $this; + } + + /** + * A map associating each issue resource name with its respective number of + * matches in the set of conversations. Key has the format: + * `projects//locations//issueModels//issues/` + * + * Generated from protobuf field map issue_matches_stats = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getIssueMatchesStats() + { + return $this->issue_matches_stats; + } + + /** + * A map associating each issue resource name with its respective number of + * matches in the set of conversations. Key has the format: + * `projects//locations//issueModels//issues/` + * + * Generated from protobuf field map issue_matches_stats = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setIssueMatchesStats($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats\IssueStats::class); + $this->issue_matches_stats = $arr; + + return $this; + } + + /** + * A time series representing the count of conversations created over time + * that match that requested filter criteria. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries conversation_count_time_series = 7; + * @return \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries|null + */ + public function getConversationCountTimeSeries() + { + return $this->conversation_count_time_series; + } + + public function hasConversationCountTimeSeries() + { + return isset($this->conversation_count_time_series); + } + + public function clearConversationCountTimeSeries() + { + unset($this->conversation_count_time_series); + } + + /** + * A time series representing the count of conversations created over time + * that match that requested filter criteria. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries conversation_count_time_series = 7; + * @param \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries $var + * @return $this + */ + public function setConversationCountTimeSeries($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries::class); + $this->conversation_count_time_series = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries.php new file mode 100644 index 000000000000..ffe33908677a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries.php @@ -0,0 +1,122 @@ +google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + */ +class TimeSeries extends \Google\Protobuf\Internal\Message +{ + /** + * The duration of each interval. + * + * Generated from protobuf field .google.protobuf.Duration interval_duration = 1; + */ + protected $interval_duration = null; + /** + * An ordered list of intervals from earliest to latest, where each interval + * represents the number of conversations that transpired during the time + * window. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval points = 2; + */ + private $points; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $interval_duration + * The duration of each interval. + * @type array<\Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries\Interval>|\Google\Protobuf\Internal\RepeatedField $points + * An ordered list of intervals from earliest to latest, where each interval + * represents the number of conversations that transpired during the time + * window. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The duration of each interval. + * + * Generated from protobuf field .google.protobuf.Duration interval_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getIntervalDuration() + { + return $this->interval_duration; + } + + public function hasIntervalDuration() + { + return isset($this->interval_duration); + } + + public function clearIntervalDuration() + { + unset($this->interval_duration); + } + + /** + * The duration of each interval. + * + * Generated from protobuf field .google.protobuf.Duration interval_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setIntervalDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->interval_duration = $var; + + return $this; + } + + /** + * An ordered list of intervals from earliest to latest, where each interval + * represents the number of conversations that transpired during the time + * window. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval points = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPoints() + { + return $this->points; + } + + /** + * An ordered list of intervals from earliest to latest, where each interval + * represents the number of conversations that transpired during the time + * window. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval points = 2; + * @param array<\Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries\Interval>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries\Interval::class); + $this->points = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimeSeries::class, \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse_TimeSeries::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries/Interval.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries/Interval.php new file mode 100644 index 000000000000..fd7aa0d92378 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries/Interval.php @@ -0,0 +1,114 @@ +google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + */ +class Interval extends \Google\Protobuf\Internal\Message +{ + /** + * The start time of this interval. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The number of conversations created in this interval. + * + * Generated from protobuf field int32 conversation_count = 2; + */ + protected $conversation_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The start time of this interval. + * @type int $conversation_count + * The number of conversations created in this interval. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The start time of this interval. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The start time of this interval. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The number of conversations created in this interval. + * + * Generated from protobuf field int32 conversation_count = 2; + * @return int + */ + public function getConversationCount() + { + return $this->conversation_count; + } + + /** + * The number of conversations created in this interval. + * + * Generated from protobuf field int32 conversation_count = 2; + * @param int $var + * @return $this + */ + public function setConversationCount($var) + { + GPBUtil::checkInt32($var); + $this->conversation_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Interval::class, \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse_TimeSeries_Interval::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CallAnnotation.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CallAnnotation.php new file mode 100644 index 000000000000..9b2679366c44 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CallAnnotation.php @@ -0,0 +1,432 @@ +google.cloud.contactcenterinsights.v1.CallAnnotation + */ +class CallAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The channel of the audio where the annotation occurs. For single-channel + * audio, this field is not populated. + * + * Generated from protobuf field int32 channel_tag = 1; + */ + protected $channel_tag = 0; + /** + * The boundary in the conversation where the annotation starts, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_start_boundary = 4; + */ + protected $annotation_start_boundary = null; + /** + * The boundary in the conversation where the annotation ends, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_end_boundary = 5; + */ + protected $annotation_end_boundary = null; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\InterruptionData $interruption_data + * Data specifying an interruption. + * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment_data + * Data specifying sentiment. + * @type \Google\Cloud\ContactCenterInsights\V1\SilenceData $silence_data + * Data specifying silence. + * @type \Google\Cloud\ContactCenterInsights\V1\HoldData $hold_data + * Data specifying a hold. + * @type \Google\Cloud\ContactCenterInsights\V1\EntityMentionData $entity_mention_data + * Data specifying an entity mention. + * @type \Google\Cloud\ContactCenterInsights\V1\IntentMatchData $intent_match_data + * Data specifying an intent match. + * @type \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData $phrase_match_data + * Data specifying a phrase match. + * @type \Google\Cloud\ContactCenterInsights\V1\IssueMatchData $issue_match_data + * Data specifying an issue match. + * @type int $channel_tag + * The channel of the audio where the annotation occurs. For single-channel + * audio, this field is not populated. + * @type \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $annotation_start_boundary + * The boundary in the conversation where the annotation starts, inclusive. + * @type \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $annotation_end_boundary + * The boundary in the conversation where the annotation ends, inclusive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Data specifying an interruption. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.InterruptionData interruption_data = 10; + * @return \Google\Cloud\ContactCenterInsights\V1\InterruptionData|null + */ + public function getInterruptionData() + { + return $this->readOneof(10); + } + + public function hasInterruptionData() + { + return $this->hasOneof(10); + } + + /** + * Data specifying an interruption. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.InterruptionData interruption_data = 10; + * @param \Google\Cloud\ContactCenterInsights\V1\InterruptionData $var + * @return $this + */ + public function setInterruptionData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\InterruptionData::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Data specifying sentiment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 11; + * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null + */ + public function getSentimentData() + { + return $this->readOneof(11); + } + + public function hasSentimentData() + { + return $this->hasOneof(11); + } + + /** + * Data specifying sentiment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 11; + * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var + * @return $this + */ + public function setSentimentData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Data specifying silence. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SilenceData silence_data = 12; + * @return \Google\Cloud\ContactCenterInsights\V1\SilenceData|null + */ + public function getSilenceData() + { + return $this->readOneof(12); + } + + public function hasSilenceData() + { + return $this->hasOneof(12); + } + + /** + * Data specifying silence. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SilenceData silence_data = 12; + * @param \Google\Cloud\ContactCenterInsights\V1\SilenceData $var + * @return $this + */ + public function setSilenceData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SilenceData::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Data specifying a hold. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.HoldData hold_data = 13; + * @return \Google\Cloud\ContactCenterInsights\V1\HoldData|null + */ + public function getHoldData() + { + return $this->readOneof(13); + } + + public function hasHoldData() + { + return $this->hasOneof(13); + } + + /** + * Data specifying a hold. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.HoldData hold_data = 13; + * @param \Google\Cloud\ContactCenterInsights\V1\HoldData $var + * @return $this + */ + public function setHoldData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\HoldData::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Data specifying an entity mention. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData entity_mention_data = 15; + * @return \Google\Cloud\ContactCenterInsights\V1\EntityMentionData|null + */ + public function getEntityMentionData() + { + return $this->readOneof(15); + } + + public function hasEntityMentionData() + { + return $this->hasOneof(15); + } + + /** + * Data specifying an entity mention. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData entity_mention_data = 15; + * @param \Google\Cloud\ContactCenterInsights\V1\EntityMentionData $var + * @return $this + */ + public function setEntityMentionData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\EntityMentionData::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Data specifying an intent match. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IntentMatchData intent_match_data = 16; + * @return \Google\Cloud\ContactCenterInsights\V1\IntentMatchData|null + */ + public function getIntentMatchData() + { + return $this->readOneof(16); + } + + public function hasIntentMatchData() + { + return $this->hasOneof(16); + } + + /** + * Data specifying an intent match. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IntentMatchData intent_match_data = 16; + * @param \Google\Cloud\ContactCenterInsights\V1\IntentMatchData $var + * @return $this + */ + public function setIntentMatchData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IntentMatchData::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Data specifying a phrase match. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchData phrase_match_data = 17; + * @return \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData|null + */ + public function getPhraseMatchData() + { + return $this->readOneof(17); + } + + public function hasPhraseMatchData() + { + return $this->hasOneof(17); + } + + /** + * Data specifying a phrase match. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchData phrase_match_data = 17; + * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData $var + * @return $this + */ + public function setPhraseMatchData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Data specifying an issue match. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueMatchData issue_match_data = 18; + * @return \Google\Cloud\ContactCenterInsights\V1\IssueMatchData|null + */ + public function getIssueMatchData() + { + return $this->readOneof(18); + } + + public function hasIssueMatchData() + { + return $this->hasOneof(18); + } + + /** + * Data specifying an issue match. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueMatchData issue_match_data = 18; + * @param \Google\Cloud\ContactCenterInsights\V1\IssueMatchData $var + * @return $this + */ + public function setIssueMatchData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueMatchData::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * The channel of the audio where the annotation occurs. For single-channel + * audio, this field is not populated. + * + * Generated from protobuf field int32 channel_tag = 1; + * @return int + */ + public function getChannelTag() + { + return $this->channel_tag; + } + + /** + * The channel of the audio where the annotation occurs. For single-channel + * audio, this field is not populated. + * + * Generated from protobuf field int32 channel_tag = 1; + * @param int $var + * @return $this + */ + public function setChannelTag($var) + { + GPBUtil::checkInt32($var); + $this->channel_tag = $var; + + return $this; + } + + /** + * The boundary in the conversation where the annotation starts, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_start_boundary = 4; + * @return \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary|null + */ + public function getAnnotationStartBoundary() + { + return $this->annotation_start_boundary; + } + + public function hasAnnotationStartBoundary() + { + return isset($this->annotation_start_boundary); + } + + public function clearAnnotationStartBoundary() + { + unset($this->annotation_start_boundary); + } + + /** + * The boundary in the conversation where the annotation starts, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_start_boundary = 4; + * @param \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $var + * @return $this + */ + public function setAnnotationStartBoundary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary::class); + $this->annotation_start_boundary = $var; + + return $this; + } + + /** + * The boundary in the conversation where the annotation ends, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_end_boundary = 5; + * @return \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary|null + */ + public function getAnnotationEndBoundary() + { + return $this->annotation_end_boundary; + } + + public function hasAnnotationEndBoundary() + { + return isset($this->annotation_end_boundary); + } + + public function clearAnnotationEndBoundary() + { + unset($this->annotation_end_boundary); + } + + /** + * The boundary in the conversation where the annotation ends, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_end_boundary = 5; + * @param \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $var + * @return $this + */ + public function setAnnotationEndBoundary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary::class); + $this->annotation_end_boundary = $var; + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation.php new file mode 100644 index 000000000000..1de28cfd8c8d --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation.php @@ -0,0 +1,890 @@ +google.cloud.contactcenterinsights.v1.Conversation + */ +class Conversation extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of the conversation. + * Format: + * projects/{project}/locations/{location}/conversations/{conversation} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The source of the audio and transcription for the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationDataSource data_source = 2; + */ + protected $data_source = null; + /** + * Output only. The time at which the conversation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The most recent time at which the conversation was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The time at which the conversation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 17; + */ + protected $start_time = null; + /** + * A user-specified language code for the conversation. + * + * Generated from protobuf field string language_code = 14; + */ + protected $language_code = ''; + /** + * An opaque, user-specified string representing the human agent who handled + * the conversation. + * + * Generated from protobuf field string agent_id = 5; + */ + protected $agent_id = ''; + /** + * A map for the user to specify any custom fields. A maximum of 20 labels per + * conversation is allowed, with a maximum of 256 characters per entry. + * + * Generated from protobuf field map labels = 6; + */ + private $labels; + /** + * Conversation metadata related to quality management. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24; + */ + protected $quality_metadata = null; + /** + * Output only. The conversation transcript. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript transcript = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transcript = null; + /** + * Immutable. The conversation medium, if unspecified will default to + * PHONE_CALL. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 9 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $medium = 0; + /** + * Output only. The duration of the conversation. + * + * Generated from protobuf field .google.protobuf.Duration duration = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $duration = null; + /** + * Output only. The number of turns in the conversation. + * + * Generated from protobuf field int32 turn_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $turn_count = 0; + /** + * Output only. The conversation's latest analysis, if one exists. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis latest_analysis = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_analysis = null; + /** + * Output only. Latest summary of the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData latest_summary = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_summary = null; + /** + * Output only. The annotations that were generated during the customer and + * agent interaction. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.RuntimeAnnotation runtime_annotations = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $runtime_annotations; + /** + * Output only. All the matched Dialogflow intents in the call. The key + * corresponds to a Dialogflow intent, format: + * projects/{project}/agent/{agent}/intents/{intent} + * + * Generated from protobuf field map dialogflow_intents = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $dialogflow_intents; + /** + * Obfuscated user ID which the customer sent to us. + * + * Generated from protobuf field string obfuscated_user_id = 21; + */ + protected $obfuscated_user_id = ''; + protected $metadata; + protected $expiration; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\Conversation\CallMetadata $call_metadata + * Call-specific metadata. + * @type \Google\Protobuf\Timestamp $expire_time + * The time at which this conversation should expire. After this time, the + * conversation data and any associated analyses will be deleted. + * @type \Google\Protobuf\Duration $ttl + * Input only. The TTL for this resource. If specified, then this TTL will + * be used to calculate the expire time. + * @type string $name + * Immutable. The resource name of the conversation. + * Format: + * projects/{project}/locations/{location}/conversations/{conversation} + * @type \Google\Cloud\ContactCenterInsights\V1\ConversationDataSource $data_source + * The source of the audio and transcription for the conversation. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the conversation was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The most recent time at which the conversation was updated. + * @type \Google\Protobuf\Timestamp $start_time + * The time at which the conversation started. + * @type string $language_code + * A user-specified language code for the conversation. + * @type string $agent_id + * An opaque, user-specified string representing the human agent who handled + * the conversation. + * @type array|\Google\Protobuf\Internal\MapField $labels + * A map for the user to specify any custom fields. A maximum of 20 labels per + * 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 \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript $transcript + * Output only. The conversation transcript. + * @type int $medium + * Immutable. The conversation medium, if unspecified will default to + * PHONE_CALL. + * @type \Google\Protobuf\Duration $duration + * Output only. The duration of the conversation. + * @type int $turn_count + * Output only. The number of turns in the conversation. + * @type \Google\Cloud\ContactCenterInsights\V1\Analysis $latest_analysis + * Output only. The conversation's latest analysis, if one exists. + * @type \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData $latest_summary + * Output only. Latest summary of the conversation. + * @type array<\Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation>|\Google\Protobuf\Internal\RepeatedField $runtime_annotations + * Output only. The annotations that were generated during the customer and + * agent interaction. + * @type array|\Google\Protobuf\Internal\MapField $dialogflow_intents + * Output only. All the matched Dialogflow intents in the call. The key + * corresponds to a Dialogflow intent, format: + * projects/{project}/agent/{agent}/intents/{intent} + * @type string $obfuscated_user_id + * Obfuscated user ID which the customer sent to us. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Call-specific metadata. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.CallMetadata call_metadata = 7; + * @return \Google\Cloud\ContactCenterInsights\V1\Conversation\CallMetadata|null + */ + public function getCallMetadata() + { + return $this->readOneof(7); + } + + public function hasCallMetadata() + { + return $this->hasOneof(7); + } + + /** + * Call-specific metadata. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.CallMetadata call_metadata = 7; + * @param \Google\Cloud\ContactCenterInsights\V1\Conversation\CallMetadata $var + * @return $this + */ + public function setCallMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\CallMetadata::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The time at which this conversation should expire. After this time, the + * conversation data and any associated analyses will be deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 15; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->readOneof(15); + } + + public function hasExpireTime() + { + return $this->hasOneof(15); + } + + /** + * The time at which this conversation should expire. After this time, the + * conversation data and any associated analyses will be deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 15; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Input only. The TTL for this resource. If specified, then this TTL will + * be used to calculate the expire time. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getTtl() + { + return $this->readOneof(16); + } + + public function hasTtl() + { + return $this->hasOneof(16); + } + + /** + * Input only. The TTL for this resource. If specified, then this TTL will + * be used to calculate the expire time. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Immutable. The resource name of the conversation. + * Format: + * projects/{project}/locations/{location}/conversations/{conversation} + * + * 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 conversation. + * Format: + * projects/{project}/locations/{location}/conversations/{conversation} + * + * 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; + } + + /** + * The source of the audio and transcription for the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationDataSource data_source = 2; + * @return \Google\Cloud\ContactCenterInsights\V1\ConversationDataSource|null + */ + public function getDataSource() + { + return $this->data_source; + } + + public function hasDataSource() + { + return isset($this->data_source); + } + + public function clearDataSource() + { + unset($this->data_source); + } + + /** + * The source of the audio and transcription for the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationDataSource data_source = 2; + * @param \Google\Cloud\ContactCenterInsights\V1\ConversationDataSource $var + * @return $this + */ + public function setDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ConversationDataSource::class); + $this->data_source = $var; + + return $this; + } + + /** + * Output only. The time at which the conversation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which the conversation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 most recent time at which the conversation was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The most recent time at which the conversation was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The time at which the conversation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 17; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time at which the conversation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 17; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * A user-specified language code for the conversation. + * + * Generated from protobuf field string language_code = 14; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * A user-specified language code for the conversation. + * + * Generated from protobuf field string language_code = 14; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * An opaque, user-specified string representing the human agent who handled + * the conversation. + * + * Generated from protobuf field string agent_id = 5; + * @return string + */ + public function getAgentId() + { + return $this->agent_id; + } + + /** + * An opaque, user-specified string representing the human agent who handled + * the conversation. + * + * Generated from protobuf field string agent_id = 5; + * @param string $var + * @return $this + */ + public function setAgentId($var) + { + GPBUtil::checkString($var, True); + $this->agent_id = $var; + + return $this; + } + + /** + * A map for the user to specify any custom fields. A maximum of 20 labels per + * conversation is allowed, with a maximum of 256 characters per entry. + * + * Generated from protobuf field map labels = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * A map for the user to specify any custom fields. A maximum of 20 labels per + * conversation is allowed, with a maximum of 256 characters per entry. + * + * Generated from protobuf field map labels = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Conversation metadata related to quality management. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24; + * @return \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata|null + */ + public function getQualityMetadata() + { + return $this->quality_metadata; + } + + public function hasQualityMetadata() + { + return isset($this->quality_metadata); + } + + public function clearQualityMetadata() + { + unset($this->quality_metadata); + } + + /** + * Conversation metadata related to quality management. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24; + * @param \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata $var + * @return $this + */ + public function setQualityMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata::class); + $this->quality_metadata = $var; + + return $this; + } + + /** + * Output only. The conversation transcript. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript transcript = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript|null + */ + public function getTranscript() + { + return $this->transcript; + } + + public function hasTranscript() + { + return isset($this->transcript); + } + + public function clearTranscript() + { + unset($this->transcript); + } + + /** + * Output only. The conversation transcript. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript transcript = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript $var + * @return $this + */ + public function setTranscript($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript::class); + $this->transcript = $var; + + return $this; + } + + /** + * Immutable. The conversation medium, if unspecified will default to + * PHONE_CALL. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getMedium() + { + return $this->medium; + } + + /** + * Immutable. The conversation medium, if unspecified will default to + * PHONE_CALL. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setMedium($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Medium::class); + $this->medium = $var; + + return $this; + } + + /** + * Output only. The duration of the conversation. + * + * Generated from protobuf field .google.protobuf.Duration duration = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Output only. The duration of the conversation. + * + * Generated from protobuf field .google.protobuf.Duration duration = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Output only. The number of turns in the conversation. + * + * Generated from protobuf field int32 turn_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTurnCount() + { + return $this->turn_count; + } + + /** + * Output only. The number of turns in the conversation. + * + * Generated from protobuf field int32 turn_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTurnCount($var) + { + GPBUtil::checkInt32($var); + $this->turn_count = $var; + + return $this; + } + + /** + * Output only. The conversation's latest analysis, if one exists. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis latest_analysis = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ContactCenterInsights\V1\Analysis|null + */ + public function getLatestAnalysis() + { + return $this->latest_analysis; + } + + public function hasLatestAnalysis() + { + return isset($this->latest_analysis); + } + + public function clearLatestAnalysis() + { + unset($this->latest_analysis); + } + + /** + * Output only. The conversation's latest analysis, if one exists. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis latest_analysis = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ContactCenterInsights\V1\Analysis $var + * @return $this + */ + public function setLatestAnalysis($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Analysis::class); + $this->latest_analysis = $var; + + return $this; + } + + /** + * Output only. Latest summary of the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData latest_summary = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData|null + */ + public function getLatestSummary() + { + return $this->latest_summary; + } + + public function hasLatestSummary() + { + return isset($this->latest_summary); + } + + public function clearLatestSummary() + { + unset($this->latest_summary); + } + + /** + * Output only. Latest summary of the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData latest_summary = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData $var + * @return $this + */ + public function setLatestSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData::class); + $this->latest_summary = $var; + + return $this; + } + + /** + * Output only. The annotations that were generated during the customer and + * agent interaction. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.RuntimeAnnotation runtime_annotations = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRuntimeAnnotations() + { + return $this->runtime_annotations; + } + + /** + * Output only. The annotations that were generated during the customer and + * agent interaction. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.RuntimeAnnotation runtime_annotations = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRuntimeAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation::class); + $this->runtime_annotations = $arr; + + return $this; + } + + /** + * Output only. All the matched Dialogflow intents in the call. The key + * corresponds to a Dialogflow intent, format: + * projects/{project}/agent/{agent}/intents/{intent} + * + * Generated from protobuf field map dialogflow_intents = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDialogflowIntents() + { + return $this->dialogflow_intents; + } + + /** + * Output only. All the matched Dialogflow intents in the call. The key + * corresponds to a Dialogflow intent, format: + * projects/{project}/agent/{agent}/intents/{intent} + * + * Generated from protobuf field map dialogflow_intents = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDialogflowIntents($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\DialogflowIntent::class); + $this->dialogflow_intents = $arr; + + return $this; + } + + /** + * Obfuscated user ID which the customer sent to us. + * + * Generated from protobuf field string obfuscated_user_id = 21; + * @return string + */ + public function getObfuscatedUserId() + { + return $this->obfuscated_user_id; + } + + /** + * Obfuscated user ID which the customer sent to us. + * + * Generated from protobuf field string obfuscated_user_id = 21; + * @param string $var + * @return $this + */ + public function setObfuscatedUserId($var) + { + GPBUtil::checkString($var, True); + $this->obfuscated_user_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getMetadata() + { + return $this->whichOneof("metadata"); + } + + /** + * @return string + */ + public function getExpiration() + { + return $this->whichOneof("expiration"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/CallMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/CallMetadata.php new file mode 100644 index 000000000000..3884e88264b0 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/CallMetadata.php @@ -0,0 +1,104 @@ +google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + */ +class CallMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The audio channel that contains the customer. + * + * Generated from protobuf field int32 customer_channel = 1; + */ + protected $customer_channel = 0; + /** + * The audio channel that contains the agent. + * + * Generated from protobuf field int32 agent_channel = 2; + */ + protected $agent_channel = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $customer_channel + * The audio channel that contains the customer. + * @type int $agent_channel + * The audio channel that contains the agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The audio channel that contains the customer. + * + * Generated from protobuf field int32 customer_channel = 1; + * @return int + */ + public function getCustomerChannel() + { + return $this->customer_channel; + } + + /** + * The audio channel that contains the customer. + * + * Generated from protobuf field int32 customer_channel = 1; + * @param int $var + * @return $this + */ + public function setCustomerChannel($var) + { + GPBUtil::checkInt32($var); + $this->customer_channel = $var; + + return $this; + } + + /** + * The audio channel that contains the agent. + * + * Generated from protobuf field int32 agent_channel = 2; + * @return int + */ + public function getAgentChannel() + { + return $this->agent_channel; + } + + /** + * The audio channel that contains the agent. + * + * Generated from protobuf field int32 agent_channel = 2; + * @param int $var + * @return $this + */ + public function setAgentChannel($var) + { + GPBUtil::checkInt32($var); + $this->agent_channel = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CallMetadata::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_CallMetadata::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Medium.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Medium.php new file mode 100644 index 000000000000..21c573d1e54a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Medium.php @@ -0,0 +1,64 @@ +google.cloud.contactcenterinsights.v1.Conversation.Medium + */ +class Medium +{ + /** + * Default value, if unspecified will default to PHONE_CALL. + * + * Generated from protobuf enum MEDIUM_UNSPECIFIED = 0; + */ + const MEDIUM_UNSPECIFIED = 0; + /** + * The format for conversations that took place over the phone. + * + * Generated from protobuf enum PHONE_CALL = 1; + */ + const PHONE_CALL = 1; + /** + * The format for conversations that took place over chat. + * + * Generated from protobuf enum CHAT = 2; + */ + const CHAT = 2; + + private static $valueToName = [ + self::MEDIUM_UNSPECIFIED => 'MEDIUM_UNSPECIFIED', + self::PHONE_CALL => 'PHONE_CALL', + self::CHAT => 'CHAT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Medium::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Medium::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata.php new file mode 100644 index 000000000000..dc583d1d0951 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata.php @@ -0,0 +1,182 @@ +google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + */ +class QualityMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * An arbitrary integer value indicating the customer's satisfaction rating. + * + * Generated from protobuf field int32 customer_satisfaction_rating = 1; + */ + protected $customer_satisfaction_rating = 0; + /** + * The amount of time the customer waited to connect with an agent. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 2; + */ + protected $wait_duration = null; + /** + * An arbitrary string value specifying the menu path the customer took. + * + * Generated from protobuf field string menu_path = 3; + */ + protected $menu_path = ''; + /** + * Information about agents involved in the call. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo agent_info = 4; + */ + private $agent_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $customer_satisfaction_rating + * An arbitrary integer value indicating the customer's satisfaction rating. + * @type \Google\Protobuf\Duration $wait_duration + * The amount of time the customer waited to connect with an agent. + * @type string $menu_path + * An arbitrary string value specifying the menu path the customer took. + * @type array<\Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata\AgentInfo>|\Google\Protobuf\Internal\RepeatedField $agent_info + * Information about agents involved in the call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * An arbitrary integer value indicating the customer's satisfaction rating. + * + * Generated from protobuf field int32 customer_satisfaction_rating = 1; + * @return int + */ + public function getCustomerSatisfactionRating() + { + return $this->customer_satisfaction_rating; + } + + /** + * An arbitrary integer value indicating the customer's satisfaction rating. + * + * Generated from protobuf field int32 customer_satisfaction_rating = 1; + * @param int $var + * @return $this + */ + public function setCustomerSatisfactionRating($var) + { + GPBUtil::checkInt32($var); + $this->customer_satisfaction_rating = $var; + + return $this; + } + + /** + * The amount of time the customer waited to connect with an agent. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getWaitDuration() + { + return $this->wait_duration; + } + + public function hasWaitDuration() + { + return isset($this->wait_duration); + } + + public function clearWaitDuration() + { + unset($this->wait_duration); + } + + /** + * The amount of time the customer waited to connect with an agent. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWaitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->wait_duration = $var; + + return $this; + } + + /** + * An arbitrary string value specifying the menu path the customer took. + * + * Generated from protobuf field string menu_path = 3; + * @return string + */ + public function getMenuPath() + { + return $this->menu_path; + } + + /** + * An arbitrary string value specifying the menu path the customer took. + * + * Generated from protobuf field string menu_path = 3; + * @param string $var + * @return $this + */ + public function setMenuPath($var) + { + GPBUtil::checkString($var, True); + $this->menu_path = $var; + + return $this; + } + + /** + * Information about agents involved in the call. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo agent_info = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAgentInfo() + { + return $this->agent_info; + } + + /** + * Information about agents involved in the call. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo agent_info = 4; + * @param array<\Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata\AgentInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAgentInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata\AgentInfo::class); + $this->agent_info = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QualityMetadata::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_QualityMetadata::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata/AgentInfo.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata/AgentInfo.php new file mode 100644 index 000000000000..bc96fced0761 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata/AgentInfo.php @@ -0,0 +1,176 @@ +google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + */ +class AgentInfo extends \Google\Protobuf\Internal\Message +{ + /** + * A user-specified string representing the agent. + * + * Generated from protobuf field string agent_id = 1; + */ + protected $agent_id = ''; + /** + * The agent's name. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * A user-specified string representing the agent's team. + * + * Generated from protobuf field string team = 3; + */ + protected $team = ''; + /** + * A user-provided string indicating the outcome of the agent's segment of + * the call. + * + * Generated from protobuf field string disposition_code = 4; + */ + protected $disposition_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agent_id + * A user-specified string representing the agent. + * @type string $display_name + * The agent's name. + * @type string $team + * A user-specified string representing the agent's team. + * @type string $disposition_code + * A user-provided string indicating the outcome of the agent's segment of + * the call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A user-specified string representing the agent. + * + * Generated from protobuf field string agent_id = 1; + * @return string + */ + public function getAgentId() + { + return $this->agent_id; + } + + /** + * A user-specified string representing the agent. + * + * Generated from protobuf field string agent_id = 1; + * @param string $var + * @return $this + */ + public function setAgentId($var) + { + GPBUtil::checkString($var, True); + $this->agent_id = $var; + + return $this; + } + + /** + * The agent's name. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The agent's name. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A user-specified string representing the agent's team. + * + * Generated from protobuf field string team = 3; + * @return string + */ + public function getTeam() + { + return $this->team; + } + + /** + * A user-specified string representing the agent's team. + * + * Generated from protobuf field string team = 3; + * @param string $var + * @return $this + */ + public function setTeam($var) + { + GPBUtil::checkString($var, True); + $this->team = $var; + + return $this; + } + + /** + * A user-provided string indicating the outcome of the agent's segment of + * the call. + * + * Generated from protobuf field string disposition_code = 4; + * @return string + */ + public function getDispositionCode() + { + return $this->disposition_code; + } + + /** + * A user-provided string indicating the outcome of the agent's segment of + * the call. + * + * Generated from protobuf field string disposition_code = 4; + * @param string $var + * @return $this + */ + public function setDispositionCode($var) + { + GPBUtil::checkString($var, True); + $this->disposition_code = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AgentInfo::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_QualityMetadata_AgentInfo::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript.php new file mode 100644 index 000000000000..5387fe5354ae --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript.php @@ -0,0 +1,70 @@ +google.cloud.contactcenterinsights.v1.Conversation.Transcript + */ +class Transcript extends \Google\Protobuf\Internal\Message +{ + /** + * A list of sequential transcript segments that comprise the conversation. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment transcript_segments = 1; + */ + private $transcript_segments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment>|\Google\Protobuf\Internal\RepeatedField $transcript_segments + * A list of sequential transcript segments that comprise the conversation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A list of sequential transcript segments that comprise the conversation. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment transcript_segments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTranscriptSegments() + { + return $this->transcript_segments; + } + + /** + * A list of sequential transcript segments that comprise the conversation. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment transcript_segments = 1; + * @param array<\Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTranscriptSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment::class); + $this->transcript_segments = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Transcript::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Transcript::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment.php new file mode 100644 index 000000000000..1c98cf068b8c --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment.php @@ -0,0 +1,406 @@ +google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + */ +class TranscriptSegment extends \Google\Protobuf\Internal\Message +{ + /** + * The time that the message occurred, if provided. + * + * Generated from protobuf field .google.protobuf.Timestamp message_time = 6; + */ + protected $message_time = null; + /** + * The text of this segment. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * A confidence estimate between 0.0 and 1.0 of the fidelity of this + * segment. A default value of 0.0 indicates that the value is unset. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + /** + * A list of the word-specific information for each word in the segment. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo words = 3; + */ + private $words; + /** + * The language code of this segment as a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". + * + * Generated from protobuf field string language_code = 4; + */ + protected $language_code = ''; + /** + * For conversations derived from multi-channel audio, this is the channel + * number corresponding to the audio from that channel. For + * audioChannelCount = N, its output values can range from '1' to 'N'. A + * channel tag of 0 indicates that the audio is mono. + * + * Generated from protobuf field int32 channel_tag = 5; + */ + protected $channel_tag = 0; + /** + * The participant of this segment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant segment_participant = 9; + */ + protected $segment_participant = null; + /** + * CCAI metadata relating to the current transcript segment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata dialogflow_segment_metadata = 10; + */ + protected $dialogflow_segment_metadata = null; + /** + * The sentiment for this transcript segment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 11; + */ + protected $sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $message_time + * The time that the message occurred, if provided. + * @type string $text + * The text of this segment. + * @type float $confidence + * A confidence estimate between 0.0 and 1.0 of the fidelity of this + * segment. A default value of 0.0 indicates that the value is unset. + * @type array<\Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\WordInfo>|\Google\Protobuf\Internal\RepeatedField $words + * A list of the word-specific information for each word in the segment. + * @type string $language_code + * The language code of this segment as a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". + * @type int $channel_tag + * For conversations derived from multi-channel audio, this is the channel + * number corresponding to the audio from that channel. For + * audioChannelCount = N, its output values can range from '1' to 'N'. A + * channel tag of 0 indicates that the audio is mono. + * @type \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant $segment_participant + * The participant of this segment. + * @type \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata $dialogflow_segment_metadata + * CCAI metadata relating to the current transcript segment. + * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment + * The sentiment for this transcript segment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The time that the message occurred, if provided. + * + * Generated from protobuf field .google.protobuf.Timestamp message_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getMessageTime() + { + return $this->message_time; + } + + public function hasMessageTime() + { + return isset($this->message_time); + } + + public function clearMessageTime() + { + unset($this->message_time); + } + + /** + * The time that the message occurred, if provided. + * + * Generated from protobuf field .google.protobuf.Timestamp message_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setMessageTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->message_time = $var; + + return $this; + } + + /** + * The text of this segment. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text of this segment. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * A confidence estimate between 0.0 and 1.0 of the fidelity of this + * segment. A default value of 0.0 indicates that the value is unset. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * A confidence estimate between 0.0 and 1.0 of the fidelity of this + * segment. A default value of 0.0 indicates that the value is unset. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * A list of the word-specific information for each word in the segment. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo words = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWords() + { + return $this->words; + } + + /** + * A list of the word-specific information for each word in the segment. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo words = 3; + * @param array<\Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\WordInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\WordInfo::class); + $this->words = $arr; + + return $this; + } + + /** + * The language code of this segment as a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". + * + * Generated from protobuf field string language_code = 4; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language code of this segment as a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". + * + * Generated from protobuf field string language_code = 4; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * For conversations derived from multi-channel audio, this is the channel + * number corresponding to the audio from that channel. For + * audioChannelCount = N, its output values can range from '1' to 'N'. A + * channel tag of 0 indicates that the audio is mono. + * + * Generated from protobuf field int32 channel_tag = 5; + * @return int + */ + public function getChannelTag() + { + return $this->channel_tag; + } + + /** + * For conversations derived from multi-channel audio, this is the channel + * number corresponding to the audio from that channel. For + * audioChannelCount = N, its output values can range from '1' to 'N'. A + * channel tag of 0 indicates that the audio is mono. + * + * Generated from protobuf field int32 channel_tag = 5; + * @param int $var + * @return $this + */ + public function setChannelTag($var) + { + GPBUtil::checkInt32($var); + $this->channel_tag = $var; + + return $this; + } + + /** + * The participant of this segment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant segment_participant = 9; + * @return \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant|null + */ + public function getSegmentParticipant() + { + return $this->segment_participant; + } + + public function hasSegmentParticipant() + { + return isset($this->segment_participant); + } + + public function clearSegmentParticipant() + { + unset($this->segment_participant); + } + + /** + * The participant of this segment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant segment_participant = 9; + * @param \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant $var + * @return $this + */ + public function setSegmentParticipant($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant::class); + $this->segment_participant = $var; + + return $this; + } + + /** + * CCAI metadata relating to the current transcript segment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata dialogflow_segment_metadata = 10; + * @return \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata|null + */ + public function getDialogflowSegmentMetadata() + { + return $this->dialogflow_segment_metadata; + } + + public function hasDialogflowSegmentMetadata() + { + return isset($this->dialogflow_segment_metadata); + } + + public function clearDialogflowSegmentMetadata() + { + unset($this->dialogflow_segment_metadata); + } + + /** + * CCAI metadata relating to the current transcript segment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata dialogflow_segment_metadata = 10; + * @param \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata $var + * @return $this + */ + public function setDialogflowSegmentMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata::class); + $this->dialogflow_segment_metadata = $var; + + return $this; + } + + /** + * The sentiment for this transcript segment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 11; + * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null + */ + public function getSentiment() + { + return $this->sentiment; + } + + public function hasSentiment() + { + return isset($this->sentiment); + } + + public function clearSentiment() + { + unset($this->sentiment); + } + + /** + * The sentiment for this transcript segment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 11; + * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var + * @return $this + */ + public function setSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); + $this->sentiment = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TranscriptSegment::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Transcript_TranscriptSegment::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/DialogflowSegmentMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/DialogflowSegmentMetadata.php new file mode 100644 index 000000000000..86b130b36b18 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/DialogflowSegmentMetadata.php @@ -0,0 +1,74 @@ +google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + */ +class DialogflowSegmentMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Whether the transcript segment was covered under the configured smart + * reply allowlist in Agent Assist. + * + * Generated from protobuf field bool smart_reply_allowlist_covered = 1; + */ + protected $smart_reply_allowlist_covered = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $smart_reply_allowlist_covered + * Whether the transcript segment was covered under the configured smart + * reply allowlist in Agent Assist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Whether the transcript segment was covered under the configured smart + * reply allowlist in Agent Assist. + * + * Generated from protobuf field bool smart_reply_allowlist_covered = 1; + * @return bool + */ + public function getSmartReplyAllowlistCovered() + { + return $this->smart_reply_allowlist_covered; + } + + /** + * Whether the transcript segment was covered under the configured smart + * reply allowlist in Agent Assist. + * + * Generated from protobuf field bool smart_reply_allowlist_covered = 1; + * @param bool $var + * @return $this + */ + public function setSmartReplyAllowlistCovered($var) + { + GPBUtil::checkBool($var); + $this->smart_reply_allowlist_covered = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DialogflowSegmentMetadata::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Transcript_TranscriptSegment_DialogflowSegmentMetadata::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/WordInfo.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/WordInfo.php new file mode 100644 index 000000000000..8070e337828e --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/WordInfo.php @@ -0,0 +1,204 @@ +google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + */ +class WordInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Time offset of the start of this word relative to the beginning of + * the total conversation. + * + * Generated from protobuf field .google.protobuf.Duration start_offset = 1; + */ + protected $start_offset = null; + /** + * Time offset of the end of this word relative to the beginning of the + * total conversation. + * + * Generated from protobuf field .google.protobuf.Duration end_offset = 2; + */ + protected $end_offset = null; + /** + * The word itself. Includes punctuation marks that surround the word. + * + * Generated from protobuf field string word = 3; + */ + protected $word = ''; + /** + * A confidence estimate between 0.0 and 1.0 of the fidelity of this + * word. A default value of 0.0 indicates that the value is unset. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $start_offset + * Time offset of the start of this word relative to the beginning of + * the total conversation. + * @type \Google\Protobuf\Duration $end_offset + * Time offset of the end of this word relative to the beginning of the + * total conversation. + * @type string $word + * The word itself. Includes punctuation marks that surround the word. + * @type float $confidence + * A confidence estimate between 0.0 and 1.0 of the fidelity of this + * word. A default value of 0.0 indicates that the value is unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Time offset of the start of this word relative to the beginning of + * the total conversation. + * + * Generated from protobuf field .google.protobuf.Duration start_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getStartOffset() + { + return $this->start_offset; + } + + public function hasStartOffset() + { + return isset($this->start_offset); + } + + public function clearStartOffset() + { + unset($this->start_offset); + } + + /** + * Time offset of the start of this word relative to the beginning of + * the total conversation. + * + * Generated from protobuf field .google.protobuf.Duration start_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_offset = $var; + + return $this; + } + + /** + * Time offset of the end of this word relative to the beginning of the + * total conversation. + * + * Generated from protobuf field .google.protobuf.Duration end_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getEndOffset() + { + return $this->end_offset; + } + + public function hasEndOffset() + { + return isset($this->end_offset); + } + + public function clearEndOffset() + { + unset($this->end_offset); + } + + /** + * Time offset of the end of this word relative to the beginning of the + * total conversation. + * + * Generated from protobuf field .google.protobuf.Duration end_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_offset = $var; + + return $this; + } + + /** + * The word itself. Includes punctuation marks that surround the word. + * + * Generated from protobuf field string word = 3; + * @return string + */ + public function getWord() + { + return $this->word; + } + + /** + * The word itself. Includes punctuation marks that surround the word. + * + * Generated from protobuf field string word = 3; + * @param string $var + * @return $this + */ + public function setWord($var) + { + GPBUtil::checkString($var, True); + $this->word = $var; + + return $this; + } + + /** + * A confidence estimate between 0.0 and 1.0 of the fidelity of this + * word. A default value of 0.0 indicates that the value is unset. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * A confidence estimate between 0.0 and 1.0 of the fidelity of this + * word. A default value of 0.0 indicates that the value is unset. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WordInfo::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Transcript_TranscriptSegment_WordInfo::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationDataSource.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationDataSource.php new file mode 100644 index 000000000000..13fa956a91a1 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationDataSource.php @@ -0,0 +1,108 @@ +google.cloud.contactcenterinsights.v1.ConversationDataSource + */ +class ConversationDataSource extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\GcsSource $gcs_source + * A Cloud Storage location specification for the audio and transcript. + * @type \Google\Cloud\ContactCenterInsights\V1\DialogflowSource $dialogflow_source + * The source when the conversation comes from Dialogflow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A Cloud Storage location specification for the audio and transcript. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.GcsSource gcs_source = 1; + * @return \Google\Cloud\ContactCenterInsights\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(1); + } + + public function hasGcsSource() + { + return $this->hasOneof(1); + } + + /** + * A Cloud Storage location specification for the audio and transcript. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.GcsSource gcs_source = 1; + * @param \Google\Cloud\ContactCenterInsights\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\GcsSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The source when the conversation comes from Dialogflow. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DialogflowSource dialogflow_source = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\DialogflowSource|null + */ + public function getDialogflowSource() + { + return $this->readOneof(3); + } + + public function hasDialogflowSource() + { + return $this->hasOneof(3); + } + + /** + * The source when the conversation comes from Dialogflow. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DialogflowSource dialogflow_source = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\DialogflowSource $var + * @return $this + */ + public function setDialogflowSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\DialogflowSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationLevelSentiment.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationLevelSentiment.php new file mode 100644 index 000000000000..c716a63ac554 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationLevelSentiment.php @@ -0,0 +1,111 @@ +google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + */ +class ConversationLevelSentiment extends \Google\Protobuf\Internal\Message +{ + /** + * The channel of the audio that the data applies to. + * + * Generated from protobuf field int32 channel_tag = 1; + */ + protected $channel_tag = 0; + /** + * Data specifying sentiment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 2; + */ + protected $sentiment_data = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $channel_tag + * The channel of the audio that the data applies to. + * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment_data + * Data specifying sentiment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The channel of the audio that the data applies to. + * + * Generated from protobuf field int32 channel_tag = 1; + * @return int + */ + public function getChannelTag() + { + return $this->channel_tag; + } + + /** + * The channel of the audio that the data applies to. + * + * Generated from protobuf field int32 channel_tag = 1; + * @param int $var + * @return $this + */ + public function setChannelTag($var) + { + GPBUtil::checkInt32($var); + $this->channel_tag = $var; + + return $this; + } + + /** + * Data specifying sentiment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 2; + * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null + */ + public function getSentimentData() + { + return $this->sentiment_data; + } + + public function hasSentimentData() + { + return isset($this->sentiment_data); + } + + public function clearSentimentData() + { + unset($this->sentiment_data); + } + + /** + * Data specifying sentiment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 2; + * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var + * @return $this + */ + public function setSentimentData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); + $this->sentiment_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant.php new file mode 100644 index 000000000000..88a7157efd55 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant.php @@ -0,0 +1,226 @@ +google.cloud.contactcenterinsights.v1.ConversationParticipant + */ +class ConversationParticipant extends \Google\Protobuf\Internal\Message +{ + /** + * Deprecated. Use `dialogflow_participant_name` instead. + * The name of the Dialogflow participant. Format: + * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * + * Generated from protobuf field string dialogflow_participant = 1 [deprecated = true]; + * @deprecated + */ + protected $dialogflow_participant = ''; + /** + * Obfuscated user ID from Dialogflow. + * + * Generated from protobuf field string obfuscated_external_user_id = 3; + */ + protected $obfuscated_external_user_id = ''; + /** + * The role of the participant. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role = 2; + */ + protected $role = 0; + protected $participant; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dialogflow_participant_name + * The name of the participant provided by Dialogflow. Format: + * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * @type string $user_id + * A user-specified ID representing the participant. + * @type string $dialogflow_participant + * Deprecated. Use `dialogflow_participant_name` instead. + * The name of the Dialogflow participant. Format: + * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * @type string $obfuscated_external_user_id + * Obfuscated user ID from Dialogflow. + * @type int $role + * The role of the participant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the participant provided by Dialogflow. Format: + * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * + * Generated from protobuf field string dialogflow_participant_name = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getDialogflowParticipantName() + { + return $this->readOneof(5); + } + + public function hasDialogflowParticipantName() + { + return $this->hasOneof(5); + } + + /** + * The name of the participant provided by Dialogflow. Format: + * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * + * Generated from protobuf field string dialogflow_participant_name = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDialogflowParticipantName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A user-specified ID representing the participant. + * + * Generated from protobuf field string user_id = 6; + * @return string + */ + public function getUserId() + { + return $this->readOneof(6); + } + + public function hasUserId() + { + return $this->hasOneof(6); + } + + /** + * A user-specified ID representing the participant. + * + * Generated from protobuf field string user_id = 6; + * @param string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Deprecated. Use `dialogflow_participant_name` instead. + * The name of the Dialogflow participant. Format: + * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * + * Generated from protobuf field string dialogflow_participant = 1 [deprecated = true]; + * @return string + * @deprecated + */ + public function getDialogflowParticipant() + { + @trigger_error('dialogflow_participant is deprecated.', E_USER_DEPRECATED); + return $this->dialogflow_participant; + } + + /** + * Deprecated. Use `dialogflow_participant_name` instead. + * The name of the Dialogflow participant. Format: + * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * + * Generated from protobuf field string dialogflow_participant = 1 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setDialogflowParticipant($var) + { + @trigger_error('dialogflow_participant is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->dialogflow_participant = $var; + + return $this; + } + + /** + * Obfuscated user ID from Dialogflow. + * + * Generated from protobuf field string obfuscated_external_user_id = 3; + * @return string + */ + public function getObfuscatedExternalUserId() + { + return $this->obfuscated_external_user_id; + } + + /** + * Obfuscated user ID from Dialogflow. + * + * Generated from protobuf field string obfuscated_external_user_id = 3; + * @param string $var + * @return $this + */ + public function setObfuscatedExternalUserId($var) + { + GPBUtil::checkString($var, True); + $this->obfuscated_external_user_id = $var; + + return $this; + } + + /** + * The role of the participant. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role = 2; + * @return int + */ + public function getRole() + { + return $this->role; + } + + /** + * The role of the participant. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role = 2; + * @param int $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant\Role::class); + $this->role = $var; + + return $this; + } + + /** + * @return string + */ + public function getParticipant() + { + return $this->whichOneof("participant"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant/Role.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant/Role.php new file mode 100644 index 000000000000..e90baab44257 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant/Role.php @@ -0,0 +1,78 @@ +google.cloud.contactcenterinsights.v1.ConversationParticipant.Role + */ +class Role +{ + /** + * Participant's role is not set. + * + * Generated from protobuf enum ROLE_UNSPECIFIED = 0; + */ + const ROLE_UNSPECIFIED = 0; + /** + * Participant is a human agent. + * + * Generated from protobuf enum HUMAN_AGENT = 1; + */ + const HUMAN_AGENT = 1; + /** + * Participant is an automated agent. + * + * Generated from protobuf enum AUTOMATED_AGENT = 2; + */ + const AUTOMATED_AGENT = 2; + /** + * Participant is an end user who conversed with the contact center. + * + * Generated from protobuf enum END_USER = 3; + */ + const END_USER = 3; + /** + * Participant is either a human or automated agent. + * + * Generated from protobuf enum ANY_AGENT = 4; + */ + const ANY_AGENT = 4; + + private static $valueToName = [ + self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', + self::HUMAN_AGENT => 'HUMAN_AGENT', + self::AUTOMATED_AGENT => 'AUTOMATED_AGENT', + self::END_USER => 'END_USER', + self::ANY_AGENT => 'ANY_AGENT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Role::class, \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant_Role::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationSummarizationSuggestionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationSummarizationSuggestionData.php new file mode 100644 index 000000000000..d4f5e94ae1eb --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationSummarizationSuggestionData.php @@ -0,0 +1,265 @@ +google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + */ +class ConversationSummarizationSuggestionData extends \Google\Protobuf\Internal\Message +{ + /** + * The summarization content that is concatenated into one string. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * The summarization content that is divided into sections. The key is the + * section's name and the value is the section's content. There is no + * specific format for the key or value. + * + * Generated from protobuf field map text_sections = 5; + */ + private $text_sections; + /** + * The confidence score of the summarization. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + /** + * A map that contains metadata about the summarization and the document + * from which it originates. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string answer_record = 4; + */ + protected $answer_record = ''; + /** + * The name of the model that generates this summary. + * Format: + * projects/{project}/locations/{location}/conversationModels/{conversation_model} + * + * Generated from protobuf field string conversation_model = 6; + */ + protected $conversation_model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The summarization content that is concatenated into one string. + * @type array|\Google\Protobuf\Internal\MapField $text_sections + * The summarization content that is divided into sections. The key is the + * section's name and the value is the section's content. There is no + * specific format for the key or value. + * @type float $confidence + * The confidence score of the summarization. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * A map that contains metadata about the summarization and the document + * from which it originates. + * @type string $answer_record + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * @type string $conversation_model + * The name of the model that generates this summary. + * Format: + * projects/{project}/locations/{location}/conversationModels/{conversation_model} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The summarization content that is concatenated into one string. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The summarization content that is concatenated into one string. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * The summarization content that is divided into sections. The key is the + * section's name and the value is the section's content. There is no + * specific format for the key or value. + * + * Generated from protobuf field map text_sections = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTextSections() + { + return $this->text_sections; + } + + /** + * The summarization content that is divided into sections. The key is the + * section's name and the value is the section's content. There is no + * specific format for the key or value. + * + * Generated from protobuf field map text_sections = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTextSections($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->text_sections = $arr; + + return $this; + } + + /** + * The confidence score of the summarization. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The confidence score of the summarization. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * A map that contains metadata about the summarization and the document + * from which it originates. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * A map that contains metadata about the summarization and the document + * from which it originates. + * + * Generated from protobuf field map metadata = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string answer_record = 4; + * @return string + */ + public function getAnswerRecord() + { + return $this->answer_record; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string answer_record = 4; + * @param string $var + * @return $this + */ + public function setAnswerRecord($var) + { + GPBUtil::checkString($var, True); + $this->answer_record = $var; + + return $this; + } + + /** + * The name of the model that generates this summary. + * Format: + * projects/{project}/locations/{location}/conversationModels/{conversation_model} + * + * Generated from protobuf field string conversation_model = 6; + * @return string + */ + public function getConversationModel() + { + return $this->conversation_model; + } + + /** + * The name of the model that generates this summary. + * Format: + * projects/{project}/locations/{location}/conversationModels/{conversation_model} + * + * Generated from protobuf field string conversation_model = 6; + * @param string $var + * @return $this + */ + public function setConversationModel($var) + { + GPBUtil::checkString($var, True); + $this->conversation_model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationView.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationView.php new file mode 100644 index 000000000000..de0d08f51b29 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationView.php @@ -0,0 +1,63 @@ +google.cloud.contactcenterinsights.v1.ConversationView + */ +class ConversationView +{ + /** + * The conversation view is not specified. + * * Defaults to `FULL` in `GetConversationRequest`. + * * Defaults to `BASIC` in `ListConversationsRequest`. + * + * Generated from protobuf enum CONVERSATION_VIEW_UNSPECIFIED = 0; + */ + const CONVERSATION_VIEW_UNSPECIFIED = 0; + /** + * Populates all fields in the conversation. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + /** + * Populates all fields in the conversation except the transcript. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + + private static $valueToName = [ + self::CONVERSATION_VIEW_UNSPECIFIED => 'CONVERSATION_VIEW_UNSPECIFIED', + self::FULL => 'FULL', + self::BASIC => 'BASIC', + ]; + + 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisOperationMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisOperationMetadata.php new file mode 100644 index 000000000000..7afe57a43f92 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisOperationMetadata.php @@ -0,0 +1,199 @@ +google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + */ +class CreateAnalysisOperationMetadata 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 Conversation that this Analysis Operation belongs to. + * + * Generated from protobuf field string conversation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $conversation = ''; + /** + * Output only. The annotator selector used for the analysis (if any). + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $annotator_selector = null; + + /** + * 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 string $conversation + * Output only. The Conversation that this Analysis Operation belongs to. + * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $annotator_selector + * Output only. The annotator selector used for the analysis (if any). + * } + */ + 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 Conversation that this Analysis Operation belongs to. + * + * Generated from protobuf field string conversation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getConversation() + { + return $this->conversation; + } + + /** + * Output only. The Conversation that this Analysis Operation belongs to. + * + * Generated from protobuf field string conversation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkString($var, True); + $this->conversation = $var; + + return $this; + } + + /** + * Output only. The annotator selector used for the analysis (if any). + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector|null + */ + public function getAnnotatorSelector() + { + return $this->annotator_selector; + } + + public function hasAnnotatorSelector() + { + return isset($this->annotator_selector); + } + + public function clearAnnotatorSelector() + { + unset($this->annotator_selector); + } + + /** + * Output only. The annotator selector used for the analysis (if any). + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $var + * @return $this + */ + public function setAnnotatorSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector::class); + $this->annotator_selector = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisRequest.php new file mode 100644 index 000000000000..08fb29f0ae68 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisRequest.php @@ -0,0 +1,127 @@ +google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + */ +class CreateAnalysisRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the analysis. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The analysis to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $analysis = null; + + /** + * @param string $parent Required. The parent resource of the analysis. Please see + * {@see ContactCenterInsightsClient::conversationName()} for help formatting this field. + * @param \Google\Cloud\ContactCenterInsights\V1\Analysis $analysis Required. The analysis to create. + * + * @return \Google\Cloud\ContactCenterInsights\V1\CreateAnalysisRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\Analysis $analysis): self + { + return (new self()) + ->setParent($parent) + ->setAnalysis($analysis); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the analysis. + * @type \Google\Cloud\ContactCenterInsights\V1\Analysis $analysis + * Required. The analysis to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the analysis. + * + * 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 analysis. + * + * 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; + } + + /** + * Required. The analysis to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\Analysis|null + */ + public function getAnalysis() + { + return $this->analysis; + } + + public function hasAnalysis() + { + return isset($this->analysis); + } + + public function clearAnalysis() + { + unset($this->analysis); + } + + /** + * Required. The analysis to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\Analysis $var + * @return $this + */ + public function setAnalysis($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Analysis::class); + $this->analysis = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateConversationRequest.php new file mode 100644 index 000000000000..b0ee61eaae6c --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateConversationRequest.php @@ -0,0 +1,184 @@ +google.cloud.contactcenterinsights.v1.CreateConversationRequest + */ +class CreateConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the conversation. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The conversation resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation = null; + /** + * A unique ID for the new conversation. This ID will become the final + * component of the conversation's resource name. If no ID is specified, a + * server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * + * Generated from protobuf field string conversation_id = 3; + */ + protected $conversation_id = ''; + + /** + * @param string $parent Required. The parent resource of the conversation. Please see + * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation Required. The conversation resource to create. + * @param string $conversationId A unique ID for the new conversation. This ID will become the final + * component of the conversation's resource name. If no ID is specified, a + * server-generated ID will be used. + * + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * + * @return \Google\Cloud\ContactCenterInsights\V1\CreateConversationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation, string $conversationId): self + { + return (new self()) + ->setParent($parent) + ->setConversation($conversation) + ->setConversationId($conversationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the conversation. + * @type \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation + * Required. The conversation resource to create. + * @type string $conversation_id + * A unique ID for the new conversation. This ID will become the final + * component of the conversation's resource name. If no ID is specified, a + * server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the conversation. + * + * 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 conversation. + * + * 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; + } + + /** + * Required. The conversation resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\Conversation|null + */ + public function getConversation() + { + return $this->conversation; + } + + public function hasConversation() + { + return isset($this->conversation); + } + + public function clearConversation() + { + unset($this->conversation); + } + + /** + * Required. The conversation resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\Conversation $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation::class); + $this->conversation = $var; + + return $this; + } + + /** + * A unique ID for the new conversation. This ID will become the final + * component of the conversation's resource name. If no ID is specified, a + * server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * + * Generated from protobuf field string conversation_id = 3; + * @return string + */ + public function getConversationId() + { + return $this->conversation_id; + } + + /** + * A unique ID for the new conversation. This ID will become the final + * component of the conversation's resource name. If no ID is specified, a + * server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * + * Generated from protobuf field string conversation_id = 3; + * @param string $var + * @return $this + */ + public function setConversationId($var) + { + GPBUtil::checkString($var, True); + $this->conversation_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelMetadata.php new file mode 100644 index 000000000000..17845309a6c8 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelMetadata.php @@ -0,0 +1,165 @@ +google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + */ +class CreateIssueModelMetadata 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; + /** + * The original request for creation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CreateIssueModelRequest request = 3; + */ + protected $request = null; + + /** + * 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\CreateIssueModelRequest $request + * The original request for creation. + * } + */ + 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; + } + + /** + * The original request for creation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CreateIssueModelRequest request = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\CreateIssueModelRequest|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The original request for creation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CreateIssueModelRequest request = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\CreateIssueModelRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\CreateIssueModelRequest::class); + $this->request = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelRequest.php new file mode 100644 index 000000000000..8b1409a079c1 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelRequest.php @@ -0,0 +1,127 @@ +google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + */ +class CreateIssueModelRequest 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 = ''; + /** + * Required. The issue model to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $issue_model = null; + + /** + * @param string $parent Required. The parent resource of the issue model. Please see + * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel $issueModel Required. The issue model to create. + * + * @return \Google\Cloud\ContactCenterInsights\V1\CreateIssueModelRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\IssueModel $issueModel): self + { + return (new self()) + ->setParent($parent) + ->setIssueModel($issueModel); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the issue model. + * @type \Google\Cloud\ContactCenterInsights\V1\IssueModel $issue_model + * Required. The issue model to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * 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; + } + + /** + * Required. The issue model to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\IssueModel|null + */ + public function getIssueModel() + { + return $this->issue_model; + } + + public function hasIssueModel() + { + return isset($this->issue_model); + } + + public function clearIssueModel() + { + unset($this->issue_model); + } + + /** + * Required. The issue model to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel $var + * @return $this + */ + public function setIssueModel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel::class); + $this->issue_model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreatePhraseMatcherRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreatePhraseMatcherRequest.php new file mode 100644 index 000000000000..e92bfabbf423 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreatePhraseMatcherRequest.php @@ -0,0 +1,142 @@ +google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + */ +class CreatePhraseMatcherRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the phrase matcher. Required. The location + * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The phrase matcher resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $phrase_matcher = null; + + /** + * @param string $parent Required. The parent resource of the phrase matcher. Required. The location + * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` + * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phraseMatcher Required. The phrase matcher resource to create. + * + * @return \Google\Cloud\ContactCenterInsights\V1\CreatePhraseMatcherRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phraseMatcher): self + { + return (new self()) + ->setParent($parent) + ->setPhraseMatcher($phraseMatcher); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the phrase matcher. Required. The location + * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` + * @type \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phrase_matcher + * Required. The phrase matcher resource to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the phrase matcher. Required. The location + * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` + * + * 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 phrase matcher. Required. The location + * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` + * + * 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; + } + + /** + * Required. The phrase matcher resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher|null + */ + public function getPhraseMatcher() + { + return $this->phrase_matcher; + } + + public function hasPhraseMatcher() + { + return isset($this->phrase_matcher); + } + + public function clearPhraseMatcher() + { + unset($this->phrase_matcher); + } + + /** + * Required. The phrase matcher resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $var + * @return $this + */ + public function setPhraseMatcher($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher::class); + $this->phrase_matcher = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateViewRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateViewRequest.php new file mode 100644 index 000000000000..f87e03ecb161 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateViewRequest.php @@ -0,0 +1,142 @@ +google.cloud.contactcenterinsights.v1.CreateViewRequest + */ +class CreateViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the view. Required. The location to create + * a view for. + * Format: `projects//locations/` or + * `projects//locations/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The view resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $view = null; + + /** + * @param string $parent Required. The parent resource of the view. Required. The location to create + * a view for. + * Format: `projects//locations/` or + * `projects//locations/` + * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\ContactCenterInsights\V1\View $view Required. The view resource to create. + * + * @return \Google\Cloud\ContactCenterInsights\V1\CreateViewRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\View $view): self + { + return (new self()) + ->setParent($parent) + ->setView($view); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the view. Required. The location to create + * a view for. + * Format: `projects//locations/` or + * `projects//locations/` + * @type \Google\Cloud\ContactCenterInsights\V1\View $view + * Required. The view resource to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the view. Required. The location to create + * a view for. + * Format: `projects//locations/` or + * `projects//locations/` + * + * 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 view. Required. The location to create + * a view for. + * Format: `projects//locations/` or + * `projects//locations/` + * + * 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; + } + + /** + * Required. The view resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\View|null + */ + public function getView() + { + return $this->view; + } + + public function hasView() + { + return isset($this->view); + } + + public function clearView() + { + unset($this->view); + } + + /** + * Required. The view resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\View $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\View::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteAnalysisRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteAnalysisRequest.php new file mode 100644 index 000000000000..b8265d5a574d --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteAnalysisRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + */ +class DeleteAnalysisRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the analysis to delete. + * + * 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 analysis to delete. Please see + * {@see ContactCenterInsightsClient::analysisName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\DeleteAnalysisRequest + * + * @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 analysis to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the analysis to delete. + * + * 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 analysis to delete. + * + * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteConversationRequest.php new file mode 100644 index 000000000000..78a161a7339e --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteConversationRequest.php @@ -0,0 +1,123 @@ +google.cloud.contactcenterinsights.v1.DeleteConversationRequest + */ +class DeleteConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the conversation to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the conversation to delete. Please see + * {@see ContactCenterInsightsClient::conversationName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\DeleteConversationRequest + * + * @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 conversation to delete. + * @type bool $force + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the conversation to delete. + * + * 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 conversation to delete. + * + * 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; + } + + /** + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelMetadata.php new file mode 100644 index 000000000000..87dafed4f5f2 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelMetadata.php @@ -0,0 +1,165 @@ +google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + */ +class DeleteIssueModelMetadata 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; + /** + * The original request for deletion. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest request = 3; + */ + protected $request = null; + + /** + * 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\DeleteIssueModelRequest $request + * The original request for deletion. + * } + */ + 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; + } + + /** + * The original request for deletion. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest request = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelRequest|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The original request for deletion. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest request = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelRequest::class); + $this->request = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelRequest.php new file mode 100644 index 000000000000..7c7da6389c8d --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + */ +class DeleteIssueModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the issue model to delete. + * + * 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 issue model to delete. Please see + * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelRequest + * + * @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 issue model to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the issue model to delete. + * + * 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 issue model to delete. + * + * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueRequest.php new file mode 100644 index 000000000000..8096f2bda03b --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.DeleteIssueRequest + */ +class DeleteIssueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the issue to delete. + * + * 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 issue to delete. Please see + * {@see ContactCenterInsightsClient::issueName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\DeleteIssueRequest + * + * @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 issue to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the issue to delete. + * + * 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 issue to delete. + * + * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeletePhraseMatcherRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeletePhraseMatcherRequest.php new file mode 100644 index 000000000000..b3ea8b0caeb4 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeletePhraseMatcherRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + */ +class DeletePhraseMatcherRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the phrase matcher to delete. + * + * 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 phrase matcher to delete. Please see + * {@see ContactCenterInsightsClient::phraseMatcherName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\DeletePhraseMatcherRequest + * + * @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 phrase matcher to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the phrase matcher to delete. + * + * 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 phrase matcher to delete. + * + * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteViewRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteViewRequest.php new file mode 100644 index 000000000000..2980595cc4e5 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteViewRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.DeleteViewRequest + */ +class DeleteViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the view to delete. + * + * 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 view to delete. Please see + * {@see ContactCenterInsightsClient::viewName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\DeleteViewRequest + * + * @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 view to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the view to delete. + * + * 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 view to delete. + * + * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelMetadata.php new file mode 100644 index 000000000000..b9fc941ac602 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelMetadata.php @@ -0,0 +1,165 @@ +google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + */ +class DeployIssueModelMetadata 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; + /** + * The original request for deployment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeployIssueModelRequest request = 3; + */ + protected $request = null; + + /** + * 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\DeployIssueModelRequest $request + * The original request for deployment. + * } + */ + 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; + } + + /** + * The original request for deployment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeployIssueModelRequest request = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The original request for deployment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeployIssueModelRequest request = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest::class); + $this->request = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelRequest.php new file mode 100644 index 000000000000..05417f098460 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + */ +class DeployIssueModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The issue model to deploy. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The issue model to deploy. Please see + * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest + * + * @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 issue model to deploy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The issue model to deploy. + * + * 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 deploy. + * + * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelResponse.php new file mode 100644 index 000000000000..59ac7be188d0 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelResponse.php @@ -0,0 +1,33 @@ +google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + */ +class DeployIssueModelResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowIntent.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowIntent.php new file mode 100644 index 000000000000..43c3bee200f3 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowIntent.php @@ -0,0 +1,68 @@ +google.cloud.contactcenterinsights.v1.DialogflowIntent + */ +class DialogflowIntent extends \Google\Protobuf\Internal\Message +{ + /** + * The human-readable name of the intent. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The human-readable name of the intent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The human-readable name of the intent. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human-readable name of the intent. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowInteractionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowInteractionData.php new file mode 100644 index 000000000000..c651d75b244f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowInteractionData.php @@ -0,0 +1,109 @@ +google.cloud.contactcenterinsights.v1.DialogflowInteractionData + */ +class DialogflowInteractionData extends \Google\Protobuf\Internal\Message +{ + /** + * The Dialogflow intent resource path. Format: + * projects/{project}/agent/{agent}/intents/{intent} + * + * Generated from protobuf field string dialogflow_intent_id = 1; + */ + protected $dialogflow_intent_id = ''; + /** + * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dialogflow_intent_id + * The Dialogflow intent resource path. Format: + * projects/{project}/agent/{agent}/intents/{intent} + * @type float $confidence + * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The Dialogflow intent resource path. Format: + * projects/{project}/agent/{agent}/intents/{intent} + * + * Generated from protobuf field string dialogflow_intent_id = 1; + * @return string + */ + public function getDialogflowIntentId() + { + return $this->dialogflow_intent_id; + } + + /** + * The Dialogflow intent resource path. Format: + * projects/{project}/agent/{agent}/intents/{intent} + * + * Generated from protobuf field string dialogflow_intent_id = 1; + * @param string $var + * @return $this + */ + public function setDialogflowIntentId($var) + { + GPBUtil::checkString($var, True); + $this->dialogflow_intent_id = $var; + + return $this; + } + + /** + * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowSource.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowSource.php new file mode 100644 index 000000000000..34caa82bc523 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowSource.php @@ -0,0 +1,113 @@ +google.cloud.contactcenterinsights.v1.DialogflowSource + */ +class DialogflowSource extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the Dialogflow conversation that this conversation + * resource is derived from. Format: + * projects/{project}/locations/{location}/conversations/{conversation} + * + * Generated from protobuf field string dialogflow_conversation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dialogflow_conversation = ''; + /** + * Cloud Storage URI that points to a file that contains the conversation + * audio. + * + * Generated from protobuf field string audio_uri = 3; + */ + protected $audio_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dialogflow_conversation + * Output only. The name of the Dialogflow conversation that this conversation + * resource is derived from. Format: + * projects/{project}/locations/{location}/conversations/{conversation} + * @type string $audio_uri + * Cloud Storage URI that points to a file that contains the conversation + * audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the Dialogflow conversation that this conversation + * resource is derived from. Format: + * projects/{project}/locations/{location}/conversations/{conversation} + * + * Generated from protobuf field string dialogflow_conversation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDialogflowConversation() + { + return $this->dialogflow_conversation; + } + + /** + * Output only. The name of the Dialogflow conversation that this conversation + * resource is derived from. Format: + * projects/{project}/locations/{location}/conversations/{conversation} + * + * Generated from protobuf field string dialogflow_conversation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDialogflowConversation($var) + { + GPBUtil::checkString($var, True); + $this->dialogflow_conversation = $var; + + return $this; + } + + /** + * Cloud Storage URI that points to a file that contains the conversation + * audio. + * + * Generated from protobuf field string audio_uri = 3; + * @return string + */ + public function getAudioUri() + { + return $this->audio_uri; + } + + /** + * Cloud Storage URI that points to a file that contains the conversation + * audio. + * + * Generated from protobuf field string audio_uri = 3; + * @param string $var + * @return $this + */ + public function setAudioUri($var) + { + GPBUtil::checkString($var, True); + $this->audio_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity.php new file mode 100644 index 000000000000..0d8782c3a647 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity.php @@ -0,0 +1,243 @@ +google.cloud.contactcenterinsights.v1.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * The representative name for the entity. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The entity type. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Entity.Type type = 2; + */ + protected $type = 0; + /** + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + /** + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * Generated from protobuf field float salience = 4; + */ + protected $salience = 0.0; + /** + * The aggregate sentiment expressed for this entity in the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 5; + */ + protected $sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The representative name for the entity. + * @type int $type + * The entity type. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * @type float $salience + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment + * The aggregate sentiment expressed for this entity in the conversation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The representative name for the entity. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The representative name for the entity. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The entity type. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Entity.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The entity type. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Entity.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\Entity\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * + * Generated from protobuf field map metadata = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * Generated from protobuf field float salience = 4; + * @return float + */ + public function getSalience() + { + return $this->salience; + } + + /** + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * Generated from protobuf field float salience = 4; + * @param float $var + * @return $this + */ + public function setSalience($var) + { + GPBUtil::checkFloat($var); + $this->salience = $var; + + return $this; + } + + /** + * The aggregate sentiment expressed for this entity in the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 5; + * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null + */ + public function getSentiment() + { + return $this->sentiment; + } + + public function hasSentiment() + { + return isset($this->sentiment); + } + + public function clearSentiment() + { + unset($this->sentiment); + } + + /** + * The aggregate sentiment expressed for this entity in the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 5; + * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var + * @return $this + */ + public function setSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); + $this->sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity/Type.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity/Type.php new file mode 100644 index 000000000000..c5720f6505ae --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity/Type.php @@ -0,0 +1,163 @@ +google.cloud.contactcenterinsights.v1.Entity.Type + */ +class Type +{ + /** + * Unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Person. + * + * Generated from protobuf enum PERSON = 1; + */ + const PERSON = 1; + /** + * Location. + * + * Generated from protobuf enum LOCATION = 2; + */ + const LOCATION = 2; + /** + * Organization. + * + * Generated from protobuf enum ORGANIZATION = 3; + */ + const ORGANIZATION = 3; + /** + * Event. + * + * Generated from protobuf enum EVENT = 4; + */ + const EVENT = 4; + /** + * Artwork. + * + * Generated from protobuf enum WORK_OF_ART = 5; + */ + const WORK_OF_ART = 5; + /** + * Consumer product. + * + * Generated from protobuf enum CONSUMER_GOOD = 6; + */ + const CONSUMER_GOOD = 6; + /** + * Other types of entities. + * + * Generated from protobuf enum OTHER = 7; + */ + const OTHER = 7; + /** + * Phone number. + * The metadata lists the phone number (formatted according to local + * convention), plus whichever additional elements appear in the text: + * * `number` - The actual number, broken down into sections according to + * local convention. + * * `national_prefix` - Country code, if detected. + * * `area_code` - Region or area code, if detected. + * * `extension` - Phone extension (to be dialed after connection), if + * detected. + * + * Generated from protobuf enum PHONE_NUMBER = 9; + */ + const PHONE_NUMBER = 9; + /** + * Address. + * The metadata identifies the street number and locality plus whichever + * additional elements appear in the text: + * * `street_number` - Street number. + * * `locality` - City or town. + * * `street_name` - Street/route name, if detected. + * * `postal_code` - Postal code, if detected. + * * `country` - Country, if detected. + * * `broad_region` - Administrative area, such as the state, if detected. + * * `narrow_region` - Smaller administrative area, such as county, if + * detected. + * * `sublocality` - Used in Asian addresses to demark a district within a + * city, if detected. + * + * Generated from protobuf enum ADDRESS = 10; + */ + const ADDRESS = 10; + /** + * Date. + * The metadata identifies the components of the date: + * * `year` - Four digit year, if detected. + * * `month` - Two digit month number, if detected. + * * `day` - Two digit day number, if detected. + * + * Generated from protobuf enum DATE = 11; + */ + const DATE = 11; + /** + * Number. + * The metadata is the number itself. + * + * Generated from protobuf enum NUMBER = 12; + */ + const NUMBER = 12; + /** + * Price. + * The metadata identifies the `value` and `currency`. + * + * Generated from protobuf enum PRICE = 13; + */ + const PRICE = 13; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::PERSON => 'PERSON', + self::LOCATION => 'LOCATION', + self::ORGANIZATION => 'ORGANIZATION', + self::EVENT => 'EVENT', + self::WORK_OF_ART => 'WORK_OF_ART', + self::CONSUMER_GOOD => 'CONSUMER_GOOD', + self::OTHER => 'OTHER', + self::PHONE_NUMBER => 'PHONE_NUMBER', + self::ADDRESS => 'ADDRESS', + self::DATE => 'DATE', + self::NUMBER => 'NUMBER', + self::PRICE => 'PRICE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\ContactCenterInsights\V1\Entity_Type::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData.php new file mode 100644 index 000000000000..eba6ca9bc46f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData.php @@ -0,0 +1,150 @@ +google.cloud.contactcenterinsights.v1.EntityMentionData + */ +class EntityMentionData extends \Google\Protobuf\Internal\Message +{ + /** + * The key of this entity in conversation entities. + * Can be used to retrieve the exact `Entity` this mention is attached to. + * + * Generated from protobuf field string entity_unique_id = 1; + */ + protected $entity_unique_id = ''; + /** + * The type of the entity mention. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType type = 2; + */ + protected $type = 0; + /** + * Sentiment expressed for this mention of the entity. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 3; + */ + protected $sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity_unique_id + * The key of this entity in conversation entities. + * Can be used to retrieve the exact `Entity` this mention is attached to. + * @type int $type + * The type of the entity mention. + * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment + * Sentiment expressed for this mention of the entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The key of this entity in conversation entities. + * Can be used to retrieve the exact `Entity` this mention is attached to. + * + * Generated from protobuf field string entity_unique_id = 1; + * @return string + */ + public function getEntityUniqueId() + { + return $this->entity_unique_id; + } + + /** + * The key of this entity in conversation entities. + * Can be used to retrieve the exact `Entity` this mention is attached to. + * + * Generated from protobuf field string entity_unique_id = 1; + * @param string $var + * @return $this + */ + public function setEntityUniqueId($var) + { + GPBUtil::checkString($var, True); + $this->entity_unique_id = $var; + + return $this; + } + + /** + * The type of the entity mention. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the entity mention. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\EntityMentionData\MentionType::class); + $this->type = $var; + + return $this; + } + + /** + * Sentiment expressed for this mention of the entity. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null + */ + public function getSentiment() + { + return $this->sentiment; + } + + public function hasSentiment() + { + return isset($this->sentiment); + } + + public function clearSentiment() + { + unset($this->sentiment); + } + + /** + * Sentiment expressed for this mention of the entity. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var + * @return $this + */ + public function setSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); + $this->sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData/MentionType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData/MentionType.php new file mode 100644 index 000000000000..307fbc01afa5 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData/MentionType.php @@ -0,0 +1,64 @@ +google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType + */ +class MentionType +{ + /** + * Unspecified. + * + * Generated from protobuf enum MENTION_TYPE_UNSPECIFIED = 0; + */ + const MENTION_TYPE_UNSPECIFIED = 0; + /** + * Proper noun. + * + * Generated from protobuf enum PROPER = 1; + */ + const PROPER = 1; + /** + * Common noun (or noun compound). + * + * Generated from protobuf enum COMMON = 2; + */ + const COMMON = 2; + + private static $valueToName = [ + self::MENTION_TYPE_UNSPECIFIED => 'MENTION_TYPE_UNSPECIFIED', + self::PROPER => 'PROPER', + self::COMMON => 'COMMON', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MentionType::class, \Google\Cloud\ContactCenterInsights\V1\EntityMentionData_MentionType::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExactMatchConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExactMatchConfig.php new file mode 100644 index 000000000000..f9f8af221b17 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExactMatchConfig.php @@ -0,0 +1,67 @@ +google.cloud.contactcenterinsights.v1.ExactMatchConfig + */ +class ExactMatchConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether to consider case sensitivity when performing an exact match. + * + * Generated from protobuf field bool case_sensitive = 1; + */ + protected $case_sensitive = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $case_sensitive + * Whether to consider case sensitivity when performing an exact match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Whether to consider case sensitivity when performing an exact match. + * + * Generated from protobuf field bool case_sensitive = 1; + * @return bool + */ + public function getCaseSensitive() + { + return $this->case_sensitive; + } + + /** + * Whether to consider case sensitivity when performing an exact match. + * + * Generated from protobuf field bool case_sensitive = 1; + * @param bool $var + * @return $this + */ + public function setCaseSensitive($var) + { + GPBUtil::checkBool($var); + $this->case_sensitive = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataMetadata.php new file mode 100644 index 000000000000..f4808758212b --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataMetadata.php @@ -0,0 +1,203 @@ +google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + */ +class ExportInsightsDataMetadata 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; + /** + * The original request for export. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest request = 3; + */ + protected $request = null; + /** + * Partial errors during export 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\ExportInsightsDataRequest $request + * The original request for export. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors + * Partial errors during export 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; + } + + /** + * The original request for export. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest request = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The original request for export. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest request = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest::class); + $this->request = $var; + + return $this; + } + + /** + * Partial errors during export 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 export 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest.php new file mode 100644 index 000000000000..6e4f506ab972 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest.php @@ -0,0 +1,237 @@ +google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + */ +class ExportInsightsDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource to export data from. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * A filter to reduce results to a specific subset. Useful for exporting + * conversations with specific properties. + * + * Generated from protobuf field string filter = 3; + */ + protected $filter = ''; + /** + * A fully qualified KMS key name for BigQuery tables protected by CMEK. + * Format: + * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} + * + * Generated from protobuf field string kms_key = 4; + */ + protected $kms_key = ''; + /** + * Options for what to do if the destination table already exists. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition write_disposition = 5; + */ + protected $write_disposition = 0; + protected $destination; + + /** + * @param string $parent Required. The parent resource to export data from. Please see + * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest + * + * @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\ExportInsightsDataRequest\BigQueryDestination $big_query_destination + * Specified if sink is a BigQuery table. + * @type string $parent + * Required. The parent resource to export data from. + * @type string $filter + * A filter to reduce results to a specific subset. Useful for exporting + * conversations with specific properties. + * @type string $kms_key + * A fully qualified KMS key name for BigQuery tables protected by CMEK. + * Format: + * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} + * @type int $write_disposition + * Options for what to do if the destination table already exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Specified if sink is a BigQuery table. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination big_query_destination = 2; + * @return \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\BigQueryDestination|null + */ + public function getBigQueryDestination() + { + return $this->readOneof(2); + } + + public function hasBigQueryDestination() + { + return $this->hasOneof(2); + } + + /** + * Specified if sink is a BigQuery table. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination big_query_destination = 2; + * @param \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\BigQueryDestination $var + * @return $this + */ + public function setBigQueryDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\BigQueryDestination::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The parent resource to export data from. + * + * 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 to export data from. + * + * 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; + } + + /** + * A filter to reduce results to a specific subset. Useful for exporting + * conversations with specific properties. + * + * Generated from protobuf field string filter = 3; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter to reduce results to a specific subset. Useful for exporting + * conversations with specific properties. + * + * Generated from protobuf field string filter = 3; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A fully qualified KMS key name for BigQuery tables protected by CMEK. + * Format: + * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} + * + * Generated from protobuf field string kms_key = 4; + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * A fully qualified KMS key name for BigQuery tables protected by CMEK. + * Format: + * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} + * + * Generated from protobuf field string kms_key = 4; + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + + /** + * Options for what to do if the destination table already exists. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition write_disposition = 5; + * @return int + */ + public function getWriteDisposition() + { + return $this->write_disposition; + } + + /** + * Options for what to do if the destination table already exists. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition write_disposition = 5; + * @param int $var + * @return $this + */ + public function setWriteDisposition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\WriteDisposition::class); + $this->write_disposition = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/BigQueryDestination.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/BigQueryDestination.php new file mode 100644 index 000000000000..329de57ac90f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/BigQueryDestination.php @@ -0,0 +1,162 @@ +google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + */ +class BigQueryDestination extends \Google\Protobuf\Internal\Message +{ + /** + * A project ID or number. If specified, then export will attempt to + * write data to this project instead of the resource project. Otherwise, + * the resource project will be used. + * + * Generated from protobuf field string project_id = 3; + */ + protected $project_id = ''; + /** + * Required. The name of the BigQuery dataset that the snapshot result + * should be exported to. If this dataset does not exist, the export call + * returns an INVALID_ARGUMENT error. + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset = ''; + /** + * The BigQuery table name to which the insights data should be written. + * If this table does not exist, the export call returns an INVALID_ARGUMENT + * error. + * + * Generated from protobuf field string table = 2; + */ + protected $table = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * A project ID or number. If specified, then export will attempt to + * write data to this project instead of the resource project. Otherwise, + * the resource project will be used. + * @type string $dataset + * Required. The name of the BigQuery dataset that the snapshot result + * should be exported to. If this dataset does not exist, the export call + * returns an INVALID_ARGUMENT error. + * @type string $table + * The BigQuery table name to which the insights data should be written. + * If this table does not exist, the export call returns an INVALID_ARGUMENT + * error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * A project ID or number. If specified, then export will attempt to + * write data to this project instead of the resource project. Otherwise, + * the resource project will be used. + * + * Generated from protobuf field string project_id = 3; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * A project ID or number. If specified, then export will attempt to + * write data to this project instead of the resource project. Otherwise, + * the resource project will be used. + * + * Generated from protobuf field string project_id = 3; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The name of the BigQuery dataset that the snapshot result + * should be exported to. If this dataset does not exist, the export call + * returns an INVALID_ARGUMENT error. + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * Required. The name of the BigQuery dataset that the snapshot result + * should be exported to. If this dataset does not exist, the export call + * returns an INVALID_ARGUMENT error. + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + + /** + * The BigQuery table name to which the insights data should be written. + * If this table does not exist, the export call returns an INVALID_ARGUMENT + * error. + * + * Generated from protobuf field string table = 2; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * The BigQuery table name to which the insights data should be written. + * If this table does not exist, the export call returns an INVALID_ARGUMENT + * error. + * + * Generated from protobuf field string table = 2; + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigQueryDestination::class, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest_BigQueryDestination::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/WriteDisposition.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/WriteDisposition.php new file mode 100644 index 000000000000..66d34f848fc5 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/WriteDisposition.php @@ -0,0 +1,65 @@ +google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition + */ +class WriteDisposition +{ + /** + * Write disposition is not specified. Defaults to WRITE_TRUNCATE. + * + * Generated from protobuf enum WRITE_DISPOSITION_UNSPECIFIED = 0; + */ + const WRITE_DISPOSITION_UNSPECIFIED = 0; + /** + * If the table already exists, BigQuery will overwrite the table data and + * use the schema from the load. + * + * Generated from protobuf enum WRITE_TRUNCATE = 1; + */ + const WRITE_TRUNCATE = 1; + /** + * If the table already exists, BigQuery will append data to the table. + * + * Generated from protobuf enum WRITE_APPEND = 2; + */ + const WRITE_APPEND = 2; + + private static $valueToName = [ + self::WRITE_DISPOSITION_UNSPECIFIED => 'WRITE_DISPOSITION_UNSPECIFIED', + self::WRITE_TRUNCATE => 'WRITE_TRUNCATE', + self::WRITE_APPEND => 'WRITE_APPEND', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WriteDisposition::class, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest_WriteDisposition::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataResponse.php new file mode 100644 index 000000000000..32c0c790acf4 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataResponse.php @@ -0,0 +1,33 @@ +google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + */ +class ExportInsightsDataResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/FaqAnswerData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/FaqAnswerData.php new file mode 100644 index 000000000000..e6d8e8c35931 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/FaqAnswerData.php @@ -0,0 +1,265 @@ +google.cloud.contactcenterinsights.v1.FaqAnswerData + */ +class FaqAnswerData extends \Google\Protobuf\Internal\Message +{ + /** + * The piece of text from the `source` knowledge base document. + * + * Generated from protobuf field string answer = 1; + */ + protected $answer = ''; + /** + * The system's confidence score that this answer is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field float confidence_score = 2; + */ + protected $confidence_score = 0.0; + /** + * The corresponding FAQ question. + * + * Generated from protobuf field string question = 3; + */ + protected $question = ''; + /** + * Map that contains metadata about the FAQ answer and the document that + * it originates from. + * + * Generated from protobuf field map metadata = 4; + */ + private $metadata; + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 5; + */ + protected $query_record = ''; + /** + * The knowledge document that this answer was extracted from. + * Format: + * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. + * + * Generated from protobuf field string source = 6; + */ + protected $source = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $answer + * The piece of text from the `source` knowledge base document. + * @type float $confidence_score + * The system's confidence score that this answer is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * @type string $question + * The corresponding FAQ question. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Map that contains metadata about the FAQ answer and the document that + * it originates from. + * @type string $query_record + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * @type string $source + * The knowledge document that this answer was extracted from. + * Format: + * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The piece of text from the `source` knowledge base document. + * + * Generated from protobuf field string answer = 1; + * @return string + */ + public function getAnswer() + { + return $this->answer; + } + + /** + * The piece of text from the `source` knowledge base document. + * + * Generated from protobuf field string answer = 1; + * @param string $var + * @return $this + */ + public function setAnswer($var) + { + GPBUtil::checkString($var, True); + $this->answer = $var; + + return $this; + } + + /** + * The system's confidence score that this answer is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field float confidence_score = 2; + * @return float + */ + public function getConfidenceScore() + { + return $this->confidence_score; + } + + /** + * The system's confidence score that this answer is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field float confidence_score = 2; + * @param float $var + * @return $this + */ + public function setConfidenceScore($var) + { + GPBUtil::checkFloat($var); + $this->confidence_score = $var; + + return $this; + } + + /** + * The corresponding FAQ question. + * + * Generated from protobuf field string question = 3; + * @return string + */ + public function getQuestion() + { + return $this->question; + } + + /** + * The corresponding FAQ question. + * + * Generated from protobuf field string question = 3; + * @param string $var + * @return $this + */ + public function setQuestion($var) + { + GPBUtil::checkString($var, True); + $this->question = $var; + + return $this; + } + + /** + * Map that contains metadata about the FAQ answer and the document that + * it originates from. + * + * Generated from protobuf field map metadata = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Map that contains metadata about the FAQ answer and the document that + * it originates from. + * + * Generated from protobuf field map metadata = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 5; + * @return string + */ + public function getQueryRecord() + { + return $this->query_record; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 5; + * @param string $var + * @return $this + */ + public function setQueryRecord($var) + { + GPBUtil::checkString($var, True); + $this->query_record = $var; + + return $this; + } + + /** + * The knowledge document that this answer was extracted from. + * Format: + * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. + * + * Generated from protobuf field string source = 6; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * The knowledge document that this answer was extracted from. + * Format: + * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. + * + * Generated from protobuf field string source = 6; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GcsSource.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GcsSource.php new file mode 100644 index 000000000000..2125a846c4af --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GcsSource.php @@ -0,0 +1,109 @@ +google.cloud.contactcenterinsights.v1.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Storage URI that points to a file that contains the conversation + * audio. + * + * Generated from protobuf field string audio_uri = 1; + */ + protected $audio_uri = ''; + /** + * Immutable. Cloud Storage URI that points to a file that contains the + * conversation transcript. + * + * Generated from protobuf field string transcript_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $transcript_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $audio_uri + * Cloud Storage URI that points to a file that contains the conversation + * audio. + * @type string $transcript_uri + * Immutable. Cloud Storage URI that points to a file that contains the + * conversation transcript. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage URI that points to a file that contains the conversation + * audio. + * + * Generated from protobuf field string audio_uri = 1; + * @return string + */ + public function getAudioUri() + { + return $this->audio_uri; + } + + /** + * Cloud Storage URI that points to a file that contains the conversation + * audio. + * + * Generated from protobuf field string audio_uri = 1; + * @param string $var + * @return $this + */ + public function setAudioUri($var) + { + GPBUtil::checkString($var, True); + $this->audio_uri = $var; + + return $this; + } + + /** + * Immutable. Cloud Storage URI that points to a file that contains the + * conversation transcript. + * + * Generated from protobuf field string transcript_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getTranscriptUri() + { + return $this->transcript_uri; + } + + /** + * Immutable. Cloud Storage URI that points to a file that contains the + * conversation transcript. + * + * Generated from protobuf field string transcript_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setTranscriptUri($var) + { + GPBUtil::checkString($var, True); + $this->transcript_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetAnalysisRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetAnalysisRequest.php new file mode 100644 index 000000000000..a46e863a67e9 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetAnalysisRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.GetAnalysisRequest + */ +class GetAnalysisRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the analysis 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 analysis to get. Please see + * {@see ContactCenterInsightsClient::analysisName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\GetAnalysisRequest + * + * @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 analysis to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the analysis 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 analysis 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetConversationRequest.php new file mode 100644 index 000000000000..7c69e507e417 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetConversationRequest.php @@ -0,0 +1,115 @@ +google.cloud.contactcenterinsights.v1.GetConversationRequest + */ +class GetConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the conversation to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The level of details of the conversation. Default is `FULL`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 2; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the conversation to get. Please see + * {@see ContactCenterInsightsClient::conversationName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\GetConversationRequest + * + * @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 conversation to get. + * @type int $view + * The level of details of the conversation. Default is `FULL`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the conversation 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 conversation 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; + } + + /** + * The level of details of the conversation. Default is `FULL`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 2; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * The level of details of the conversation. Default is `FULL`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 2; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ConversationView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueModelRequest.php new file mode 100644 index 000000000000..0de9b87c59ea --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueModelRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.GetIssueModelRequest + */ +class GetIssueModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the issue model 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 issue model to get. Please see + * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\GetIssueModelRequest + * + * @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 issue model to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the issue model 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 issue model 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueRequest.php new file mode 100644 index 000000000000..6ce5364cc99a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.GetIssueRequest + */ +class GetIssueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the issue 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 issue to get. Please see + * {@see ContactCenterInsightsClient::issueName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\GetIssueRequest + * + * @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 issue to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the issue 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 issue 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetPhraseMatcherRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetPhraseMatcherRequest.php new file mode 100644 index 000000000000..cfdbf04b0d0f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetPhraseMatcherRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + */ +class GetPhraseMatcherRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the phrase matcher 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 phrase matcher to get. Please see + * {@see ContactCenterInsightsClient::phraseMatcherName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\GetPhraseMatcherRequest + * + * @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 phrase matcher to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the phrase matcher 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 phrase matcher 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetSettingsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetSettingsRequest.php new file mode 100644 index 000000000000..91add76d1818 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetSettingsRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.GetSettingsRequest + */ +class GetSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the settings 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 settings resource to get. Please see + * {@see ContactCenterInsightsClient::settingsName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\GetSettingsRequest + * + * @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 settings resource to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the settings 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 settings 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetViewRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetViewRequest.php new file mode 100644 index 000000000000..0f38bc1c31e2 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetViewRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.GetViewRequest + */ +class GetViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the view 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 view to get. Please see + * {@see ContactCenterInsightsClient::viewName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\GetViewRequest + * + * @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 view to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the view 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 view 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/HoldData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/HoldData.php new file mode 100644 index 000000000000..bd7f70e930ef --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/HoldData.php @@ -0,0 +1,33 @@ +google.cloud.contactcenterinsights.v1.HoldData + */ +class HoldData 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\Resources::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata.php new file mode 100644 index 000000000000..5923845b70e2 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata.php @@ -0,0 +1,247 @@ +google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + */ +class IngestConversationsMetadata 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 ingest. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $request = null; + /** + * Output only. Partial errors during ingest operation that might cause the + * operation output to be incomplete. + * + * Generated from protobuf field repeated .google.rpc.Status partial_errors = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $partial_errors; + /** + * Output only. Statistics for IngestConversations operation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStats ingest_conversations_stats = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ingest_conversations_stats = null; + + /** + * 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\IngestConversationsRequest $request + * Output only. The original request for ingest. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors + * Output only. Partial errors during ingest operation that might cause the + * operation output to be incomplete. + * @type \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata\IngestConversationsStats $ingest_conversations_stats + * Output only. Statistics for IngestConversations operation. + * } + */ + 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 ingest. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest|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 ingest. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest::class); + $this->request = $var; + + return $this; + } + + /** + * Output only. Partial errors during ingest operation that might cause the + * operation output to be incomplete. + * + * Generated from protobuf field repeated .google.rpc.Status partial_errors = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartialErrors() + { + return $this->partial_errors; + } + + /** + * Output only. Partial errors during ingest operation that might cause the + * operation output to be incomplete. + * + * Generated from protobuf field repeated .google.rpc.Status partial_errors = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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; + } + + /** + * Output only. Statistics for IngestConversations operation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStats ingest_conversations_stats = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata\IngestConversationsStats|null + */ + public function getIngestConversationsStats() + { + return $this->ingest_conversations_stats; + } + + public function hasIngestConversationsStats() + { + return isset($this->ingest_conversations_stats); + } + + public function clearIngestConversationsStats() + { + unset($this->ingest_conversations_stats); + } + + /** + * Output only. Statistics for IngestConversations operation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStats ingest_conversations_stats = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata\IngestConversationsStats $var + * @return $this + */ + public function setIngestConversationsStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata\IngestConversationsStats::class); + $this->ingest_conversations_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata/IngestConversationsStats.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata/IngestConversationsStats.php new file mode 100644 index 000000000000..eb1243032ccd --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata/IngestConversationsStats.php @@ -0,0 +1,184 @@ +google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStats + */ +class IngestConversationsStats extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The number of objects processed during the ingest operation. + * + * Generated from protobuf field int32 processed_object_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $processed_object_count = 0; + /** + * Output only. The number of objects skipped because another conversation + * with the same transcript uri had already been ingested. + * + * Generated from protobuf field int32 duplicates_skipped_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $duplicates_skipped_count = 0; + /** + * Output only. The number of new conversations added during this ingest + * operation. + * + * Generated from protobuf field int32 successful_ingest_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $successful_ingest_count = 0; + /** + * Output only. The number of objects which were unable to be ingested due + * to errors. The errors are populated in the partial_errors field. + * + * Generated from protobuf field int32 failed_ingest_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failed_ingest_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $processed_object_count + * Output only. The number of objects processed during the ingest operation. + * @type int $duplicates_skipped_count + * Output only. The number of objects skipped because another conversation + * with the same transcript uri had already been ingested. + * @type int $successful_ingest_count + * Output only. The number of new conversations added during this ingest + * operation. + * @type int $failed_ingest_count + * Output only. The number of objects which were unable to be ingested due + * to errors. The errors are populated in the partial_errors field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The number of objects processed during the ingest operation. + * + * Generated from protobuf field int32 processed_object_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProcessedObjectCount() + { + return $this->processed_object_count; + } + + /** + * Output only. The number of objects processed during the ingest operation. + * + * Generated from protobuf field int32 processed_object_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProcessedObjectCount($var) + { + GPBUtil::checkInt32($var); + $this->processed_object_count = $var; + + return $this; + } + + /** + * Output only. The number of objects skipped because another conversation + * with the same transcript uri had already been ingested. + * + * Generated from protobuf field int32 duplicates_skipped_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDuplicatesSkippedCount() + { + return $this->duplicates_skipped_count; + } + + /** + * Output only. The number of objects skipped because another conversation + * with the same transcript uri had already been ingested. + * + * Generated from protobuf field int32 duplicates_skipped_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDuplicatesSkippedCount($var) + { + GPBUtil::checkInt32($var); + $this->duplicates_skipped_count = $var; + + return $this; + } + + /** + * Output only. The number of new conversations added during this ingest + * operation. + * + * Generated from protobuf field int32 successful_ingest_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSuccessfulIngestCount() + { + return $this->successful_ingest_count; + } + + /** + * Output only. The number of new conversations added during this ingest + * operation. + * + * Generated from protobuf field int32 successful_ingest_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSuccessfulIngestCount($var) + { + GPBUtil::checkInt32($var); + $this->successful_ingest_count = $var; + + return $this; + } + + /** + * Output only. The number of objects which were unable to be ingested due + * to errors. The errors are populated in the partial_errors field. + * + * Generated from protobuf field int32 failed_ingest_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFailedIngestCount() + { + return $this->failed_ingest_count; + } + + /** + * Output only. The number of objects which were unable to be ingested due + * to errors. The errors are populated in the partial_errors field. + * + * Generated from protobuf field int32 failed_ingest_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFailedIngestCount($var) + { + GPBUtil::checkInt32($var); + $this->failed_ingest_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IngestConversationsStats::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata_IngestConversationsStats::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest.php new file mode 100644 index 000000000000..96c359e2ee87 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest.php @@ -0,0 +1,308 @@ +google.cloud.contactcenterinsights.v1.IngestConversationsRequest + */ +class IngestConversationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource for new conversations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Configuration that applies to all conversations. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig conversation_config = 4; + */ + protected $conversation_config = null; + /** + * Optional. DLP settings for transcript redaction. Optional, will default to + * the config specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $redaction_config = null; + /** + * Optional. Default Speech-to-Text configuration. Optional, will default to + * the config specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $speech_config = null; + protected $source; + protected $object_config; + + /** + * @param string $parent Required. The parent resource for new conversations. Please see + * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest + * + * @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\IngestConversationsRequest\GcsSource $gcs_source + * A cloud storage bucket source. Note that any previously ingested objects + * from the source will be skipped to avoid duplication. + * @type \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\TranscriptObjectConfig $transcript_object_config + * Configuration for when `source` contains conversation transcripts. + * @type string $parent + * Required. The parent resource for new conversations. + * @type \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\ConversationConfig $conversation_config + * Configuration that applies to all conversations. + * @type \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $redaction_config + * Optional. DLP settings for transcript redaction. Optional, will default to + * the config specified in Settings. + * @type \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $speech_config + * Optional. Default Speech-to-Text configuration. Optional, will default to + * the config specified in Settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * A cloud storage bucket source. Note that any previously ingested objects + * from the source will be skipped to avoid duplication. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource gcs_source = 2; + * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(2); + } + + public function hasGcsSource() + { + return $this->hasOneof(2); + } + + /** + * A cloud storage bucket source. Note that any previously ingested objects + * from the source will be skipped to avoid duplication. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource gcs_source = 2; + * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\GcsSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Configuration for when `source` contains conversation transcripts. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig transcript_object_config = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\TranscriptObjectConfig|null + */ + public function getTranscriptObjectConfig() + { + return $this->readOneof(3); + } + + public function hasTranscriptObjectConfig() + { + return $this->hasOneof(3); + } + + /** + * Configuration for when `source` contains conversation transcripts. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig transcript_object_config = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\TranscriptObjectConfig $var + * @return $this + */ + public function setTranscriptObjectConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\TranscriptObjectConfig::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. The parent resource for new conversations. + * + * 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 for new conversations. + * + * 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; + } + + /** + * Configuration that applies to all conversations. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig conversation_config = 4; + * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\ConversationConfig|null + */ + public function getConversationConfig() + { + return $this->conversation_config; + } + + public function hasConversationConfig() + { + return isset($this->conversation_config); + } + + public function clearConversationConfig() + { + unset($this->conversation_config); + } + + /** + * Configuration that applies to all conversations. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig conversation_config = 4; + * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\ConversationConfig $var + * @return $this + */ + public function setConversationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\ConversationConfig::class); + $this->conversation_config = $var; + + return $this; + } + + /** + * Optional. DLP settings for transcript redaction. Optional, will default to + * the config specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ContactCenterInsights\V1\RedactionConfig|null + */ + public function getRedactionConfig() + { + return $this->redaction_config; + } + + public function hasRedactionConfig() + { + return isset($this->redaction_config); + } + + public function clearRedactionConfig() + { + unset($this->redaction_config); + } + + /** + * Optional. DLP settings for transcript redaction. Optional, will default to + * the config specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $var + * @return $this + */ + public function setRedactionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\RedactionConfig::class); + $this->redaction_config = $var; + + return $this; + } + + /** + * Optional. Default Speech-to-Text configuration. Optional, will default to + * the config specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ContactCenterInsights\V1\SpeechConfig|null + */ + public function getSpeechConfig() + { + return $this->speech_config; + } + + public function hasSpeechConfig() + { + return isset($this->speech_config); + } + + public function clearSpeechConfig() + { + unset($this->speech_config); + } + + /** + * Optional. Default Speech-to-Text configuration. Optional, will default to + * the config specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $var + * @return $this + */ + public function setSpeechConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SpeechConfig::class); + $this->speech_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getObjectConfig() + { + return $this->whichOneof("object_config"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/ConversationConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/ConversationConfig.php new file mode 100644 index 000000000000..e1a95b0a3ce8 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/ConversationConfig.php @@ -0,0 +1,158 @@ +google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + */ +class ConversationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * An opaque, user-specified string representing the human agent who handled + * the conversations. + * + * Generated from protobuf field string agent_id = 1; + */ + protected $agent_id = ''; + /** + * 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 + * analyzed. + * + * Generated from protobuf field int32 agent_channel = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $agent_channel = 0; + /** + * 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 + * analyzed. + * + * Generated from protobuf field int32 customer_channel = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $customer_channel = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agent_id + * An opaque, user-specified string representing the human agent who handled + * the conversations. + * @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 + * analyzed. + * @type int $customer_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 + * analyzed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * An opaque, user-specified string representing the human agent who handled + * the conversations. + * + * Generated from protobuf field string agent_id = 1; + * @return string + */ + public function getAgentId() + { + return $this->agent_id; + } + + /** + * An opaque, user-specified string representing the human agent who handled + * the conversations. + * + * Generated from protobuf field string agent_id = 1; + * @param string $var + * @return $this + */ + public function setAgentId($var) + { + GPBUtil::checkString($var, True); + $this->agent_id = $var; + + return $this; + } + + /** + * 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 + * analyzed. + * + * Generated from protobuf field int32 agent_channel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAgentChannel() + { + return $this->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 + * analyzed. + * + * Generated from protobuf field int32 agent_channel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAgentChannel($var) + { + GPBUtil::checkInt32($var); + $this->agent_channel = $var; + + return $this; + } + + /** + * 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 + * analyzed. + * + * Generated from protobuf field int32 customer_channel = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCustomerChannel() + { + return $this->customer_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 + * analyzed. + * + * Generated from protobuf field int32 customer_channel = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCustomerChannel($var) + { + GPBUtil::checkInt32($var); + $this->customer_channel = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConversationConfig::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest_ConversationConfig::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource.php new file mode 100644 index 000000000000..dda6efd7acf2 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource.php @@ -0,0 +1,104 @@ +google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cloud Storage bucket containing source objects. + * + * Generated from protobuf field string bucket_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket_uri = ''; + /** + * Optional. Specifies the type of the objects in `bucket_uri`. + * + * 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; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket_uri + * Required. The Cloud Storage bucket containing source objects. + * @type int $bucket_object_type + * Optional. Specifies the type of the objects in `bucket_uri`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cloud Storage bucket containing source objects. + * + * Generated from protobuf field string bucket_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucketUri() + { + return $this->bucket_uri; + } + + /** + * Required. The Cloud Storage bucket containing source objects. + * + * Generated from protobuf field string bucket_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucketUri($var) + { + GPBUtil::checkString($var, True); + $this->bucket_uri = $var; + + return $this; + } + + /** + * Optional. Specifies the type of the objects in `bucket_uri`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType bucket_object_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBucketObjectType() + { + return $this->bucket_object_type; + } + + /** + * Optional. Specifies the type of the objects in `bucket_uri`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType bucket_object_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBucketObjectType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\GcsSource\BucketObjectType::class); + $this->bucket_object_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GcsSource::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest_GcsSource::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource/BucketObjectType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource/BucketObjectType.php new file mode 100644 index 000000000000..826704c5a327 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource/BucketObjectType.php @@ -0,0 +1,62 @@ +google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType + */ +class BucketObjectType +{ + /** + * The object type is unspecified and will default to `TRANSCRIPT`. + * + * Generated from protobuf enum BUCKET_OBJECT_TYPE_UNSPECIFIED = 0; + */ + const BUCKET_OBJECT_TYPE_UNSPECIFIED = 0; + /** + * The object is a transcript. + * + * Generated from protobuf enum TRANSCRIPT = 1; + */ + const TRANSCRIPT = 1; + /** + * The object is an audio file. + * + * Generated from protobuf enum AUDIO = 2; + */ + const AUDIO = 2; + + private static $valueToName = [ + self::BUCKET_OBJECT_TYPE_UNSPECIFIED => 'BUCKET_OBJECT_TYPE_UNSPECIFIED', + self::TRANSCRIPT => 'TRANSCRIPT', + self::AUDIO => 'AUDIO', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BucketObjectType::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest_GcsSource_BucketObjectType::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/TranscriptObjectConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/TranscriptObjectConfig.php new file mode 100644 index 000000000000..928cc9f5e174 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/TranscriptObjectConfig.php @@ -0,0 +1,70 @@ +google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + */ +class TranscriptObjectConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The medium transcript objects represent. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $medium = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $medium + * Required. The medium transcript objects represent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The medium transcript objects represent. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMedium() + { + return $this->medium; + } + + /** + * Required. The medium transcript objects represent. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMedium($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Medium::class); + $this->medium = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TranscriptObjectConfig::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest_TranscriptObjectConfig::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsResponse.php new file mode 100644 index 000000000000..97d2e9727617 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsResponse.php @@ -0,0 +1,33 @@ +google.cloud.contactcenterinsights.v1.IngestConversationsResponse + */ +class IngestConversationsResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Intent.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Intent.php new file mode 100644 index 000000000000..74f40304f91e --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Intent.php @@ -0,0 +1,102 @@ +google.cloud.contactcenterinsights.v1.Intent + */ +class Intent extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the intent. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The human-readable name of the intent. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The unique identifier of the intent. + * @type string $display_name + * The human-readable name of the intent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the intent. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The unique identifier of the intent. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The human-readable name of the intent. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human-readable name of the intent. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IntentMatchData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IntentMatchData.php new file mode 100644 index 000000000000..7997dc89a081 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IntentMatchData.php @@ -0,0 +1,74 @@ +google.cloud.contactcenterinsights.v1.IntentMatchData + */ +class IntentMatchData extends \Google\Protobuf\Internal\Message +{ + /** + * The id of the matched intent. + * Can be used to retrieve the corresponding intent information. + * + * Generated from protobuf field string intent_unique_id = 1; + */ + protected $intent_unique_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $intent_unique_id + * The id of the matched intent. + * Can be used to retrieve the corresponding intent information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The id of the matched intent. + * Can be used to retrieve the corresponding intent information. + * + * Generated from protobuf field string intent_unique_id = 1; + * @return string + */ + public function getIntentUniqueId() + { + return $this->intent_unique_id; + } + + /** + * The id of the matched intent. + * Can be used to retrieve the corresponding intent information. + * + * Generated from protobuf field string intent_unique_id = 1; + * @param string $var + * @return $this + */ + public function setIntentUniqueId($var) + { + GPBUtil::checkString($var, True); + $this->intent_unique_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/InterruptionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/InterruptionData.php new file mode 100644 index 000000000000..c6692b654dbc --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/InterruptionData.php @@ -0,0 +1,33 @@ +google.cloud.contactcenterinsights.v1.InterruptionData + */ +class InterruptionData 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\Resources::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Issue.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Issue.php new file mode 100644 index 000000000000..7c46c7d9df38 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Issue.php @@ -0,0 +1,235 @@ +google.cloud.contactcenterinsights.v1.Issue + */ +class Issue extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of the issue. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The representative name for the issue. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Output only. The time at which this issue was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The most recent time that this issue was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Resource names of the sample representative utterances that + * match to this issue. + * + * Generated from protobuf field repeated string sample_utterances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $sample_utterances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of the issue. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * @type string $display_name + * The representative name for the issue. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this issue was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The most recent time that this issue was updated. + * @type array|\Google\Protobuf\Internal\RepeatedField $sample_utterances + * Output only. Resource names of the sample representative utterances that + * match to this issue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of the issue. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * + * 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 issue. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * + * 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; + } + + /** + * The representative name for the issue. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The representative name for the issue. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The time at which this issue was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which this issue was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 most recent time that this issue was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The most recent time that this issue was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Resource names of the sample representative utterances that + * match to this issue. + * + * Generated from protobuf field repeated string sample_utterances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSampleUtterances() + { + return $this->sample_utterances; + } + + /** + * Output only. Resource names of the sample representative utterances that + * match to this issue. + * + * Generated from protobuf field repeated string sample_utterances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSampleUtterances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->sample_utterances = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueAssignment.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueAssignment.php new file mode 100644 index 000000000000..bfe826f1fadc --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueAssignment.php @@ -0,0 +1,143 @@ +google.cloud.contactcenterinsights.v1.IssueAssignment + */ +class IssueAssignment extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the assigned issue. + * + * Generated from protobuf field string issue = 1; + */ + protected $issue = ''; + /** + * Score indicating the likelihood of the issue assignment. + * currently bounded on [0,1]. + * + * Generated from protobuf field double score = 2; + */ + protected $score = 0.0; + /** + * Immutable. Display name of the assigned issue. This field is set at time of + * analyis and immutable since then. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issue + * Resource name of the assigned issue. + * @type float $score + * Score indicating the likelihood of the issue assignment. + * currently bounded on [0,1]. + * @type string $display_name + * Immutable. Display name of the assigned issue. This field is set at time of + * analyis and immutable since then. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the assigned issue. + * + * Generated from protobuf field string issue = 1; + * @return string + */ + public function getIssue() + { + return $this->issue; + } + + /** + * Resource name of the assigned issue. + * + * Generated from protobuf field string issue = 1; + * @param string $var + * @return $this + */ + public function setIssue($var) + { + GPBUtil::checkString($var, True); + $this->issue = $var; + + return $this; + } + + /** + * Score indicating the likelihood of the issue assignment. + * currently bounded on [0,1]. + * + * Generated from protobuf field double score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Score indicating the likelihood of the issue assignment. + * currently bounded on [0,1]. + * + * Generated from protobuf field double score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkDouble($var); + $this->score = $var; + + return $this; + } + + /** + * Immutable. Display name of the assigned issue. This field is set at time of + * analyis and immutable since then. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Immutable. Display name of the assigned issue. This field is set at time of + * analyis and immutable since then. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueMatchData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueMatchData.php new file mode 100644 index 000000000000..a0efc3fe72dd --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueMatchData.php @@ -0,0 +1,77 @@ +google.cloud.contactcenterinsights.v1.IssueMatchData + */ +class IssueMatchData extends \Google\Protobuf\Internal\Message +{ + /** + * Information about the issue's assignment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueAssignment issue_assignment = 1; + */ + protected $issue_assignment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\IssueAssignment $issue_assignment + * Information about the issue's assignment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Information about the issue's assignment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueAssignment issue_assignment = 1; + * @return \Google\Cloud\ContactCenterInsights\V1\IssueAssignment|null + */ + public function getIssueAssignment() + { + return $this->issue_assignment; + } + + public function hasIssueAssignment() + { + return isset($this->issue_assignment); + } + + public function clearIssueAssignment() + { + unset($this->issue_assignment); + } + + /** + * Information about the issue's assignment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueAssignment issue_assignment = 1; + * @param \Google\Cloud\ContactCenterInsights\V1\IssueAssignment $var + * @return $this + */ + public function setIssueAssignment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueAssignment::class); + $this->issue_assignment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel.php new file mode 100644 index 000000000000..5f48567214a1 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel.php @@ -0,0 +1,425 @@ +google.cloud.contactcenterinsights.v1.IssueModel + */ +class IssueModel extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of the issue model. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The representative name for the issue model. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Output only. The time at which this issue model was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The most recent time at which the issue model was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Number of issues in this issue model. + * + * Generated from protobuf field int64 issue_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $issue_count = 0; + /** + * Output only. State of the model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Configs for the input data that used to create the issue model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig input_data_config = 6; + */ + protected $input_data_config = null; + /** + * Output only. Immutable. The issue model's label statistics on its training + * data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats training_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $training_stats = null; + /** + * Type of the model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.ModelType model_type = 9; + */ + protected $model_type = 0; + /** + * Language of the model. + * + * Generated from protobuf field string language_code = 10; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of the issue model. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model} + * @type string $display_name + * The representative name for the issue model. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this issue model was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The most recent time at which the issue model was updated. + * @type int|string $issue_count + * Output only. Number of issues in this issue model. + * @type int $state + * Output only. State of the model. + * @type \Google\Cloud\ContactCenterInsights\V1\IssueModel\InputDataConfig $input_data_config + * Configs for the input data that used to create the issue model. + * @type \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats $training_stats + * Output only. Immutable. The issue model's label statistics on its training + * data. + * @type int $model_type + * Type of the model. + * @type string $language_code + * Language of the model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of the issue model. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model} + * + * 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 issue model. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model} + * + * 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; + } + + /** + * The representative name for the issue model. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The representative name for the issue model. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The time at which this issue model was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which this issue model was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 most recent time at which the issue model was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The most recent time at which the issue model was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Number of issues in this issue model. + * + * Generated from protobuf field int64 issue_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getIssueCount() + { + return $this->issue_count; + } + + /** + * Output only. Number of issues in this issue model. + * + * Generated from protobuf field int64 issue_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setIssueCount($var) + { + GPBUtil::checkInt64($var); + $this->issue_count = $var; + + return $this; + } + + /** + * Output only. State of the model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel\State::class); + $this->state = $var; + + return $this; + } + + /** + * Configs for the input data that used to create the issue model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig input_data_config = 6; + * @return \Google\Cloud\ContactCenterInsights\V1\IssueModel\InputDataConfig|null + */ + public function getInputDataConfig() + { + return $this->input_data_config; + } + + public function hasInputDataConfig() + { + return isset($this->input_data_config); + } + + public function clearInputDataConfig() + { + unset($this->input_data_config); + } + + /** + * Configs for the input data that used to create the issue model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig input_data_config = 6; + * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel\InputDataConfig $var + * @return $this + */ + public function setInputDataConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel\InputDataConfig::class); + $this->input_data_config = $var; + + return $this; + } + + /** + * Output only. Immutable. The issue model's label statistics on its training + * data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats training_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats|null + */ + public function getTrainingStats() + { + return $this->training_stats; + } + + public function hasTrainingStats() + { + return isset($this->training_stats); + } + + public function clearTrainingStats() + { + unset($this->training_stats); + } + + /** + * Output only. Immutable. The issue model's label statistics on its training + * data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats training_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats $var + * @return $this + */ + public function setTrainingStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats::class); + $this->training_stats = $var; + + return $this; + } + + /** + * Type of the model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.ModelType model_type = 9; + * @return int + */ + public function getModelType() + { + return $this->model_type; + } + + /** + * Type of the model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.ModelType model_type = 9; + * @param int $var + * @return $this + */ + public function setModelType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel\ModelType::class); + $this->model_type = $var; + + return $this; + } + + /** + * Language of the model. + * + * Generated from protobuf field string language_code = 10; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Language of the model. + * + * Generated from protobuf field string language_code = 10; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/InputDataConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/InputDataConfig.php new file mode 100644 index 000000000000..4a40b7cb1ee0 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/InputDataConfig.php @@ -0,0 +1,155 @@ +google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + */ +class InputDataConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Medium of conversations used in training data. This field is being + * deprecated. To specify the medium to be used in training a new issue + * model, set the `medium` field on `filter`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [deprecated = true]; + * @deprecated + */ + protected $medium = 0; + /** + * Output only. Number of conversations used in training. Output only. + * + * Generated from protobuf field int64 training_conversations_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $training_conversations_count = 0; + /** + * A filter to reduce the conversations used for training the model to a + * specific subset. + * + * Generated from protobuf field string filter = 3; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $medium + * Medium of conversations used in training data. This field is being + * deprecated. To specify the medium to be used in training a new issue + * model, set the `medium` field on `filter`. + * @type int|string $training_conversations_count + * Output only. Number of conversations used in training. Output only. + * @type string $filter + * A filter to reduce the conversations used for training the model to a + * specific subset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Medium of conversations used in training data. This field is being + * deprecated. To specify the medium to be used in training a new issue + * model, set the `medium` field on `filter`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [deprecated = true]; + * @return int + * @deprecated + */ + public function getMedium() + { + @trigger_error('medium is deprecated.', E_USER_DEPRECATED); + return $this->medium; + } + + /** + * Medium of conversations used in training data. This field is being + * deprecated. To specify the medium to be used in training a new issue + * model, set the `medium` field on `filter`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setMedium($var) + { + @trigger_error('medium is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Medium::class); + $this->medium = $var; + + return $this; + } + + /** + * Output only. Number of conversations used in training. Output only. + * + * Generated from protobuf field int64 training_conversations_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTrainingConversationsCount() + { + return $this->training_conversations_count; + } + + /** + * Output only. Number of conversations used in training. Output only. + * + * Generated from protobuf field int64 training_conversations_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTrainingConversationsCount($var) + { + GPBUtil::checkInt64($var); + $this->training_conversations_count = $var; + + return $this; + } + + /** + * A filter to reduce the conversations used for training the model to a + * specific subset. + * + * Generated from protobuf field string filter = 3; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter to reduce the conversations used for training the model to a + * specific subset. + * + * Generated from protobuf field string filter = 3; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InputDataConfig::class, \Google\Cloud\ContactCenterInsights\V1\IssueModel_InputDataConfig::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/ModelType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/ModelType.php new file mode 100644 index 000000000000..f92a0416a08b --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/ModelType.php @@ -0,0 +1,64 @@ +google.cloud.contactcenterinsights.v1.IssueModel.ModelType + */ +class ModelType +{ + /** + * Unspecified model type. + * + * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; + */ + const MODEL_TYPE_UNSPECIFIED = 0; + /** + * Type V1. + * + * Generated from protobuf enum TYPE_V1 = 1; + */ + const TYPE_V1 = 1; + /** + * Type V2. + * + * Generated from protobuf enum TYPE_V2 = 2; + */ + const TYPE_V2 = 2; + + private static $valueToName = [ + self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', + self::TYPE_V1 => 'TYPE_V1', + self::TYPE_V2 => 'TYPE_V2', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ModelType::class, \Google\Cloud\ContactCenterInsights\V1\IssueModel_ModelType::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/State.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/State.php new file mode 100644 index 000000000000..9092c5c9a341 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/State.php @@ -0,0 +1,86 @@ +google.cloud.contactcenterinsights.v1.IssueModel.State + */ +class State +{ + /** + * Unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Model is not deployed but is ready to deploy. + * + * Generated from protobuf enum UNDEPLOYED = 1; + */ + const UNDEPLOYED = 1; + /** + * Model is being deployed. + * + * Generated from protobuf enum DEPLOYING = 2; + */ + const DEPLOYING = 2; + /** + * Model is deployed and is ready to be used. A model can only be used in + * analysis if it's in this state. + * + * Generated from protobuf enum DEPLOYED = 3; + */ + const DEPLOYED = 3; + /** + * Model is being undeployed. + * + * Generated from protobuf enum UNDEPLOYING = 4; + */ + const UNDEPLOYING = 4; + /** + * Model is being deleted. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::UNDEPLOYED => 'UNDEPLOYED', + self::DEPLOYING => 'DEPLOYING', + self::DEPLOYED => 'DEPLOYED', + self::UNDEPLOYING => 'UNDEPLOYING', + self::DELETING => 'DELETING', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\ContactCenterInsights\V1\IssueModel_State::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats.php new file mode 100644 index 000000000000..13e20a42460f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats.php @@ -0,0 +1,139 @@ +google.cloud.contactcenterinsights.v1.IssueModelLabelStats + */ +class IssueModelLabelStats extends \Google\Protobuf\Internal\Message +{ + /** + * Number of conversations the issue model has analyzed at this point in time. + * + * Generated from protobuf field int64 analyzed_conversations_count = 1; + */ + protected $analyzed_conversations_count = 0; + /** + * Number of analyzed conversations for which no issue was applicable at this + * point in time. + * + * Generated from protobuf field int64 unclassified_conversations_count = 2; + */ + protected $unclassified_conversations_count = 0; + /** + * Statistics on each issue. Key is the issue's resource name. + * + * Generated from protobuf field map issue_stats = 3; + */ + private $issue_stats; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $analyzed_conversations_count + * Number of conversations the issue model has analyzed at this point in time. + * @type int|string $unclassified_conversations_count + * Number of analyzed conversations for which no issue was applicable at this + * point in time. + * @type array|\Google\Protobuf\Internal\MapField $issue_stats + * Statistics on each issue. Key is the issue's resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Number of conversations the issue model has analyzed at this point in time. + * + * Generated from protobuf field int64 analyzed_conversations_count = 1; + * @return int|string + */ + public function getAnalyzedConversationsCount() + { + return $this->analyzed_conversations_count; + } + + /** + * Number of conversations the issue model has analyzed at this point in time. + * + * Generated from protobuf field int64 analyzed_conversations_count = 1; + * @param int|string $var + * @return $this + */ + public function setAnalyzedConversationsCount($var) + { + GPBUtil::checkInt64($var); + $this->analyzed_conversations_count = $var; + + return $this; + } + + /** + * Number of analyzed conversations for which no issue was applicable at this + * point in time. + * + * Generated from protobuf field int64 unclassified_conversations_count = 2; + * @return int|string + */ + public function getUnclassifiedConversationsCount() + { + return $this->unclassified_conversations_count; + } + + /** + * Number of analyzed conversations for which no issue was applicable at this + * point in time. + * + * Generated from protobuf field int64 unclassified_conversations_count = 2; + * @param int|string $var + * @return $this + */ + public function setUnclassifiedConversationsCount($var) + { + GPBUtil::checkInt64($var); + $this->unclassified_conversations_count = $var; + + return $this; + } + + /** + * Statistics on each issue. Key is the issue's resource name. + * + * Generated from protobuf field map issue_stats = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getIssueStats() + { + return $this->issue_stats; + } + + /** + * Statistics on each issue. Key is the issue's resource name. + * + * Generated from protobuf field map issue_stats = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setIssueStats($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats\IssueStats::class); + $this->issue_stats = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats/IssueStats.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats/IssueStats.php new file mode 100644 index 000000000000..b6e19bb189f4 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats/IssueStats.php @@ -0,0 +1,146 @@ +google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + */ +class IssueStats extends \Google\Protobuf\Internal\Message +{ + /** + * Issue resource. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * + * Generated from protobuf field string issue = 1; + */ + protected $issue = ''; + /** + * Number of conversations attached to the issue at this point in time. + * + * Generated from protobuf field int64 labeled_conversations_count = 2; + */ + protected $labeled_conversations_count = 0; + /** + * Display name of the issue. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issue + * Issue resource. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * @type int|string $labeled_conversations_count + * Number of conversations attached to the issue at this point in time. + * @type string $display_name + * Display name of the issue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Issue resource. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * + * Generated from protobuf field string issue = 1; + * @return string + */ + public function getIssue() + { + return $this->issue; + } + + /** + * Issue resource. + * Format: + * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * + * Generated from protobuf field string issue = 1; + * @param string $var + * @return $this + */ + public function setIssue($var) + { + GPBUtil::checkString($var, True); + $this->issue = $var; + + return $this; + } + + /** + * Number of conversations attached to the issue at this point in time. + * + * Generated from protobuf field int64 labeled_conversations_count = 2; + * @return int|string + */ + public function getLabeledConversationsCount() + { + return $this->labeled_conversations_count; + } + + /** + * Number of conversations attached to the issue at this point in time. + * + * Generated from protobuf field int64 labeled_conversations_count = 2; + * @param int|string $var + * @return $this + */ + public function setLabeledConversationsCount($var) + { + GPBUtil::checkInt64($var); + $this->labeled_conversations_count = $var; + + return $this; + } + + /** + * Display name of the issue. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name of the issue. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IssueStats::class, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats_IssueStats::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelResult.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelResult.php new file mode 100644 index 000000000000..80a0ea58e065 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelResult.php @@ -0,0 +1,105 @@ +google.cloud.contactcenterinsights.v1.IssueModelResult + */ +class IssueModelResult extends \Google\Protobuf\Internal\Message +{ + /** + * Issue model that generates the result. + * Format: projects/{project}/locations/{location}/issueModels/{issue_model} + * + * Generated from protobuf field string issue_model = 1 [(.google.api.resource_reference) = { + */ + protected $issue_model = ''; + /** + * All the matched issues. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueAssignment issues = 2; + */ + private $issues; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issue_model + * Issue model that generates the result. + * Format: projects/{project}/locations/{location}/issueModels/{issue_model} + * @type array<\Google\Cloud\ContactCenterInsights\V1\IssueAssignment>|\Google\Protobuf\Internal\RepeatedField $issues + * All the matched issues. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Issue model that generates the result. + * Format: projects/{project}/locations/{location}/issueModels/{issue_model} + * + * Generated from protobuf field string issue_model = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getIssueModel() + { + return $this->issue_model; + } + + /** + * Issue model that generates the result. + * Format: projects/{project}/locations/{location}/issueModels/{issue_model} + * + * Generated from protobuf field string issue_model = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIssueModel($var) + { + GPBUtil::checkString($var, True); + $this->issue_model = $var; + + return $this; + } + + /** + * All the matched issues. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueAssignment issues = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIssues() + { + return $this->issues; + } + + /** + * All the matched issues. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueAssignment issues = 2; + * @param array<\Google\Cloud\ContactCenterInsights\V1\IssueAssignment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIssues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\IssueAssignment::class); + $this->issues = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesRequest.php new file mode 100644 index 000000000000..0ca0f63bbf9a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesRequest.php @@ -0,0 +1,207 @@ +google.cloud.contactcenterinsights.v1.ListAnalysesRequest + */ +class ListAnalysesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the analyses. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent resource of the analyses. Please see + * {@see ContactCenterInsightsClient::conversationName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\ListAnalysesRequest + * + * @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 string $parent + * Required. The parent resource of the analyses. + * @type int $page_size + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @type string $page_token + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * @type string $filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the analyses. + * + * 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 analyses. + * + * 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; + } + + /** + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesResponse.php new file mode 100644 index 000000000000..c1a8d2ea3c7c --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesResponse.php @@ -0,0 +1,105 @@ +google.cloud.contactcenterinsights.v1.ListAnalysesResponse + */ +class ListAnalysesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The analyses that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Analysis analyses = 1; + */ + private $analyses; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ContactCenterInsights\V1\Analysis>|\Google\Protobuf\Internal\RepeatedField $analyses + * The analyses that match the request. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The analyses that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Analysis analyses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnalyses() + { + return $this->analyses; + } + + /** + * The analyses that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Analysis analyses = 1; + * @param array<\Google\Cloud\ContactCenterInsights\V1\Analysis>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnalyses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Analysis::class); + $this->analyses = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsRequest.php new file mode 100644 index 000000000000..cfe31fa3fb41 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsRequest.php @@ -0,0 +1,241 @@ +google.cloud.contactcenterinsights.v1.ListConversationsRequest + */ +class ListConversationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the conversation. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + 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 + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * The level of details of the conversation. Default is `BASIC`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 5; + */ + protected $view = 0; + + /** + * @param string $parent Required. The parent resource of the conversation. Please see + * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\ListConversationsRequest + * + * @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 string $parent + * 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 + * 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 + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * @type string $filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @type int $view + * The level of details of the conversation. Default is `BASIC`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the conversation. + * + * 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 conversation. + * + * 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; + } + + /** + * 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 + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->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 + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The level of details of the conversation. Default is `BASIC`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 5; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * The level of details of the conversation. Default is `BASIC`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 5; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ConversationView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsResponse.php new file mode 100644 index 000000000000..d43bf9bd86f7 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsResponse.php @@ -0,0 +1,109 @@ +google.cloud.contactcenterinsights.v1.ListConversationsResponse + */ +class ListConversationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The conversations that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation conversations = 1; + */ + private $conversations; + /** + * A token which can be sent as `page_token` to retrieve the next page. If + * this field is set, it means there is another page available. If it is not + * set, it means no other pages are available. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ContactCenterInsights\V1\Conversation>|\Google\Protobuf\Internal\RepeatedField $conversations + * The conversations that match the request. + * @type string $next_page_token + * A token which can be sent as `page_token` to retrieve the next page. If + * this field is set, it means there is another page available. If it is not + * set, it means no other pages are available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The conversations that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation conversations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversations() + { + return $this->conversations; + } + + /** + * The conversations that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation conversations = 1; + * @param array<\Google\Cloud\ContactCenterInsights\V1\Conversation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Conversation::class); + $this->conversations = $arr; + + return $this; + } + + /** + * A token which can be sent as `page_token` to retrieve the next page. If + * this field is set, it means there is another page available. If it is not + * set, it means no other pages are available. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token which can be sent as `page_token` to retrieve the next page. If + * this field is set, it means there is another page available. If it is not + * set, it means no other pages are available. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsRequest.php new file mode 100644 index 000000000000..797cc70091fb --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + */ +class ListIssueModelsRequest 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 = ''; + + /** + * @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\ListIssueModelsRequest + * + * @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 string $parent + * Required. The parent resource of the issue model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * 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; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsResponse.php new file mode 100644 index 000000000000..fd1955c2afaf --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsResponse.php @@ -0,0 +1,67 @@ +google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + */ +class ListIssueModelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The issue models that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueModel issue_models = 1; + */ + private $issue_models; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ContactCenterInsights\V1\IssueModel>|\Google\Protobuf\Internal\RepeatedField $issue_models + * The issue models that match the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The issue models that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueModel issue_models = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIssueModels() + { + return $this->issue_models; + } + + /** + * The issue models that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueModel issue_models = 1; + * @param array<\Google\Cloud\ContactCenterInsights\V1\IssueModel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIssueModels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\IssueModel::class); + $this->issue_models = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesRequest.php new file mode 100644 index 000000000000..9c33a0640c2a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.ListIssuesRequest + */ +class ListIssuesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the issue. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * @param string $parent Required. The parent resource of the issue. Please see + * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\ListIssuesRequest + * + * @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 string $parent + * Required. The parent resource of the issue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the issue. + * + * 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. + * + * 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; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesResponse.php new file mode 100644 index 000000000000..3bb883650053 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesResponse.php @@ -0,0 +1,67 @@ +google.cloud.contactcenterinsights.v1.ListIssuesResponse + */ +class ListIssuesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The issues that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Issue issues = 1; + */ + private $issues; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ContactCenterInsights\V1\Issue>|\Google\Protobuf\Internal\RepeatedField $issues + * The issues that match the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The issues that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Issue issues = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIssues() + { + return $this->issues; + } + + /** + * The issues that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Issue issues = 1; + * @param array<\Google\Cloud\ContactCenterInsights\V1\Issue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIssues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Issue::class); + $this->issues = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersRequest.php new file mode 100644 index 000000000000..531bf84f176f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersRequest.php @@ -0,0 +1,207 @@ +google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + */ +class ListPhraseMatchersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the phrase matcher. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent resource of the phrase matcher. Please see + * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\ListPhraseMatchersRequest + * + * @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 string $parent + * Required. The parent resource of the phrase matcher. + * @type int $page_size + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @type string $page_token + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * @type string $filter + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the phrase matcher. + * + * 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 phrase matcher. + * + * 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; + } + + /** + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersResponse.php new file mode 100644 index 000000000000..a757fadd7624 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersResponse.php @@ -0,0 +1,105 @@ +google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + */ +class ListPhraseMatchersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The phrase matchers that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matchers = 1; + */ + private $phrase_matchers; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatcher>|\Google\Protobuf\Internal\RepeatedField $phrase_matchers + * The phrase matchers that match the request. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The phrase matchers that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matchers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPhraseMatchers() + { + return $this->phrase_matchers; + } + + /** + * The phrase matchers that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matchers = 1; + * @param array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatcher>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPhraseMatchers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher::class); + $this->phrase_matchers = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsRequest.php new file mode 100644 index 000000000000..6beedf23a10a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsRequest.php @@ -0,0 +1,169 @@ +google.cloud.contactcenterinsights.v1.ListViewsRequest + */ +class ListViewsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the views. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource of the views. Please see + * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\ListViewsRequest + * + * @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 string $parent + * Required. The parent resource of the views. + * @type int $page_size + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @type string $page_token + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the views. + * + * 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 views. + * + * 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; + } + + /** + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsResponse.php new file mode 100644 index 000000000000..18ad9605fc2b --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsResponse.php @@ -0,0 +1,105 @@ +google.cloud.contactcenterinsights.v1.ListViewsResponse + */ +class ListViewsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The views that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.View views = 1; + */ + private $views; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ContactCenterInsights\V1\View>|\Google\Protobuf\Internal\RepeatedField $views + * The views that match the request. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * The views that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.View views = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getViews() + { + return $this->views; + } + + /** + * The views that match the request. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.View views = 1; + * @param array<\Google\Cloud\ContactCenterInsights\V1\View>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setViews($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\View::class); + $this->views = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchData.php new file mode 100644 index 000000000000..976b4005d028 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchData.php @@ -0,0 +1,102 @@ +google.cloud.contactcenterinsights.v1.PhraseMatchData + */ +class PhraseMatchData extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier (the resource name) of the phrase matcher. + * + * Generated from protobuf field string phrase_matcher = 1; + */ + protected $phrase_matcher = ''; + /** + * The human-readable name of the phrase matcher. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $phrase_matcher + * The unique identifier (the resource name) of the phrase matcher. + * @type string $display_name + * The human-readable name of the phrase matcher. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier (the resource name) of the phrase matcher. + * + * Generated from protobuf field string phrase_matcher = 1; + * @return string + */ + public function getPhraseMatcher() + { + return $this->phrase_matcher; + } + + /** + * The unique identifier (the resource name) of the phrase matcher. + * + * Generated from protobuf field string phrase_matcher = 1; + * @param string $var + * @return $this + */ + public function setPhraseMatcher($var) + { + GPBUtil::checkString($var, True); + $this->phrase_matcher = $var; + + return $this; + } + + /** + * The human-readable name of the phrase matcher. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human-readable name of the phrase matcher. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRule.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRule.php new file mode 100644 index 000000000000..7c378d92751c --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRule.php @@ -0,0 +1,153 @@ +google.cloud.contactcenterinsights.v1.PhraseMatchRule + */ +class PhraseMatchRule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The phrase to be matched. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Specifies whether the phrase must be missing from the transcript segment or + * present in the transcript segment. + * + * Generated from protobuf field bool negated = 2; + */ + protected $negated = false; + /** + * Provides additional information about the rule that specifies how to apply + * the rule. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig config = 3; + */ + protected $config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * Required. The phrase to be matched. + * @type bool $negated + * Specifies whether the phrase must be missing from the transcript segment or + * present in the transcript segment. + * @type \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleConfig $config + * Provides additional information about the rule that specifies how to apply + * the rule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The phrase to be matched. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. The phrase to be matched. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Specifies whether the phrase must be missing from the transcript segment or + * present in the transcript segment. + * + * Generated from protobuf field bool negated = 2; + * @return bool + */ + public function getNegated() + { + return $this->negated; + } + + /** + * Specifies whether the phrase must be missing from the transcript segment or + * present in the transcript segment. + * + * Generated from protobuf field bool negated = 2; + * @param bool $var + * @return $this + */ + public function setNegated($var) + { + GPBUtil::checkBool($var); + $this->negated = $var; + + return $this; + } + + /** + * Provides additional information about the rule that specifies how to apply + * the rule. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig config = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Provides additional information about the rule that specifies how to apply + * the rule. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig config = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleConfig::class); + $this->config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleConfig.php new file mode 100644 index 000000000000..bc1b1f53a206 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleConfig.php @@ -0,0 +1,75 @@ +google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + */ +class PhraseMatchRuleConfig extends \Google\Protobuf\Internal\Message +{ + protected $config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\ExactMatchConfig $exact_match_config + * The configuration for the exact match rule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The configuration for the exact match rule. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExactMatchConfig exact_match_config = 1; + * @return \Google\Cloud\ContactCenterInsights\V1\ExactMatchConfig|null + */ + public function getExactMatchConfig() + { + return $this->readOneof(1); + } + + public function hasExactMatchConfig() + { + return $this->hasOneof(1); + } + + /** + * The configuration for the exact match rule. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExactMatchConfig exact_match_config = 1; + * @param \Google\Cloud\ContactCenterInsights\V1\ExactMatchConfig $var + * @return $this + */ + public function setExactMatchConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ExactMatchConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getConfig() + { + return $this->whichOneof("config"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup.php new file mode 100644 index 000000000000..3349ff2378e3 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup.php @@ -0,0 +1,101 @@ +google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + */ +class PhraseMatchRuleGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of this phrase match rule group. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * A list of phrase match rules that are included in this group. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRule phrase_match_rules = 2; + */ + private $phrase_match_rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. The type of this phrase match rule group. + * @type array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatchRule>|\Google\Protobuf\Internal\RepeatedField $phrase_match_rules + * A list of phrase match rules that are included in this group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of this phrase match rule group. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of this phrase match rule group. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup\PhraseMatchRuleGroupType::class); + $this->type = $var; + + return $this; + } + + /** + * A list of phrase match rules that are included in this group. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRule phrase_match_rules = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPhraseMatchRules() + { + return $this->phrase_match_rules; + } + + /** + * A list of phrase match rules that are included in this group. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRule phrase_match_rules = 2; + * @param array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatchRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPhraseMatchRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRule::class); + $this->phrase_match_rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup/PhraseMatchRuleGroupType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup/PhraseMatchRuleGroupType.php new file mode 100644 index 000000000000..109fdfea30d9 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup/PhraseMatchRuleGroupType.php @@ -0,0 +1,65 @@ +google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType + */ +class PhraseMatchRuleGroupType +{ + /** + * Unspecified. + * + * Generated from protobuf enum PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0; + */ + const PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0; + /** + * Must meet all phrase match rules or there is no match. + * + * Generated from protobuf enum ALL_OF = 1; + */ + const ALL_OF = 1; + /** + * If any of the phrase match rules are met, there is a match. + * + * Generated from protobuf enum ANY_OF = 2; + */ + const ANY_OF = 2; + + private static $valueToName = [ + self::PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED => 'PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED', + self::ALL_OF => 'ALL_OF', + self::ANY_OF => 'ANY_OF', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PhraseMatchRuleGroupType::class, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup_PhraseMatchRuleGroupType::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher.php new file mode 100644 index 000000000000..44a2e86faddd --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher.php @@ -0,0 +1,477 @@ +google.cloud.contactcenterinsights.v1.PhraseMatcher + */ +class PhraseMatcher extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the phrase matcher. + * Format: + * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Immutable. The revision ID of the phrase matcher. + * A new revision is committed whenever the matcher is changed, except when it + * is activated or deactivated. A server generated random ID will be used. + * Example: locations/global/phraseMatchers/my-first-matcher@1234567 + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * The customized version tag to use for the phrase matcher. If not specified, + * it will default to `revision_id`. + * + * Generated from protobuf field string version_tag = 3; + */ + protected $version_tag = ''; + /** + * Output only. The timestamp of when the revision was created. It is also the + * create time when a new matcher is added. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * The human-readable name of the phrase matcher. + * + * Generated from protobuf field string display_name = 5; + */ + protected $display_name = ''; + /** + * Required. The type of this phrase matcher. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType type = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Applies the phrase matcher only when it is active. + * + * Generated from protobuf field bool active = 7; + */ + protected $active = false; + /** + * A list of phase match rule groups that are included in this matcher. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup phrase_match_rule_groups = 8; + */ + private $phrase_match_rule_groups; + /** + * Output only. The most recent time at which the activation status was + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp activation_update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $activation_update_time = null; + /** + * The role whose utterances the phrase matcher should be matched + * against. If the role is ROLE_UNSPECIFIED it will be matched against any + * utterances in the transcript. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role_match = 10; + */ + protected $role_match = 0; + /** + * Output only. The most recent time at which the phrase matcher was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the phrase matcher. + * Format: + * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * @type string $revision_id + * Output only. Immutable. The revision ID of the phrase matcher. + * A new revision is committed whenever the matcher is changed, except when it + * is activated or deactivated. A server generated random ID will be used. + * Example: locations/global/phraseMatchers/my-first-matcher@1234567 + * @type string $version_tag + * The customized version tag to use for the phrase matcher. If not specified, + * it will default to `revision_id`. + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp of when the revision was created. It is also the + * create time when a new matcher is added. + * @type string $display_name + * The human-readable name of the phrase matcher. + * @type int $type + * Required. The type of this phrase matcher. + * @type bool $active + * Applies the phrase matcher only when it is active. + * @type array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup>|\Google\Protobuf\Internal\RepeatedField $phrase_match_rule_groups + * A list of phase match rule groups that are included in this matcher. + * @type \Google\Protobuf\Timestamp $activation_update_time + * Output only. The most recent time at which the activation status was + * updated. + * @type int $role_match + * The role whose utterances the phrase matcher should be matched + * against. If the role is ROLE_UNSPECIFIED it will be matched against any + * utterances in the transcript. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The most recent time at which the phrase matcher was updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the phrase matcher. + * Format: + * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the phrase matcher. + * Format: + * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Immutable. The revision ID of the phrase matcher. + * A new revision is committed whenever the matcher is changed, except when it + * is activated or deactivated. A server generated random ID will be used. + * Example: locations/global/phraseMatchers/my-first-matcher@1234567 + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. Immutable. The revision ID of the phrase matcher. + * A new revision is committed whenever the matcher is changed, except when it + * is activated or deactivated. A server generated random ID will be used. + * Example: locations/global/phraseMatchers/my-first-matcher@1234567 + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * The customized version tag to use for the phrase matcher. If not specified, + * it will default to `revision_id`. + * + * Generated from protobuf field string version_tag = 3; + * @return string + */ + public function getVersionTag() + { + return $this->version_tag; + } + + /** + * The customized version tag to use for the phrase matcher. If not specified, + * it will default to `revision_id`. + * + * Generated from protobuf field string version_tag = 3; + * @param string $var + * @return $this + */ + public function setVersionTag($var) + { + GPBUtil::checkString($var, True); + $this->version_tag = $var; + + return $this; + } + + /** + * Output only. The timestamp of when the revision was created. It is also the + * create time when a new matcher is added. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp of when the revision was created. It is also the + * create time when a new matcher is added. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * The human-readable name of the phrase matcher. + * + * Generated from protobuf field string display_name = 5; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human-readable name of the phrase matcher. + * + * Generated from protobuf field string display_name = 5; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The type of this phrase matcher. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType type = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of this phrase matcher. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType type = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher\PhraseMatcherType::class); + $this->type = $var; + + return $this; + } + + /** + * Applies the phrase matcher only when it is active. + * + * Generated from protobuf field bool active = 7; + * @return bool + */ + public function getActive() + { + return $this->active; + } + + /** + * Applies the phrase matcher only when it is active. + * + * Generated from protobuf field bool active = 7; + * @param bool $var + * @return $this + */ + public function setActive($var) + { + GPBUtil::checkBool($var); + $this->active = $var; + + return $this; + } + + /** + * A list of phase match rule groups that are included in this matcher. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup phrase_match_rule_groups = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPhraseMatchRuleGroups() + { + return $this->phrase_match_rule_groups; + } + + /** + * A list of phase match rule groups that are included in this matcher. + * + * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup phrase_match_rule_groups = 8; + * @param array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPhraseMatchRuleGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup::class); + $this->phrase_match_rule_groups = $arr; + + return $this; + } + + /** + * Output only. The most recent time at which the activation status was + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp activation_update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getActivationUpdateTime() + { + return $this->activation_update_time; + } + + public function hasActivationUpdateTime() + { + return isset($this->activation_update_time); + } + + public function clearActivationUpdateTime() + { + unset($this->activation_update_time); + } + + /** + * Output only. The most recent time at which the activation status was + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp activation_update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setActivationUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->activation_update_time = $var; + + return $this; + } + + /** + * The role whose utterances the phrase matcher should be matched + * against. If the role is ROLE_UNSPECIFIED it will be matched against any + * utterances in the transcript. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role_match = 10; + * @return int + */ + public function getRoleMatch() + { + return $this->role_match; + } + + /** + * The role whose utterances the phrase matcher should be matched + * against. If the role is ROLE_UNSPECIFIED it will be matched against any + * utterances in the transcript. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role_match = 10; + * @param int $var + * @return $this + */ + public function setRoleMatch($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant\Role::class); + $this->role_match = $var; + + return $this; + } + + /** + * Output only. The most recent time at which the phrase matcher was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The most recent time at which the phrase matcher was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher/PhraseMatcherType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher/PhraseMatcherType.php new file mode 100644 index 000000000000..ba37adcff295 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher/PhraseMatcherType.php @@ -0,0 +1,65 @@ +google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType + */ +class PhraseMatcherType +{ + /** + * Unspecified. + * + * Generated from protobuf enum PHRASE_MATCHER_TYPE_UNSPECIFIED = 0; + */ + const PHRASE_MATCHER_TYPE_UNSPECIFIED = 0; + /** + * Must meet all phrase match rule groups or there is no match. + * + * Generated from protobuf enum ALL_OF = 1; + */ + const ALL_OF = 1; + /** + * If any of the phrase match rule groups are met, there is a match. + * + * Generated from protobuf enum ANY_OF = 2; + */ + const ANY_OF = 2; + + private static $valueToName = [ + self::PHRASE_MATCHER_TYPE_UNSPECIFIED => 'PHRASE_MATCHER_TYPE_UNSPECIFIED', + self::ALL_OF => 'ALL_OF', + self::ANY_OF => 'ANY_OF', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PhraseMatcherType::class, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher_PhraseMatcherType::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RedactionConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RedactionConfig.php new file mode 100644 index 000000000000..ebcf981ef8e4 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RedactionConfig.php @@ -0,0 +1,117 @@ +google.cloud.contactcenterinsights.v1.RedactionConfig + */ +class RedactionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The fully-qualified DLP deidentify template resource name. + * Format: + * `projects/{project}/deidentifyTemplates/{template}` + * + * Generated from protobuf field string deidentify_template = 1; + */ + protected $deidentify_template = ''; + /** + * The fully-qualified DLP inspect template resource name. + * Format: + * `projects/{project}/locations/{location}/inspectTemplates/{template}` + * + * Generated from protobuf field string inspect_template = 2; + */ + protected $inspect_template = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $deidentify_template + * The fully-qualified DLP deidentify template resource name. + * Format: + * `projects/{project}/deidentifyTemplates/{template}` + * @type string $inspect_template + * The fully-qualified DLP inspect template resource name. + * Format: + * `projects/{project}/locations/{location}/inspectTemplates/{template}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The fully-qualified DLP deidentify template resource name. + * Format: + * `projects/{project}/deidentifyTemplates/{template}` + * + * Generated from protobuf field string deidentify_template = 1; + * @return string + */ + public function getDeidentifyTemplate() + { + return $this->deidentify_template; + } + + /** + * The fully-qualified DLP deidentify template resource name. + * Format: + * `projects/{project}/deidentifyTemplates/{template}` + * + * Generated from protobuf field string deidentify_template = 1; + * @param string $var + * @return $this + */ + public function setDeidentifyTemplate($var) + { + GPBUtil::checkString($var, True); + $this->deidentify_template = $var; + + return $this; + } + + /** + * The fully-qualified DLP inspect template resource name. + * Format: + * `projects/{project}/locations/{location}/inspectTemplates/{template}` + * + * Generated from protobuf field string inspect_template = 2; + * @return string + */ + public function getInspectTemplate() + { + return $this->inspect_template; + } + + /** + * The fully-qualified DLP inspect template resource name. + * Format: + * `projects/{project}/locations/{location}/inspectTemplates/{template}` + * + * Generated from protobuf field string inspect_template = 2; + * @param string $var + * @return $this + */ + public function setInspectTemplate($var) + { + GPBUtil::checkString($var, True); + $this->inspect_template = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RuntimeAnnotation.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RuntimeAnnotation.php new file mode 100644 index 000000000000..6d27085452d2 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RuntimeAnnotation.php @@ -0,0 +1,458 @@ +google.cloud.contactcenterinsights.v1.RuntimeAnnotation + */ +class RuntimeAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the annotation. + * Format: + * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} + * + * Generated from protobuf field string annotation_id = 1; + */ + protected $annotation_id = ''; + /** + * The time at which this annotation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * The boundary in the conversation where the annotation starts, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary start_boundary = 3; + */ + protected $start_boundary = null; + /** + * The boundary in the conversation where the annotation ends, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary end_boundary = 4; + */ + protected $end_boundary = null; + /** + * The feedback that the customer has about the answer in `data`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback answer_feedback = 5; + */ + protected $answer_feedback = null; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\ArticleSuggestionData $article_suggestion + * Agent Assist Article Suggestion data. + * @type \Google\Cloud\ContactCenterInsights\V1\FaqAnswerData $faq_answer + * Agent Assist FAQ answer data. + * @type \Google\Cloud\ContactCenterInsights\V1\SmartReplyData $smart_reply + * Agent Assist Smart Reply data. + * @type \Google\Cloud\ContactCenterInsights\V1\SmartComposeSuggestionData $smart_compose_suggestion + * Agent Assist Smart Compose suggestion data. + * @type \Google\Cloud\ContactCenterInsights\V1\DialogflowInteractionData $dialogflow_interaction + * Dialogflow interaction data. + * @type \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData $conversation_summarization_suggestion + * Conversation summarization suggestion data. + * @type string $annotation_id + * The unique identifier of the annotation. + * Format: + * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} + * @type \Google\Protobuf\Timestamp $create_time + * The time at which this annotation was created. + * @type \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $start_boundary + * The boundary in the conversation where the annotation starts, inclusive. + * @type \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $end_boundary + * 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`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Agent Assist Article Suggestion data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ArticleSuggestionData article_suggestion = 6; + * @return \Google\Cloud\ContactCenterInsights\V1\ArticleSuggestionData|null + */ + public function getArticleSuggestion() + { + return $this->readOneof(6); + } + + public function hasArticleSuggestion() + { + return $this->hasOneof(6); + } + + /** + * Agent Assist Article Suggestion data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ArticleSuggestionData article_suggestion = 6; + * @param \Google\Cloud\ContactCenterInsights\V1\ArticleSuggestionData $var + * @return $this + */ + public function setArticleSuggestion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ArticleSuggestionData::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Agent Assist FAQ answer data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.FaqAnswerData faq_answer = 7; + * @return \Google\Cloud\ContactCenterInsights\V1\FaqAnswerData|null + */ + public function getFaqAnswer() + { + return $this->readOneof(7); + } + + public function hasFaqAnswer() + { + return $this->hasOneof(7); + } + + /** + * Agent Assist FAQ answer data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.FaqAnswerData faq_answer = 7; + * @param \Google\Cloud\ContactCenterInsights\V1\FaqAnswerData $var + * @return $this + */ + public function setFaqAnswer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\FaqAnswerData::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Agent Assist Smart Reply data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SmartReplyData smart_reply = 8; + * @return \Google\Cloud\ContactCenterInsights\V1\SmartReplyData|null + */ + public function getSmartReply() + { + return $this->readOneof(8); + } + + public function hasSmartReply() + { + return $this->hasOneof(8); + } + + /** + * Agent Assist Smart Reply data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SmartReplyData smart_reply = 8; + * @param \Google\Cloud\ContactCenterInsights\V1\SmartReplyData $var + * @return $this + */ + public function setSmartReply($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SmartReplyData::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Agent Assist Smart Compose suggestion data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData smart_compose_suggestion = 9; + * @return \Google\Cloud\ContactCenterInsights\V1\SmartComposeSuggestionData|null + */ + public function getSmartComposeSuggestion() + { + return $this->readOneof(9); + } + + public function hasSmartComposeSuggestion() + { + return $this->hasOneof(9); + } + + /** + * Agent Assist Smart Compose suggestion data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData smart_compose_suggestion = 9; + * @param \Google\Cloud\ContactCenterInsights\V1\SmartComposeSuggestionData $var + * @return $this + */ + public function setSmartComposeSuggestion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SmartComposeSuggestionData::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Dialogflow interaction data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DialogflowInteractionData dialogflow_interaction = 10; + * @return \Google\Cloud\ContactCenterInsights\V1\DialogflowInteractionData|null + */ + public function getDialogflowInteraction() + { + return $this->readOneof(10); + } + + public function hasDialogflowInteraction() + { + return $this->hasOneof(10); + } + + /** + * Dialogflow interaction data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DialogflowInteractionData dialogflow_interaction = 10; + * @param \Google\Cloud\ContactCenterInsights\V1\DialogflowInteractionData $var + * @return $this + */ + public function setDialogflowInteraction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\DialogflowInteractionData::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Conversation summarization suggestion data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData conversation_summarization_suggestion = 12; + * @return \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData|null + */ + public function getConversationSummarizationSuggestion() + { + return $this->readOneof(12); + } + + public function hasConversationSummarizationSuggestion() + { + return $this->hasOneof(12); + } + + /** + * Conversation summarization suggestion data. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData conversation_summarization_suggestion = 12; + * @param \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData $var + * @return $this + */ + public function setConversationSummarizationSuggestion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * The unique identifier of the annotation. + * Format: + * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} + * + * Generated from protobuf field string annotation_id = 1; + * @return string + */ + public function getAnnotationId() + { + return $this->annotation_id; + } + + /** + * The unique identifier of the annotation. + * Format: + * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} + * + * Generated from protobuf field string annotation_id = 1; + * @param string $var + * @return $this + */ + public function setAnnotationId($var) + { + GPBUtil::checkString($var, True); + $this->annotation_id = $var; + + return $this; + } + + /** + * The time at which this annotation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @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 at which this annotation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @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 boundary in the conversation where the annotation starts, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary start_boundary = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary|null + */ + public function getStartBoundary() + { + return $this->start_boundary; + } + + public function hasStartBoundary() + { + return isset($this->start_boundary); + } + + public function clearStartBoundary() + { + unset($this->start_boundary); + } + + /** + * The boundary in the conversation where the annotation starts, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary start_boundary = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $var + * @return $this + */ + public function setStartBoundary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary::class); + $this->start_boundary = $var; + + return $this; + } + + /** + * The boundary in the conversation where the annotation ends, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary end_boundary = 4; + * @return \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary|null + */ + public function getEndBoundary() + { + return $this->end_boundary; + } + + public function hasEndBoundary() + { + return isset($this->end_boundary); + } + + public function clearEndBoundary() + { + unset($this->end_boundary); + } + + /** + * The boundary in the conversation where the annotation ends, inclusive. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary end_boundary = 4; + * @param \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $var + * @return $this + */ + public function setEndBoundary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary::class); + $this->end_boundary = $var; + + return $this; + } + + /** + * The feedback that the customer has about the answer in `data`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback answer_feedback = 5; + * @return \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback|null + */ + public function getAnswerFeedback() + { + return $this->answer_feedback; + } + + public function hasAnswerFeedback() + { + return isset($this->answer_feedback); + } + + public function clearAnswerFeedback() + { + unset($this->answer_feedback); + } + + /** + * The feedback that the customer has about the answer in `data`. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback answer_feedback = 5; + * @param \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback $var + * @return $this + */ + public function setAnswerFeedback($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback::class); + $this->answer_feedback = $var; + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SentimentData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SentimentData.php new file mode 100644 index 000000000000..ce03d00b710a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SentimentData.php @@ -0,0 +1,105 @@ +google.cloud.contactcenterinsights.v1.SentimentData + */ +class SentimentData extends \Google\Protobuf\Internal\Message +{ + /** + * A non-negative number from 0 to infinity which represents the abolute + * magnitude of sentiment regardless of score. + * + * Generated from protobuf field float magnitude = 1; + */ + protected $magnitude = 0.0; + /** + * The sentiment score between -1.0 (negative) and 1.0 (positive). + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $magnitude + * A non-negative number from 0 to infinity which represents the abolute + * magnitude of sentiment regardless of score. + * @type float $score + * The sentiment score between -1.0 (negative) and 1.0 (positive). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A non-negative number from 0 to infinity which represents the abolute + * magnitude of sentiment regardless of score. + * + * Generated from protobuf field float magnitude = 1; + * @return float + */ + public function getMagnitude() + { + return $this->magnitude; + } + + /** + * A non-negative number from 0 to infinity which represents the abolute + * magnitude of sentiment regardless of score. + * + * Generated from protobuf field float magnitude = 1; + * @param float $var + * @return $this + */ + public function setMagnitude($var) + { + GPBUtil::checkFloat($var); + $this->magnitude = $var; + + return $this; + } + + /** + * The sentiment score between -1.0 (negative) and 1.0 (positive). + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * The sentiment score between -1.0 (negative) and 1.0 (positive). + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings.php new file mode 100644 index 000000000000..4c92a6b67f20 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings.php @@ -0,0 +1,479 @@ +google.cloud.contactcenterinsights.v1.Settings + */ +class Settings extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of the settings resource. + * Format: + * projects/{project}/locations/{location}/settings + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The time at which the settings was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which the settings were last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * A language code to be applied to each transcript segment unless the segment + * already specifies a language code. Language code defaults to "en-US" if it + * is neither specified on the segment nor here. + * + * Generated from protobuf field string language_code = 4; + */ + protected $language_code = ''; + /** + * The default TTL for newly-created conversations. If a conversation has a + * specified expiration, that value will be used instead. Changing this + * value will not change the expiration of existing conversations. + * Conversations with no expire time persist until they are deleted. + * + * Generated from protobuf field .google.protobuf.Duration conversation_ttl = 5; + */ + protected $conversation_ttl = null; + /** + * A map that maps a notification trigger to a Pub/Sub topic. Each time a + * specified trigger occurs, Insights will notify the corresponding Pub/Sub + * topic. + * Keys are notification triggers. Supported keys are: + * * "all-triggers": Notify each time any of the supported triggers occurs. + * * "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. + * * "update-conversation": Notify each time a conversation is updated via + * UpdateConversation. + * Values are Pub/Sub topics. The format of each Pub/Sub topic is: + * projects/{project}/topics/{topic} + * + * Generated from protobuf field map pubsub_notification_settings = 6; + */ + private $pubsub_notification_settings; + /** + * Default analysis settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7; + */ + protected $analysis_config = null; + /** + * Default DLP redaction resources to be applied while ingesting + * conversations. + * + * 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. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $speech_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of the settings resource. + * Format: + * projects/{project}/locations/{location}/settings + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the settings was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the settings were last updated. + * @type string $language_code + * A language code to be applied to each transcript segment unless the segment + * already specifies a language code. Language code defaults to "en-US" if it + * is neither specified on the segment nor here. + * @type \Google\Protobuf\Duration $conversation_ttl + * The default TTL for newly-created conversations. If a conversation has a + * specified expiration, that value will be used instead. Changing this + * value will not change the expiration of existing conversations. + * Conversations with no expire time persist until they are deleted. + * @type array|\Google\Protobuf\Internal\MapField $pubsub_notification_settings + * A map that maps a notification trigger to a Pub/Sub topic. Each time a + * specified trigger occurs, Insights will notify the corresponding Pub/Sub + * topic. + * Keys are notification triggers. Supported keys are: + * * "all-triggers": Notify each time any of the supported triggers occurs. + * * "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. + * * "update-conversation": Notify each time a conversation is updated via + * UpdateConversation. + * 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. + * @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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of the settings resource. + * Format: + * projects/{project}/locations/{location}/settings + * + * 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 settings resource. + * Format: + * projects/{project}/locations/{location}/settings + * + * 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; + } + + /** + * Output only. The time at which the settings was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 at which the settings was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 at which the settings were last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which the settings were last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * A language code to be applied to each transcript segment unless the segment + * already specifies a language code. Language code defaults to "en-US" if it + * is neither specified on the segment nor here. + * + * Generated from protobuf field string language_code = 4; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * A language code to be applied to each transcript segment unless the segment + * already specifies a language code. Language code defaults to "en-US" if it + * is neither specified on the segment nor here. + * + * Generated from protobuf field string language_code = 4; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The default TTL for newly-created conversations. If a conversation has a + * specified expiration, that value will be used instead. Changing this + * value will not change the expiration of existing conversations. + * Conversations with no expire time persist until they are deleted. + * + * Generated from protobuf field .google.protobuf.Duration conversation_ttl = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getConversationTtl() + { + return $this->conversation_ttl; + } + + public function hasConversationTtl() + { + return isset($this->conversation_ttl); + } + + public function clearConversationTtl() + { + unset($this->conversation_ttl); + } + + /** + * The default TTL for newly-created conversations. If a conversation has a + * specified expiration, that value will be used instead. Changing this + * value will not change the expiration of existing conversations. + * Conversations with no expire time persist until they are deleted. + * + * Generated from protobuf field .google.protobuf.Duration conversation_ttl = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setConversationTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->conversation_ttl = $var; + + return $this; + } + + /** + * A map that maps a notification trigger to a Pub/Sub topic. Each time a + * specified trigger occurs, Insights will notify the corresponding Pub/Sub + * topic. + * Keys are notification triggers. Supported keys are: + * * "all-triggers": Notify each time any of the supported triggers occurs. + * * "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. + * * "update-conversation": Notify each time a conversation is updated via + * UpdateConversation. + * Values are Pub/Sub topics. The format of each Pub/Sub topic is: + * projects/{project}/topics/{topic} + * + * Generated from protobuf field map pubsub_notification_settings = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getPubsubNotificationSettings() + { + return $this->pubsub_notification_settings; + } + + /** + * A map that maps a notification trigger to a Pub/Sub topic. Each time a + * specified trigger occurs, Insights will notify the corresponding Pub/Sub + * topic. + * Keys are notification triggers. Supported keys are: + * * "all-triggers": Notify each time any of the supported triggers occurs. + * * "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. + * * "update-conversation": Notify each time a conversation is updated via + * UpdateConversation. + * Values are Pub/Sub topics. The format of each Pub/Sub topic is: + * projects/{project}/topics/{topic} + * + * Generated from protobuf field map pubsub_notification_settings = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setPubsubNotificationSettings($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->pubsub_notification_settings = $arr; + + return $this; + } + + /** + * Default analysis settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7; + * @return \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig|null + */ + public function getAnalysisConfig() + { + return $this->analysis_config; + } + + public function hasAnalysisConfig() + { + return isset($this->analysis_config); + } + + public function clearAnalysisConfig() + { + unset($this->analysis_config); + } + + /** + * Default analysis settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7; + * @param \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig $var + * @return $this + */ + public function setAnalysisConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig::class); + $this->analysis_config = $var; + + return $this; + } + + /** + * Default DLP redaction resources to be applied while ingesting + * conversations. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 10; + * @return \Google\Cloud\ContactCenterInsights\V1\RedactionConfig|null + */ + public function getRedactionConfig() + { + return $this->redaction_config; + } + + public function hasRedactionConfig() + { + return isset($this->redaction_config); + } + + public function clearRedactionConfig() + { + unset($this->redaction_config); + } + + /** + * Default DLP redaction resources to be applied while ingesting + * conversations. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 10; + * @param \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $var + * @return $this + */ + public function setRedactionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\RedactionConfig::class); + $this->redaction_config = $var; + + return $this; + } + + /** + * Optional. Default Speech-to-Text resources to be used while ingesting audio + * files. Optional, CCAI Insights will create a default if not provided. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ContactCenterInsights\V1\SpeechConfig|null + */ + public function getSpeechConfig() + { + return $this->speech_config; + } + + public function hasSpeechConfig() + { + return isset($this->speech_config); + } + + public function clearSpeechConfig() + { + unset($this->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. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $var + * @return $this + */ + public function setSpeechConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SpeechConfig::class); + $this->speech_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings/AnalysisConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings/AnalysisConfig.php new file mode 100644 index 000000000000..6bf6f5bf7a26 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings/AnalysisConfig.php @@ -0,0 +1,160 @@ +google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + */ +class AnalysisConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Percentage of conversations created using Dialogflow runtime integration + * to analyze automatically, between [0, 100]. + * + * Generated from protobuf field double runtime_integration_analysis_percentage = 1; + */ + protected $runtime_integration_analysis_percentage = 0.0; + /** + * Percentage of conversations created using the UploadConversation endpoint + * to analyze automatically, between [0, 100]. + * + * Generated from protobuf field double upload_conversation_analysis_percentage = 6; + */ + protected $upload_conversation_analysis_percentage = 0.0; + /** + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 5; + */ + protected $annotator_selector = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $runtime_integration_analysis_percentage + * Percentage of conversations created using Dialogflow runtime integration + * to analyze automatically, between [0, 100]. + * @type float $upload_conversation_analysis_percentage + * Percentage of conversations created using the UploadConversation endpoint + * to analyze automatically, between [0, 100]. + * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $annotator_selector + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Percentage of conversations created using Dialogflow runtime integration + * to analyze automatically, between [0, 100]. + * + * Generated from protobuf field double runtime_integration_analysis_percentage = 1; + * @return float + */ + public function getRuntimeIntegrationAnalysisPercentage() + { + return $this->runtime_integration_analysis_percentage; + } + + /** + * Percentage of conversations created using Dialogflow runtime integration + * to analyze automatically, between [0, 100]. + * + * Generated from protobuf field double runtime_integration_analysis_percentage = 1; + * @param float $var + * @return $this + */ + public function setRuntimeIntegrationAnalysisPercentage($var) + { + GPBUtil::checkDouble($var); + $this->runtime_integration_analysis_percentage = $var; + + return $this; + } + + /** + * Percentage of conversations created using the UploadConversation endpoint + * to analyze automatically, between [0, 100]. + * + * Generated from protobuf field double upload_conversation_analysis_percentage = 6; + * @return float + */ + public function getUploadConversationAnalysisPercentage() + { + return $this->upload_conversation_analysis_percentage; + } + + /** + * Percentage of conversations created using the UploadConversation endpoint + * to analyze automatically, between [0, 100]. + * + * Generated from protobuf field double upload_conversation_analysis_percentage = 6; + * @param float $var + * @return $this + */ + public function setUploadConversationAnalysisPercentage($var) + { + GPBUtil::checkDouble($var); + $this->upload_conversation_analysis_percentage = $var; + + return $this; + } + + /** + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 5; + * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector|null + */ + public function getAnnotatorSelector() + { + return $this->annotator_selector; + } + + public function hasAnnotatorSelector() + { + return isset($this->annotator_selector); + } + + public function clearAnnotatorSelector() + { + unset($this->annotator_selector); + } + + /** + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 5; + * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $var + * @return $this + */ + public function setAnnotatorSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector::class); + $this->annotator_selector = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnalysisConfig::class, \Google\Cloud\ContactCenterInsights\V1\Settings_AnalysisConfig::class); + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SilenceData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SilenceData.php new file mode 100644 index 000000000000..b2f045fe5662 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SilenceData.php @@ -0,0 +1,33 @@ +google.cloud.contactcenterinsights.v1.SilenceData + */ +class SilenceData 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\Resources::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartComposeSuggestionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartComposeSuggestionData.php new file mode 100644 index 000000000000..abf22b896d3a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartComposeSuggestionData.php @@ -0,0 +1,189 @@ +google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + */ +class SmartComposeSuggestionData extends \Google\Protobuf\Internal\Message +{ + /** + * The content of the suggestion. + * + * Generated from protobuf field string suggestion = 1; + */ + protected $suggestion = ''; + /** + * The system's confidence score that this suggestion is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field double confidence_score = 2; + */ + protected $confidence_score = 0.0; + /** + * Map that contains metadata about the Smart Compose suggestion and the + * document from which it originates. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 4; + */ + protected $query_record = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $suggestion + * The content of the suggestion. + * @type float $confidence_score + * The system's confidence score that this suggestion is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Map that contains metadata about the Smart Compose suggestion and the + * document from which it originates. + * @type string $query_record + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The content of the suggestion. + * + * Generated from protobuf field string suggestion = 1; + * @return string + */ + public function getSuggestion() + { + return $this->suggestion; + } + + /** + * The content of the suggestion. + * + * Generated from protobuf field string suggestion = 1; + * @param string $var + * @return $this + */ + public function setSuggestion($var) + { + GPBUtil::checkString($var, True); + $this->suggestion = $var; + + return $this; + } + + /** + * The system's confidence score that this suggestion is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field double confidence_score = 2; + * @return float + */ + public function getConfidenceScore() + { + return $this->confidence_score; + } + + /** + * The system's confidence score that this suggestion is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field double confidence_score = 2; + * @param float $var + * @return $this + */ + public function setConfidenceScore($var) + { + GPBUtil::checkDouble($var); + $this->confidence_score = $var; + + return $this; + } + + /** + * Map that contains metadata about the Smart Compose suggestion and the + * document from which it originates. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Map that contains metadata about the Smart Compose suggestion and the + * document from which it originates. + * + * Generated from protobuf field map metadata = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 4; + * @return string + */ + public function getQueryRecord() + { + return $this->query_record; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 4; + * @param string $var + * @return $this + */ + public function setQueryRecord($var) + { + GPBUtil::checkString($var, True); + $this->query_record = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartReplyData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartReplyData.php new file mode 100644 index 000000000000..2da4d03c9e50 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartReplyData.php @@ -0,0 +1,189 @@ +google.cloud.contactcenterinsights.v1.SmartReplyData + */ +class SmartReplyData extends \Google\Protobuf\Internal\Message +{ + /** + * The content of the reply. + * + * Generated from protobuf field string reply = 1; + */ + protected $reply = ''; + /** + * The system's confidence score that this reply is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field double confidence_score = 2; + */ + protected $confidence_score = 0.0; + /** + * Map that contains metadata about the Smart Reply and the document from + * which it originates. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 4; + */ + protected $query_record = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $reply + * The content of the reply. + * @type float $confidence_score + * The system's confidence score that this reply is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Map that contains metadata about the Smart Reply and the document from + * which it originates. + * @type string $query_record + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The content of the reply. + * + * Generated from protobuf field string reply = 1; + * @return string + */ + public function getReply() + { + return $this->reply; + } + + /** + * The content of the reply. + * + * Generated from protobuf field string reply = 1; + * @param string $var + * @return $this + */ + public function setReply($var) + { + GPBUtil::checkString($var, True); + $this->reply = $var; + + return $this; + } + + /** + * The system's confidence score that this reply is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field double confidence_score = 2; + * @return float + */ + public function getConfidenceScore() + { + return $this->confidence_score; + } + + /** + * The system's confidence score that this reply is a good match for this + * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + * certain). + * + * Generated from protobuf field double confidence_score = 2; + * @param float $var + * @return $this + */ + public function setConfidenceScore($var) + { + GPBUtil::checkDouble($var); + $this->confidence_score = $var; + + return $this; + } + + /** + * Map that contains metadata about the Smart Reply and the document from + * which it originates. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Map that contains metadata about the Smart Reply and the document from + * which it originates. + * + * Generated from protobuf field map metadata = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 4; + * @return string + */ + public function getQueryRecord() + { + return $this->query_record; + } + + /** + * The name of the answer record. + * Format: + * projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * Generated from protobuf field string query_record = 4; + * @param string $var + * @return $this + */ + public function setQueryRecord($var) + { + GPBUtil::checkString($var, True); + $this->query_record = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SpeechConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SpeechConfig.php new file mode 100644 index 000000000000..26829b4fdee5 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SpeechConfig.php @@ -0,0 +1,75 @@ +google.cloud.contactcenterinsights.v1.SpeechConfig + */ +class SpeechConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The fully-qualified Speech Recognizer resource name. + * Format: + * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` + * + * Generated from protobuf field string speech_recognizer = 1 [(.google.api.resource_reference) = { + */ + protected $speech_recognizer = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $speech_recognizer + * The fully-qualified Speech Recognizer resource name. + * Format: + * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The fully-qualified Speech Recognizer resource name. + * Format: + * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` + * + * Generated from protobuf field string speech_recognizer = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getSpeechRecognizer() + { + return $this->speech_recognizer; + } + + /** + * The fully-qualified Speech Recognizer resource name. + * Format: + * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` + * + * Generated from protobuf field string speech_recognizer = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSpeechRecognizer($var) + { + GPBUtil::checkString($var, True); + $this->speech_recognizer = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelMetadata.php new file mode 100644 index 000000000000..e6995db42e6e --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelMetadata.php @@ -0,0 +1,165 @@ +google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + */ +class UndeployIssueModelMetadata 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; + /** + * The original request for undeployment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest request = 3; + */ + protected $request = null; + + /** + * 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\UndeployIssueModelRequest $request + * The original request for undeployment. + * } + */ + 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; + } + + /** + * The original request for undeployment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest request = 3; + * @return \Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelRequest|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The original request for undeployment. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest request = 3; + * @param \Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelRequest::class); + $this->request = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelRequest.php new file mode 100644 index 000000000000..7db5b4fe3288 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelRequest.php @@ -0,0 +1,81 @@ +google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + */ +class UndeployIssueModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The issue model to undeploy. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The issue model to undeploy. Please see + * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. + * + * @return \Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelRequest + * + * @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 issue model to undeploy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The issue model to undeploy. + * + * 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 undeploy. + * + * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelResponse.php new file mode 100644 index 000000000000..0478db7e5e18 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelResponse.php @@ -0,0 +1,33 @@ +google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + */ +class UndeployIssueModelResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateConversationRequest.php new file mode 100644 index 000000000000..454731ba405c --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateConversationRequest.php @@ -0,0 +1,136 @@ +google.cloud.contactcenterinsights.v1.UpdateConversationRequest + */ +class UpdateConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new values for the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @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. + * + * @return \Google\Cloud\ContactCenterInsights\V1\UpdateConversationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ContactCenterInsights\V1\Conversation $conversation, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setConversation($conversation) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new values for the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\Conversation|null + */ + public function getConversation() + { + return $this->conversation; + } + + public function hasConversation() + { + return isset($this->conversation); + } + + public function clearConversation() + { + unset($this->conversation); + } + + /** + * Required. The new values for the conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\Conversation $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation::class); + $this->conversation = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueModelRequest.php new file mode 100644 index 000000000000..2cc1f7c36565 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueModelRequest.php @@ -0,0 +1,136 @@ +google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + */ +class UpdateIssueModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new values for the issue model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $issue_model = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel $issueModel Required. The new values for the issue model. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\ContactCenterInsights\V1\UpdateIssueModelRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ContactCenterInsights\V1\IssueModel $issueModel, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIssueModel($issueModel) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\IssueModel $issue_model + * Required. The new values for the issue model. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new values for the issue model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\IssueModel|null + */ + public function getIssueModel() + { + return $this->issue_model; + } + + public function hasIssueModel() + { + return isset($this->issue_model); + } + + public function clearIssueModel() + { + unset($this->issue_model); + } + + /** + * Required. The new values for the issue model. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel $var + * @return $this + */ + public function setIssueModel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel::class); + $this->issue_model = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueRequest.php new file mode 100644 index 000000000000..0be9746fae85 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueRequest.php @@ -0,0 +1,136 @@ +google.cloud.contactcenterinsights.v1.UpdateIssueRequest + */ +class UpdateIssueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new values for the issue. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $issue = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\ContactCenterInsights\V1\Issue $issue Required. The new values for the issue. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\ContactCenterInsights\V1\UpdateIssueRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ContactCenterInsights\V1\Issue $issue, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIssue($issue) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\Issue $issue + * Required. The new values for the issue. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new values for the issue. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\Issue|null + */ + public function getIssue() + { + return $this->issue; + } + + public function hasIssue() + { + return isset($this->issue); + } + + public function clearIssue() + { + unset($this->issue); + } + + /** + * Required. The new values for the issue. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\Issue $var + * @return $this + */ + public function setIssue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Issue::class); + $this->issue = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdatePhraseMatcherRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdatePhraseMatcherRequest.php new file mode 100644 index 000000000000..f161bd6098d5 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdatePhraseMatcherRequest.php @@ -0,0 +1,136 @@ +google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + */ +class UpdatePhraseMatcherRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new values for the phrase matcher. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $phrase_matcher = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phraseMatcher Required. The new values for the phrase matcher. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\ContactCenterInsights\V1\UpdatePhraseMatcherRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phraseMatcher, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPhraseMatcher($phraseMatcher) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phrase_matcher + * Required. The new values for the phrase matcher. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new values for the phrase matcher. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher|null + */ + public function getPhraseMatcher() + { + return $this->phrase_matcher; + } + + public function hasPhraseMatcher() + { + return isset($this->phrase_matcher); + } + + public function clearPhraseMatcher() + { + unset($this->phrase_matcher); + } + + /** + * Required. The new values for the phrase matcher. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $var + * @return $this + */ + public function setPhraseMatcher($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher::class); + $this->phrase_matcher = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateSettingsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateSettingsRequest.php new file mode 100644 index 000000000000..83a51d0c3938 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateSettingsRequest.php @@ -0,0 +1,136 @@ +google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + */ +class UpdateSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new settings values. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $settings = null; + /** + * Required. The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\ContactCenterInsights\V1\Settings $settings Required. The new settings values. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to be updated. + * + * @return \Google\Cloud\ContactCenterInsights\V1\UpdateSettingsRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ContactCenterInsights\V1\Settings $settings, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSettings($settings) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\Settings $settings + * Required. The new settings values. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new settings values. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\Settings|null + */ + public function getSettings() + { + return $this->settings; + } + + public function hasSettings() + { + return isset($this->settings); + } + + public function clearSettings() + { + unset($this->settings); + } + + /** + * Required. The new settings values. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\Settings $var + * @return $this + */ + public function setSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Settings::class); + $this->settings = $var; + + return $this; + } + + /** + * Required. The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateViewRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateViewRequest.php new file mode 100644 index 000000000000..c1adc1132a5f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateViewRequest.php @@ -0,0 +1,136 @@ +google.cloud.contactcenterinsights.v1.UpdateViewRequest + */ +class UpdateViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new view. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $view = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\ContactCenterInsights\V1\View $view Required. The new view. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\ContactCenterInsights\V1\UpdateViewRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ContactCenterInsights\V1\View $view, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setView($view) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ContactCenterInsights\V1\View $view + * Required. The new view. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new view. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\View|null + */ + public function getView() + { + return $this->view; + } + + public function hasView() + { + return isset($this->view); + } + + public function clearView() + { + unset($this->view); + } + + /** + * Required. The new view. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\View $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\View::class); + $this->view = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationMetadata.php new file mode 100644 index 000000000000..3d20791c0681 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationMetadata.php @@ -0,0 +1,247 @@ +google.cloud.contactcenterinsights.v1.UploadConversationMetadata + */ +class UploadConversationMetadata 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. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UploadConversationRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $request = null; + /** + * Output only. The operation name for a successfully created analysis + * operation, if any. + * + * Generated from protobuf field string analysis_operation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $analysis_operation = ''; + /** + * Output only. The redaction config applied to the uploaded conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig applied_redaction_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $applied_redaction_config = null; + + /** + * 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\UploadConversationRequest $request + * Output only. The original request. + * @type string $analysis_operation + * Output only. The operation name for a successfully created analysis + * operation, if any. + * @type \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $applied_redaction_config + * Output only. The redaction config applied to the uploaded conversation. + * } + */ + 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. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UploadConversationRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ContactCenterInsights\V1\UploadConversationRequest|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. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UploadConversationRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ContactCenterInsights\V1\UploadConversationRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\UploadConversationRequest::class); + $this->request = $var; + + return $this; + } + + /** + * Output only. The operation name for a successfully created analysis + * operation, if any. + * + * Generated from protobuf field string analysis_operation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAnalysisOperation() + { + return $this->analysis_operation; + } + + /** + * Output only. The operation name for a successfully created analysis + * operation, if any. + * + * Generated from protobuf field string analysis_operation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAnalysisOperation($var) + { + GPBUtil::checkString($var, True); + $this->analysis_operation = $var; + + return $this; + } + + /** + * Output only. The redaction config applied to the uploaded conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig applied_redaction_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ContactCenterInsights\V1\RedactionConfig|null + */ + public function getAppliedRedactionConfig() + { + return $this->applied_redaction_config; + } + + public function hasAppliedRedactionConfig() + { + return isset($this->applied_redaction_config); + } + + public function clearAppliedRedactionConfig() + { + unset($this->applied_redaction_config); + } + + /** + * Output only. The redaction config applied to the uploaded conversation. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig applied_redaction_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $var + * @return $this + */ + public function setAppliedRedactionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\RedactionConfig::class); + $this->applied_redaction_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationRequest.php new file mode 100644 index 000000000000..443a3b1398eb --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationRequest.php @@ -0,0 +1,257 @@ +google.cloud.contactcenterinsights.v1.UploadConversationRequest + */ +class UploadConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the conversation. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The conversation resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation = null; + /** + * Optional. A unique ID for the new conversation. This ID will become the + * final component of the conversation's resource name. If no ID is specified, + * a server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * + * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $conversation_id = ''; + /** + * Optional. DLP settings for transcript redaction. Will default to the config + * specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $redaction_config = null; + /** + * Optional. Speech-to-Text configuration. Will default to the config + * specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $speech_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the conversation. + * @type \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation + * Required. The conversation resource to create. + * @type string $conversation_id + * Optional. A unique ID for the new conversation. This ID will become the + * final component of the conversation's resource name. If no ID is specified, + * a server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * @type \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $redaction_config + * Optional. DLP settings for transcript redaction. Will default to the config + * specified in Settings. + * @type \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $speech_config + * Optional. Speech-to-Text configuration. Will default to the config + * specified in Settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the conversation. + * + * 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 conversation. + * + * 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; + } + + /** + * Required. The conversation resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ContactCenterInsights\V1\Conversation|null + */ + public function getConversation() + { + return $this->conversation; + } + + public function hasConversation() + { + return isset($this->conversation); + } + + public function clearConversation() + { + unset($this->conversation); + } + + /** + * Required. The conversation resource to create. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ContactCenterInsights\V1\Conversation $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation::class); + $this->conversation = $var; + + return $this; + } + + /** + * Optional. A unique ID for the new conversation. This ID will become the + * final component of the conversation's resource name. If no ID is specified, + * a server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * + * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getConversationId() + { + return $this->conversation_id; + } + + /** + * Optional. A unique ID for the new conversation. This ID will become the + * final component of the conversation's resource name. If no ID is specified, + * a server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * + * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setConversationId($var) + { + GPBUtil::checkString($var, True); + $this->conversation_id = $var; + + return $this; + } + + /** + * Optional. DLP settings for transcript redaction. Will default to the config + * specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ContactCenterInsights\V1\RedactionConfig|null + */ + public function getRedactionConfig() + { + return $this->redaction_config; + } + + public function hasRedactionConfig() + { + return isset($this->redaction_config); + } + + public function clearRedactionConfig() + { + unset($this->redaction_config); + } + + /** + * Optional. DLP settings for transcript redaction. Will default to the config + * specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $var + * @return $this + */ + public function setRedactionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\RedactionConfig::class); + $this->redaction_config = $var; + + return $this; + } + + /** + * Optional. Speech-to-Text configuration. Will default to the config + * specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ContactCenterInsights\V1\SpeechConfig|null + */ + public function getSpeechConfig() + { + return $this->speech_config; + } + + public function hasSpeechConfig() + { + return isset($this->speech_config); + } + + public function clearSpeechConfig() + { + unset($this->speech_config); + } + + /** + * Optional. Speech-to-Text configuration. Will default to the config + * specified in Settings. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $var + * @return $this + */ + public function setSpeechConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SpeechConfig::class); + $this->speech_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/View.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/View.php new file mode 100644 index 000000000000..286533d5ad37 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/View.php @@ -0,0 +1,231 @@ +google.cloud.contactcenterinsights.v1.View + */ +class View extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of the view. + * Format: + * projects/{project}/locations/{location}/views/{view} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The human-readable display name of the view. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Output only. The time at which this view was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The most recent time at which the view was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * String with specific view properties, must be non-empty. + * + * Generated from protobuf field string value = 5; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of the view. + * Format: + * projects/{project}/locations/{location}/views/{view} + * @type string $display_name + * The human-readable display name of the view. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this view was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The most recent time at which the view was updated. + * @type string $value + * String with specific view properties, must be non-empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of the view. + * Format: + * projects/{project}/locations/{location}/views/{view} + * + * 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 view. + * Format: + * projects/{project}/locations/{location}/views/{view} + * + * 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; + } + + /** + * The human-readable display name of the view. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human-readable display name of the view. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The time at which this view was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which this view was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 most recent time at which the view was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The most recent time at which the view was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * String with specific view properties, must be non-empty. + * + * Generated from protobuf field string value = 5; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * String with specific view properties, must be non-empty. + * + * Generated from protobuf field string value = 5; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php new file mode 100644 index 000000000000..6690b28c662a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setFilter($filter) + ->setAnalysisPercentage($analysisPercentage); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->bulkAnalyzeConversations($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BulkAnalyzeConversationsResponse $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]'); + $filter = '[FILTER]'; + $analysisPercentage = 0.0; + + bulk_analyze_conversations_sample($formattedParent, $filter, $analysisPercentage); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php new file mode 100644 index 000000000000..6e906a6f7abf --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->bulkDeleteConversations($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BulkDeleteConversationsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); + + bulk_delete_conversations_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php new file mode 100644 index 000000000000..bb94021bdbba --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php @@ -0,0 +1,75 @@ +setIssueModel($formattedIssueModel); + + // Call the API and handle any network failures. + try { + /** @var CalculateIssueModelStatsResponse $response */ + $response = $contactCenterInsightsClient->calculateIssueModelStats($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 +{ + $formattedIssueModel = ContactCenterInsightsClient::issueModelName( + '[PROJECT]', + '[LOCATION]', + '[ISSUE_MODEL]' + ); + + calculate_issue_model_stats_sample($formattedIssueModel); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_stats.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_stats.php new file mode 100644 index 000000000000..f995fedb1279 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_stats.php @@ -0,0 +1,71 @@ +setLocation($formattedLocation); + + // Call the API and handle any network failures. + try { + /** @var CalculateStatsResponse $response */ + $response = $contactCenterInsightsClient->calculateStats($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 +{ + $formattedLocation = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); + + calculate_stats_sample($formattedLocation); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_CalculateStats_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_analysis.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_analysis.php new file mode 100644 index 000000000000..b60e85cac938 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_analysis.php @@ -0,0 +1,90 @@ +setParent($formattedParent) + ->setAnalysis($analysis); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->createAnalysis($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Analysis $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::conversationName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION]' + ); + + create_analysis_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_conversation.php new file mode 100644 index 000000000000..d46c9f731d66 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_conversation.php @@ -0,0 +1,73 @@ +setParent($formattedParent) + ->setConversation($conversation); + + // Call the API and handle any network failures. + try { + /** @var Conversation $response */ + $response = $contactCenterInsightsClient->createConversation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); + + create_conversation_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_issue_model.php new file mode 100644 index 000000000000..52df0b52274a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_issue_model.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setIssueModel($issueModel); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->createIssueModel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var IssueModel $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]'); + + create_issue_model_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php new file mode 100644 index 000000000000..832ef0278454 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php @@ -0,0 +1,80 @@ +/locations/` or `projects//locations/` + * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + * @param int $phraseMatcherType The type of this phrase matcher. + */ +function create_phrase_matcher_sample(string $formattedParent, int $phraseMatcherType): void +{ + // Create a client. + $contactCenterInsightsClient = new ContactCenterInsightsClient(); + + // Prepare the request message. + $phraseMatcher = (new PhraseMatcher()) + ->setType($phraseMatcherType); + $request = (new CreatePhraseMatcherRequest()) + ->setParent($formattedParent) + ->setPhraseMatcher($phraseMatcher); + + // Call the API and handle any network failures. + try { + /** @var PhraseMatcher $response */ + $response = $contactCenterInsightsClient->createPhraseMatcher($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + + create_phrase_matcher_sample($formattedParent, $phraseMatcherType); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreatePhraseMatcher_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_view.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_view.php new file mode 100644 index 000000000000..63fb46395bc7 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_view.php @@ -0,0 +1,76 @@ +/locations/` or + * `projects//locations/` + * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. + */ +function create_view_sample(string $formattedParent): void +{ + // Create a client. + $contactCenterInsightsClient = new ContactCenterInsightsClient(); + + // Prepare the request message. + $view = new View(); + $request = (new CreateViewRequest()) + ->setParent($formattedParent) + ->setView($view); + + // Call the API and handle any network failures. + try { + /** @var View $response */ + $response = $contactCenterInsightsClient->createView($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); + + create_view_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_analysis.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_analysis.php new file mode 100644 index 000000000000..e8351966a415 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_analysis.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $contactCenterInsightsClient->deleteAnalysis($request); + printf('Call completed successfully.' . PHP_EOL); + } 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::analysisName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION]', + '[ANALYSIS]' + ); + + delete_analysis_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysis_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_conversation.php new file mode 100644 index 000000000000..6cc0b0567122 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_conversation.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $contactCenterInsightsClient->deleteConversation($request); + printf('Call completed successfully.' . PHP_EOL); + } 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::conversationName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION]' + ); + + delete_conversation_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue.php new file mode 100644 index 000000000000..9d99a2fd60dd --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $contactCenterInsightsClient->deleteIssue($request); + printf('Call completed successfully.' . PHP_EOL); + } 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::issueName( + '[PROJECT]', + '[LOCATION]', + '[ISSUE_MODEL]', + '[ISSUE]' + ); + + delete_issue_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue_model.php new file mode 100644 index 000000000000..9ad6d1ce3309 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue_model.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->deleteIssueModel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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]' + ); + + delete_issue_model_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php new file mode 100644 index 000000000000..5cd2536f00a8 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $contactCenterInsightsClient->deletePhraseMatcher($request); + printf('Call completed successfully.' . PHP_EOL); + } 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::phraseMatcherName( + '[PROJECT]', + '[LOCATION]', + '[PHRASE_MATCHER]' + ); + + delete_phrase_matcher_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeletePhraseMatcher_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_view.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_view.php new file mode 100644 index 000000000000..274ddeabf34f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_view.php @@ -0,0 +1,69 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $contactCenterInsightsClient->deleteView($request); + printf('Call completed successfully.' . PHP_EOL); + } 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::viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + + delete_view_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/deploy_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/deploy_issue_model.php new file mode 100644 index 000000000000..d1ea724d467f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/deploy_issue_model.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->deployIssueModel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DeployIssueModelResponse $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]' + ); + + deploy_issue_model_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/export_insights_data.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/export_insights_data.php new file mode 100644 index 000000000000..2522e777dff7 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/export_insights_data.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->exportInsightsData($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportInsightsDataResponse $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]'); + + export_insights_data_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_analysis.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_analysis.php new file mode 100644 index 000000000000..b78f24b6bd1b --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_analysis.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Analysis $response */ + $response = $contactCenterInsightsClient->getAnalysis($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::analysisName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION]', + '[ANALYSIS]' + ); + + get_analysis_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysis_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_conversation.php new file mode 100644 index 000000000000..917c5b106dc5 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_conversation.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Conversation $response */ + $response = $contactCenterInsightsClient->getConversation($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::conversationName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION]' + ); + + get_conversation_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue.php new file mode 100644 index 000000000000..827a0427389a --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Issue $response */ + $response = $contactCenterInsightsClient->getIssue($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::issueName( + '[PROJECT]', + '[LOCATION]', + '[ISSUE_MODEL]', + '[ISSUE]' + ); + + get_issue_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue_model.php new file mode 100644 index 000000000000..cf58a527197e --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue_model.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var IssueModel $response */ + $response = $contactCenterInsightsClient->getIssueModel($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::issueModelName( + '[PROJECT]', + '[LOCATION]', + '[ISSUE_MODEL]' + ); + + get_issue_model_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php new file mode 100644 index 000000000000..990c38002eae --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PhraseMatcher $response */ + $response = $contactCenterInsightsClient->getPhraseMatcher($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::phraseMatcherName( + '[PROJECT]', + '[LOCATION]', + '[PHRASE_MATCHER]' + ); + + get_phrase_matcher_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_settings.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_settings.php new file mode 100644 index 000000000000..a142011799b0 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_settings.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Settings $response */ + $response = $contactCenterInsightsClient->getSettings($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::settingsName('[PROJECT]', '[LOCATION]'); + + get_settings_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetSettings_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_view.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_view.php new file mode 100644 index 000000000000..ae60b0ad8f63 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_view.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var View $response */ + $response = $contactCenterInsightsClient->getView($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::viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + + get_view_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetView_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/ingest_conversations.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/ingest_conversations.php new file mode 100644 index 000000000000..9d71a25dfc94 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/ingest_conversations.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->ingestConversations($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var IngestConversationsResponse $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]'); + + ingest_conversations_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_analyses.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_analyses.php new file mode 100644 index 000000000000..cdb1e6f2d644 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_analyses.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contactCenterInsightsClient->listAnalyses($request); + + /** @var Analysis $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactCenterInsightsClient::conversationName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION]' + ); + + list_analyses_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_conversations.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_conversations.php new file mode 100644 index 000000000000..5665534facf9 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_conversations.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contactCenterInsightsClient->listConversations($request); + + /** @var Conversation $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->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]'); + + list_conversations_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issue_models.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issue_models.php new file mode 100644 index 000000000000..12084d5b56ed --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issue_models.php @@ -0,0 +1,71 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListIssueModelsResponse $response */ + $response = $contactCenterInsightsClient->listIssueModels($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_issue_models_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListIssueModels_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issues.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issues.php new file mode 100644 index 000000000000..de159edab9c2 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issues.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListIssuesResponse $response */ + $response = $contactCenterInsightsClient->listIssues($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactCenterInsightsClient::issueModelName( + '[PROJECT]', + '[LOCATION]', + '[ISSUE_MODEL]' + ); + + list_issues_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListIssues_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php new file mode 100644 index 000000000000..2b7b25cb5d51 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contactCenterInsightsClient->listPhraseMatchers($request); + + /** @var PhraseMatcher $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->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]'); + + list_phrase_matchers_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_views.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_views.php new file mode 100644 index 000000000000..d521e8bfdc96 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_views.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contactCenterInsightsClient->listViews($request); + + /** @var View $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->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]'); + + list_views_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php new file mode 100644 index 000000000000..6cc320d110b2 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->undeployIssueModel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UndeployIssueModelResponse $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]' + ); + + undeploy_issue_model_sample($formattedName); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_conversation.php new file mode 100644 index 000000000000..c77275e00e38 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_conversation.php @@ -0,0 +1,59 @@ +setConversation($conversation); + + // Call the API and handle any network failures. + try { + /** @var Conversation $response */ + $response = $contactCenterInsightsClient->updateConversation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue.php new file mode 100644 index 000000000000..aa18755dcf5e --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue.php @@ -0,0 +1,59 @@ +setIssue($issue); + + // Call the API and handle any network failures. + try { + /** @var Issue $response */ + $response = $contactCenterInsightsClient->updateIssue($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssue_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue_model.php new file mode 100644 index 000000000000..89ea454ea827 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue_model.php @@ -0,0 +1,59 @@ +setIssueModel($issueModel); + + // Call the API and handle any network failures. + try { + /** @var IssueModel $response */ + $response = $contactCenterInsightsClient->updateIssueModel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php new file mode 100644 index 000000000000..543ffbc2a74d --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php @@ -0,0 +1,73 @@ +setType($phraseMatcherType); + $request = (new UpdatePhraseMatcherRequest()) + ->setPhraseMatcher($phraseMatcher); + + // Call the API and handle any network failures. + try { + /** @var PhraseMatcher $response */ + $response = $contactCenterInsightsClient->updatePhraseMatcher($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 +{ + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + + update_phrase_matcher_sample($phraseMatcherType); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdatePhraseMatcher_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_settings.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_settings.php new file mode 100644 index 000000000000..aaafe4bb653c --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_settings.php @@ -0,0 +1,62 @@ +setSettings($settings) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Settings $response */ + $response = $contactCenterInsightsClient->updateSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateSettings_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_view.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_view.php new file mode 100644 index 000000000000..a4cbd719634c --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_view.php @@ -0,0 +1,59 @@ +setView($view); + + // Call the API and handle any network failures. + try { + /** @var View $response */ + $response = $contactCenterInsightsClient->updateView($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/upload_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/upload_conversation.php new file mode 100644 index 000000000000..84921be71da8 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/upload_conversation.php @@ -0,0 +1,87 @@ +setParent($formattedParent) + ->setConversation($conversation); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $contactCenterInsightsClient->uploadConversation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Conversation $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]'); + + upload_conversation_sample($formattedParent); +} +// [END contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/Client/ContactCenterInsightsClient.php b/owl-bot-staging/ContactCenterInsights/v1/src/V1/Client/ContactCenterInsightsClient.php new file mode 100644 index 000000000000..a07f8f8b0df2 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/src/V1/Client/ContactCenterInsightsClient.php @@ -0,0 +1,1609 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/contact_center_insights_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/contact_center_insights_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/contact_center_insights_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/contact_center_insights_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a analysis + * resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * @param string $analysis + * + * @return string The formatted analysis resource. + */ + public static function analysisName(string $project, string $location, string $conversation, string $analysis): string + { + return self::getPathTemplate('analysis')->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + 'analysis' => $analysis, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a conversation + * resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * + * @return string The formatted conversation resource. + */ + public static function conversationName(string $project, string $location, string $conversation): string + { + return self::getPathTemplate('conversation')->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conversation_profile resource. + * + * @param string $project + * @param string $location + * @param string $conversationProfile + * + * @return string The formatted conversation_profile resource. + */ + public static function conversationProfileName(string $project, string $location, string $conversationProfile): string + { + return self::getPathTemplate('conversationProfile')->render([ + 'project' => $project, + 'location' => $location, + 'conversation_profile' => $conversationProfile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a issue + * resource. + * + * @param string $project + * @param string $location + * @param string $issueModel + * @param string $issue + * + * @return string The formatted issue resource. + */ + public static function issueName(string $project, string $location, string $issueModel, string $issue): string + { + return self::getPathTemplate('issue')->render([ + 'project' => $project, + 'location' => $location, + 'issue_model' => $issueModel, + 'issue' => $issue, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a issue_model + * resource. + * + * @param string $project + * @param string $location + * @param string $issueModel + * + * @return string The formatted issue_model resource. + */ + public static function issueModelName(string $project, string $location, string $issueModel): string + { + return self::getPathTemplate('issueModel')->render([ + 'project' => $project, + 'location' => $location, + 'issue_model' => $issueModel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a participant + * resource. + * + * @param string $project + * @param string $conversation + * @param string $participant + * + * @return string The formatted participant resource. + */ + public static function participantName(string $project, string $conversation, string $participant): string + { + return self::getPathTemplate('participant')->render([ + 'project' => $project, + 'conversation' => $conversation, + 'participant' => $participant, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * phrase_matcher resource. + * + * @param string $project + * @param string $location + * @param string $phraseMatcher + * + * @return string The formatted phrase_matcher resource. + */ + public static function phraseMatcherName(string $project, string $location, string $phraseMatcher): string + { + return self::getPathTemplate('phraseMatcher')->render([ + 'project' => $project, + 'location' => $location, + 'phrase_matcher' => $phraseMatcher, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation_participant resource. + * + * @param string $project + * @param string $conversation + * @param string $participant + * + * @return string The formatted project_conversation_participant resource. + */ + public static function projectConversationParticipantName(string $project, string $conversation, string $participant): string + { + return self::getPathTemplate('projectConversationParticipant')->render([ + 'project' => $project, + 'conversation' => $conversation, + 'participant' => $participant, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation_participant resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * @param string $participant + * + * @return string The formatted project_location_conversation_participant resource. + */ + public static function projectLocationConversationParticipantName(string $project, string $location, string $conversation, string $participant): string + { + return self::getPathTemplate('projectLocationConversationParticipant')->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + 'participant' => $participant, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a recognizer + * resource. + * + * @param string $project + * @param string $location + * @param string $recognizer + * + * @return string The formatted recognizer resource. + */ + public static function recognizerName(string $project, string $location, string $recognizer): string + { + return self::getPathTemplate('recognizer')->render([ + 'project' => $project, + 'location' => $location, + 'recognizer' => $recognizer, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a settings + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted settings resource. + */ + public static function settingsName(string $project, string $location): string + { + return self::getPathTemplate('settings')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a view + * resource. + * + * @param string $project + * @param string $location + * @param string $view + * + * @return string The formatted view resource. + */ + public static function viewName(string $project, string $location, string $view): string + { + return self::getPathTemplate('view')->render([ + 'project' => $project, + 'location' => $location, + 'view' => $view, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - analysis: projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} + * - conversation: projects/{project}/locations/{location}/conversations/{conversation} + * - conversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} + * - issue: projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * - issueModel: projects/{project}/locations/{location}/issueModels/{issue_model} + * - location: projects/{project}/locations/{location} + * - participant: projects/{project}/conversations/{conversation}/participants/{participant} + * - phraseMatcher: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * - projectConversationParticipant: projects/{project}/conversations/{conversation}/participants/{participant} + * - projectLocationConversationParticipant: projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * - recognizer: projects/{project}/locations/{location}/recognizers/{recognizer} + * - settings: projects/{project}/locations/{location}/settings + * - view: projects/{project}/locations/{location}/views/{view} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'contactcenterinsights.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Analyzes multiple conversations in a single request. + * + * The async variant is + * {@see ContactCenterInsightsClient::bulkAnalyzeConversationsAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php + * + * @param BulkAnalyzeConversationsRequest $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 bulkAnalyzeConversations(BulkAnalyzeConversationsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BulkAnalyzeConversations', $request, $callOptions)->wait(); + } + + /** + * Deletes multiple conversations in a single request. + * + * The async variant is + * {@see ContactCenterInsightsClient::bulkDeleteConversationsAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php + * + * @param BulkDeleteConversationsRequest $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 bulkDeleteConversations(BulkDeleteConversationsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BulkDeleteConversations', $request, $callOptions)->wait(); + } + + /** + * Gets an issue model's statistics. + * + * The async variant is + * {@see ContactCenterInsightsClient::calculateIssueModelStatsAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php + * + * @param CalculateIssueModelStatsRequest $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 CalculateIssueModelStatsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function calculateIssueModelStats(CalculateIssueModelStatsRequest $request, array $callOptions = []): CalculateIssueModelStatsResponse + { + return $this->startApiCall('CalculateIssueModelStats', $request, $callOptions)->wait(); + } + + /** + * Gets conversation statistics. + * + * The async variant is {@see ContactCenterInsightsClient::calculateStatsAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/calculate_stats.php + * + * @param CalculateStatsRequest $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 CalculateStatsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function calculateStats(CalculateStatsRequest $request, array $callOptions = []): CalculateStatsResponse + { + return $this->startApiCall('CalculateStats', $request, $callOptions)->wait(); + } + + /** + * Creates an analysis. The long running operation is done when the analysis + * has completed. + * + * The async variant is {@see ContactCenterInsightsClient::createAnalysisAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/create_analysis.php + * + * @param CreateAnalysisRequest $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 createAnalysis(CreateAnalysisRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAnalysis', $request, $callOptions)->wait(); + } + + /** + * Creates a conversation. + * + * The async variant is + * {@see ContactCenterInsightsClient::createConversationAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/create_conversation.php + * + * @param CreateConversationRequest $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 Conversation + * + * @throws ApiException Thrown if the API call fails. + */ + public function createConversation(CreateConversationRequest $request, array $callOptions = []): Conversation + { + return $this->startApiCall('CreateConversation', $request, $callOptions)->wait(); + } + + /** + * Creates an issue model. + * + * The async variant is {@see ContactCenterInsightsClient::createIssueModelAsync()} + * . + * + * @example samples/V1/ContactCenterInsightsClient/create_issue_model.php + * + * @param CreateIssueModelRequest $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 createIssueModel(CreateIssueModelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateIssueModel', $request, $callOptions)->wait(); + } + + /** + * Creates a phrase matcher. + * + * The async variant is + * {@see ContactCenterInsightsClient::createPhraseMatcherAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php + * + * @param CreatePhraseMatcherRequest $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 PhraseMatcher + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPhraseMatcher(CreatePhraseMatcherRequest $request, array $callOptions = []): PhraseMatcher + { + return $this->startApiCall('CreatePhraseMatcher', $request, $callOptions)->wait(); + } + + /** + * Creates a view. + * + * The async variant is {@see ContactCenterInsightsClient::createViewAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/create_view.php + * + * @param CreateViewRequest $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 View + * + * @throws ApiException Thrown if the API call fails. + */ + public function createView(CreateViewRequest $request, array $callOptions = []): View + { + return $this->startApiCall('CreateView', $request, $callOptions)->wait(); + } + + /** + * Deletes an analysis. + * + * The async variant is {@see ContactCenterInsightsClient::deleteAnalysisAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/delete_analysis.php + * + * @param DeleteAnalysisRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAnalysis(DeleteAnalysisRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAnalysis', $request, $callOptions)->wait(); + } + + /** + * Deletes a conversation. + * + * The async variant is + * {@see ContactCenterInsightsClient::deleteConversationAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/delete_conversation.php + * + * @param DeleteConversationRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteConversation(DeleteConversationRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteConversation', $request, $callOptions)->wait(); + } + + /** + * Deletes an issue. + * + * The async variant is {@see ContactCenterInsightsClient::deleteIssueAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/delete_issue.php + * + * @param DeleteIssueRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteIssue(DeleteIssueRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteIssue', $request, $callOptions)->wait(); + } + + /** + * Deletes an issue model. + * + * The async variant is {@see ContactCenterInsightsClient::deleteIssueModelAsync()} + * . + * + * @example samples/V1/ContactCenterInsightsClient/delete_issue_model.php + * + * @param DeleteIssueModelRequest $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 deleteIssueModel(DeleteIssueModelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteIssueModel', $request, $callOptions)->wait(); + } + + /** + * Deletes a phrase matcher. + * + * The async variant is + * {@see ContactCenterInsightsClient::deletePhraseMatcherAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php + * + * @param DeletePhraseMatcherRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePhraseMatcher(DeletePhraseMatcherRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeletePhraseMatcher', $request, $callOptions)->wait(); + } + + /** + * Deletes a view. + * + * The async variant is {@see ContactCenterInsightsClient::deleteViewAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/delete_view.php + * + * @param DeleteViewRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteView(DeleteViewRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteView', $request, $callOptions)->wait(); + } + + /** + * Deploys an issue model. Returns an error if a model is already deployed. + * An issue model can only be used in analysis after it has been deployed. + * + * The async variant is {@see ContactCenterInsightsClient::deployIssueModelAsync()} + * . + * + * @example samples/V1/ContactCenterInsightsClient/deploy_issue_model.php + * + * @param DeployIssueModelRequest $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 deployIssueModel(DeployIssueModelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeployIssueModel', $request, $callOptions)->wait(); + } + + /** + * Export insights data to a destination defined in the request body. + * + * The async variant is + * {@see ContactCenterInsightsClient::exportInsightsDataAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/export_insights_data.php + * + * @param ExportInsightsDataRequest $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 exportInsightsData(ExportInsightsDataRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportInsightsData', $request, $callOptions)->wait(); + } + + /** + * Gets an analysis. + * + * The async variant is {@see ContactCenterInsightsClient::getAnalysisAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/get_analysis.php + * + * @param GetAnalysisRequest $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 Analysis + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAnalysis(GetAnalysisRequest $request, array $callOptions = []): Analysis + { + return $this->startApiCall('GetAnalysis', $request, $callOptions)->wait(); + } + + /** + * Gets a conversation. + * + * The async variant is {@see ContactCenterInsightsClient::getConversationAsync()} + * . + * + * @example samples/V1/ContactCenterInsightsClient/get_conversation.php + * + * @param GetConversationRequest $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 Conversation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConversation(GetConversationRequest $request, array $callOptions = []): Conversation + { + return $this->startApiCall('GetConversation', $request, $callOptions)->wait(); + } + + /** + * Gets an issue. + * + * The async variant is {@see ContactCenterInsightsClient::getIssueAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/get_issue.php + * + * @param GetIssueRequest $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 Issue + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIssue(GetIssueRequest $request, array $callOptions = []): Issue + { + return $this->startApiCall('GetIssue', $request, $callOptions)->wait(); + } + + /** + * Gets an issue model. + * + * The async variant is {@see ContactCenterInsightsClient::getIssueModelAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/get_issue_model.php + * + * @param GetIssueModelRequest $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 IssueModel + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIssueModel(GetIssueModelRequest $request, array $callOptions = []): IssueModel + { + return $this->startApiCall('GetIssueModel', $request, $callOptions)->wait(); + } + + /** + * Gets a phrase matcher. + * + * The async variant is {@see ContactCenterInsightsClient::getPhraseMatcherAsync()} + * . + * + * @example samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php + * + * @param GetPhraseMatcherRequest $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 PhraseMatcher + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPhraseMatcher(GetPhraseMatcherRequest $request, array $callOptions = []): PhraseMatcher + { + return $this->startApiCall('GetPhraseMatcher', $request, $callOptions)->wait(); + } + + /** + * Gets project-level settings. + * + * The async variant is {@see ContactCenterInsightsClient::getSettingsAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/get_settings.php + * + * @param GetSettingsRequest $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 Settings + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSettings(GetSettingsRequest $request, array $callOptions = []): Settings + { + return $this->startApiCall('GetSettings', $request, $callOptions)->wait(); + } + + /** + * Gets a view. + * + * The async variant is {@see ContactCenterInsightsClient::getViewAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/get_view.php + * + * @param GetViewRequest $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 View + * + * @throws ApiException Thrown if the API call fails. + */ + public function getView(GetViewRequest $request, array $callOptions = []): View + { + return $this->startApiCall('GetView', $request, $callOptions)->wait(); + } + + /** + * Imports conversations and processes them according to the user's + * configuration. + * + * The async variant is + * {@see ContactCenterInsightsClient::ingestConversationsAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/ingest_conversations.php + * + * @param IngestConversationsRequest $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 ingestConversations(IngestConversationsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('IngestConversations', $request, $callOptions)->wait(); + } + + /** + * Lists analyses. + * + * The async variant is {@see ContactCenterInsightsClient::listAnalysesAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/list_analyses.php + * + * @param ListAnalysesRequest $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 PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAnalyses(ListAnalysesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAnalyses', $request, $callOptions); + } + + /** + * Lists conversations. + * + * The async variant is + * {@see ContactCenterInsightsClient::listConversationsAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/list_conversations.php + * + * @param ListConversationsRequest $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 PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listConversations(ListConversationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListConversations', $request, $callOptions); + } + + /** + * Lists issue models. + * + * The async variant is {@see ContactCenterInsightsClient::listIssueModelsAsync()} + * . + * + * @example samples/V1/ContactCenterInsightsClient/list_issue_models.php + * + * @param ListIssueModelsRequest $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 ListIssueModelsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listIssueModels(ListIssueModelsRequest $request, array $callOptions = []): ListIssueModelsResponse + { + return $this->startApiCall('ListIssueModels', $request, $callOptions)->wait(); + } + + /** + * Lists issues. + * + * The async variant is {@see ContactCenterInsightsClient::listIssuesAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/list_issues.php + * + * @param ListIssuesRequest $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 ListIssuesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listIssues(ListIssuesRequest $request, array $callOptions = []): ListIssuesResponse + { + return $this->startApiCall('ListIssues', $request, $callOptions)->wait(); + } + + /** + * Lists phrase matchers. + * + * The async variant is + * {@see ContactCenterInsightsClient::listPhraseMatchersAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php + * + * @param ListPhraseMatchersRequest $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 PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPhraseMatchers(ListPhraseMatchersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPhraseMatchers', $request, $callOptions); + } + + /** + * Lists views. + * + * The async variant is {@see ContactCenterInsightsClient::listViewsAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/list_views.php + * + * @param ListViewsRequest $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 PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listViews(ListViewsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListViews', $request, $callOptions); + } + + /** + * Undeploys an issue model. + * An issue model can not be used in analysis after it has been undeployed. + * + * The async variant is + * {@see ContactCenterInsightsClient::undeployIssueModelAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php + * + * @param UndeployIssueModelRequest $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 undeployIssueModel(UndeployIssueModelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UndeployIssueModel', $request, $callOptions)->wait(); + } + + /** + * Updates a conversation. + * + * The async variant is + * {@see ContactCenterInsightsClient::updateConversationAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/update_conversation.php + * + * @param UpdateConversationRequest $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 Conversation + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateConversation(UpdateConversationRequest $request, array $callOptions = []): Conversation + { + return $this->startApiCall('UpdateConversation', $request, $callOptions)->wait(); + } + + /** + * Updates an issue. + * + * The async variant is {@see ContactCenterInsightsClient::updateIssueAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/update_issue.php + * + * @param UpdateIssueRequest $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 Issue + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateIssue(UpdateIssueRequest $request, array $callOptions = []): Issue + { + return $this->startApiCall('UpdateIssue', $request, $callOptions)->wait(); + } + + /** + * Updates an issue model. + * + * The async variant is {@see ContactCenterInsightsClient::updateIssueModelAsync()} + * . + * + * @example samples/V1/ContactCenterInsightsClient/update_issue_model.php + * + * @param UpdateIssueModelRequest $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 IssueModel + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateIssueModel(UpdateIssueModelRequest $request, array $callOptions = []): IssueModel + { + return $this->startApiCall('UpdateIssueModel', $request, $callOptions)->wait(); + } + + /** + * Updates a phrase matcher. + * + * The async variant is + * {@see ContactCenterInsightsClient::updatePhraseMatcherAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php + * + * @param UpdatePhraseMatcherRequest $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 PhraseMatcher + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePhraseMatcher(UpdatePhraseMatcherRequest $request, array $callOptions = []): PhraseMatcher + { + return $this->startApiCall('UpdatePhraseMatcher', $request, $callOptions)->wait(); + } + + /** + * Updates project-level settings. + * + * The async variant is {@see ContactCenterInsightsClient::updateSettingsAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/update_settings.php + * + * @param UpdateSettingsRequest $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 Settings + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSettings(UpdateSettingsRequest $request, array $callOptions = []): Settings + { + return $this->startApiCall('UpdateSettings', $request, $callOptions)->wait(); + } + + /** + * Updates a view. + * + * The async variant is {@see ContactCenterInsightsClient::updateViewAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/update_view.php + * + * @param UpdateViewRequest $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 View + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateView(UpdateViewRequest $request, array $callOptions = []): View + { + return $this->startApiCall('UpdateView', $request, $callOptions)->wait(); + } + + /** + * Create a longrunning conversation upload operation. This method differs + * from CreateConversation by allowing audio transcription and optional DLP + * redaction. + * + * The async variant is + * {@see ContactCenterInsightsClient::uploadConversationAsync()} . + * + * @example samples/V1/ContactCenterInsightsClient/upload_conversation.php + * + * @param UploadConversationRequest $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 uploadConversation(UploadConversationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UploadConversation', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/ContactCenterInsightsClient.php b/owl-bot-staging/ContactCenterInsights/v1/src/V1/ContactCenterInsightsClient.php new file mode 100644 index 000000000000..8c6b14f2b500 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/src/V1/ContactCenterInsightsClient.php @@ -0,0 +1,34 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $filter = 'filter'; + * $analysisPercentage = 0.0; + * $operationResponse = $contactCenterInsightsClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'bulkAnalyzeConversations'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\ContactCenterInsights\V1\Client\ContactCenterInsightsClient}. + */ +class ContactCenterInsightsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.contactcenterinsights.v1.ContactCenterInsights'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'contactcenterinsights.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'contactcenterinsights.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $analysisNameTemplate; + + private static $conversationNameTemplate; + + private static $conversationProfileNameTemplate; + + private static $issueNameTemplate; + + private static $issueModelNameTemplate; + + private static $locationNameTemplate; + + private static $participantNameTemplate; + + private static $phraseMatcherNameTemplate; + + private static $projectConversationParticipantNameTemplate; + + private static $projectLocationConversationParticipantNameTemplate; + + private static $recognizerNameTemplate; + + private static $settingsNameTemplate; + + private static $viewNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/contact_center_insights_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/contact_center_insights_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/contact_center_insights_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/contact_center_insights_rest_client_config.php', + ], + ], + ]; + } + + private static function getAnalysisNameTemplate() + { + if (self::$analysisNameTemplate == null) { + self::$analysisNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}'); + } + + return self::$analysisNameTemplate; + } + + private static function getConversationNameTemplate() + { + if (self::$conversationNameTemplate == null) { + self::$conversationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}'); + } + + return self::$conversationNameTemplate; + } + + private static function getConversationProfileNameTemplate() + { + if (self::$conversationProfileNameTemplate == null) { + self::$conversationProfileNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}'); + } + + return self::$conversationProfileNameTemplate; + } + + private static function getIssueNameTemplate() + { + if (self::$issueNameTemplate == null) { + self::$issueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}'); + } + + return self::$issueNameTemplate; + } + + private static function getIssueModelNameTemplate() + { + if (self::$issueModelNameTemplate == null) { + self::$issueModelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/issueModels/{issue_model}'); + } + + return self::$issueModelNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getParticipantNameTemplate() + { + if (self::$participantNameTemplate == null) { + self::$participantNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/participants/{participant}'); + } + + return self::$participantNameTemplate; + } + + private static function getPhraseMatcherNameTemplate() + { + if (self::$phraseMatcherNameTemplate == null) { + self::$phraseMatcherNameTemplate = new PathTemplate('projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}'); + } + + return self::$phraseMatcherNameTemplate; + } + + private static function getProjectConversationParticipantNameTemplate() + { + if (self::$projectConversationParticipantNameTemplate == null) { + self::$projectConversationParticipantNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/participants/{participant}'); + } + + return self::$projectConversationParticipantNameTemplate; + } + + private static function getProjectLocationConversationParticipantNameTemplate() + { + if (self::$projectLocationConversationParticipantNameTemplate == null) { + self::$projectLocationConversationParticipantNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}'); + } + + return self::$projectLocationConversationParticipantNameTemplate; + } + + private static function getRecognizerNameTemplate() + { + if (self::$recognizerNameTemplate == null) { + self::$recognizerNameTemplate = new PathTemplate('projects/{project}/locations/{location}/recognizers/{recognizer}'); + } + + return self::$recognizerNameTemplate; + } + + private static function getSettingsNameTemplate() + { + if (self::$settingsNameTemplate == null) { + self::$settingsNameTemplate = new PathTemplate('projects/{project}/locations/{location}/settings'); + } + + return self::$settingsNameTemplate; + } + + private static function getViewNameTemplate() + { + if (self::$viewNameTemplate == null) { + self::$viewNameTemplate = new PathTemplate('projects/{project}/locations/{location}/views/{view}'); + } + + return self::$viewNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'analysis' => self::getAnalysisNameTemplate(), + 'conversation' => self::getConversationNameTemplate(), + 'conversationProfile' => self::getConversationProfileNameTemplate(), + 'issue' => self::getIssueNameTemplate(), + 'issueModel' => self::getIssueModelNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'participant' => self::getParticipantNameTemplate(), + 'phraseMatcher' => self::getPhraseMatcherNameTemplate(), + 'projectConversationParticipant' => self::getProjectConversationParticipantNameTemplate(), + 'projectLocationConversationParticipant' => self::getProjectLocationConversationParticipantNameTemplate(), + 'recognizer' => self::getRecognizerNameTemplate(), + 'settings' => self::getSettingsNameTemplate(), + 'view' => self::getViewNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a analysis + * resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * @param string $analysis + * + * @return string The formatted analysis resource. + */ + public static function analysisName($project, $location, $conversation, $analysis) + { + return self::getAnalysisNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + 'analysis' => $analysis, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a conversation + * resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * + * @return string The formatted conversation resource. + */ + public static function conversationName($project, $location, $conversation) + { + return self::getConversationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conversation_profile resource. + * + * @param string $project + * @param string $location + * @param string $conversationProfile + * + * @return string The formatted conversation_profile resource. + */ + public static function conversationProfileName($project, $location, $conversationProfile) + { + return self::getConversationProfileNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation_profile' => $conversationProfile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a issue + * resource. + * + * @param string $project + * @param string $location + * @param string $issueModel + * @param string $issue + * + * @return string The formatted issue resource. + */ + public static function issueName($project, $location, $issueModel, $issue) + { + return self::getIssueNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'issue_model' => $issueModel, + 'issue' => $issue, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a issue_model + * resource. + * + * @param string $project + * @param string $location + * @param string $issueModel + * + * @return string The formatted issue_model resource. + */ + public static function issueModelName($project, $location, $issueModel) + { + return self::getIssueModelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'issue_model' => $issueModel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a participant + * resource. + * + * @param string $project + * @param string $conversation + * @param string $participant + * + * @return string The formatted participant resource. + */ + public static function participantName($project, $conversation, $participant) + { + return self::getParticipantNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + 'participant' => $participant, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * phrase_matcher resource. + * + * @param string $project + * @param string $location + * @param string $phraseMatcher + * + * @return string The formatted phrase_matcher resource. + */ + public static function phraseMatcherName($project, $location, $phraseMatcher) + { + return self::getPhraseMatcherNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'phrase_matcher' => $phraseMatcher, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation_participant resource. + * + * @param string $project + * @param string $conversation + * @param string $participant + * + * @return string The formatted project_conversation_participant resource. + */ + public static function projectConversationParticipantName($project, $conversation, $participant) + { + return self::getProjectConversationParticipantNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + 'participant' => $participant, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation_participant resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * @param string $participant + * + * @return string The formatted project_location_conversation_participant resource. + */ + public static function projectLocationConversationParticipantName($project, $location, $conversation, $participant) + { + return self::getProjectLocationConversationParticipantNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + 'participant' => $participant, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a recognizer + * resource. + * + * @param string $project + * @param string $location + * @param string $recognizer + * + * @return string The formatted recognizer resource. + */ + public static function recognizerName($project, $location, $recognizer) + { + return self::getRecognizerNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'recognizer' => $recognizer, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a settings + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted settings resource. + */ + public static function settingsName($project, $location) + { + return self::getSettingsNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a view + * resource. + * + * @param string $project + * @param string $location + * @param string $view + * + * @return string The formatted view resource. + */ + public static function viewName($project, $location, $view) + { + return self::getViewNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'view' => $view, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - analysis: projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} + * - conversation: projects/{project}/locations/{location}/conversations/{conversation} + * - conversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} + * - issue: projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + * - issueModel: projects/{project}/locations/{location}/issueModels/{issue_model} + * - location: projects/{project}/locations/{location} + * - participant: projects/{project}/conversations/{conversation}/participants/{participant} + * - phraseMatcher: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + * - projectConversationParticipant: projects/{project}/conversations/{conversation}/participants/{participant} + * - projectLocationConversationParticipant: projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * - recognizer: projects/{project}/locations/{location}/recognizers/{recognizer} + * - settings: projects/{project}/locations/{location}/settings + * - view: projects/{project}/locations/{location}/views/{view} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'contactcenterinsights.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Analyzes multiple conversations in a single request. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $filter = 'filter'; + * $analysisPercentage = 0.0; + * $operationResponse = $contactCenterInsightsClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'bulkAnalyzeConversations'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource to create analyses in. + * @param string $filter Required. Filter used to select the subset of conversations to analyze. + * @param float $analysisPercentage Required. Percentage of selected conversation to analyze, between + * [0, 100]. + * @param array $optionalArgs { + * Optional. + * + * @type AnnotatorSelector $annotatorSelector + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * @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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function bulkAnalyzeConversations($parent, $filter, $analysisPercentage, array $optionalArgs = []) + { + $request = new BulkAnalyzeConversationsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setFilter($filter); + $request->setAnalysisPercentage($analysisPercentage); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['annotatorSelector'])) { + $request->setAnnotatorSelector($optionalArgs['annotatorSelector']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BulkAnalyzeConversations', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes multiple conversations in a single request. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $operationResponse = $contactCenterInsightsClient->bulkDeleteConversations($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->bulkDeleteConversations($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'bulkDeleteConversations'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource to delete conversations from. + * Format: + * projects/{project}/locations/{location} + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Filter used to select the subset of conversations to delete. + * @type int $maxDeleteCount + * Maximum number of conversations to delete. + * @type bool $force + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * @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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function bulkDeleteConversations($parent, array $optionalArgs = []) + { + $request = new BulkDeleteConversationsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['maxDeleteCount'])) { + $request->setMaxDeleteCount($optionalArgs['maxDeleteCount']); + } + + if (isset($optionalArgs['force'])) { + $request->setForce($optionalArgs['force']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BulkDeleteConversations', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets an issue model's statistics. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedIssueModel = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + * $response = $contactCenterInsightsClient->calculateIssueModelStats($formattedIssueModel); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $issueModel Required. The resource name of the issue model to query against. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\CalculateIssueModelStatsResponse + * + * @throws ApiException if the remote call fails + */ + public function calculateIssueModelStats($issueModel, array $optionalArgs = []) + { + $request = new CalculateIssueModelStatsRequest(); + $requestParamHeaders = []; + $request->setIssueModel($issueModel); + $requestParamHeaders['issue_model'] = $issueModel; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CalculateIssueModelStats', CalculateIssueModelStatsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets conversation statistics. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedLocation = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $contactCenterInsightsClient->calculateStats($formattedLocation); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $location Required. The location of the conversations. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter to reduce results to a specific subset. This field is useful for + * getting statistics about conversations with specific properties. + * @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 \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse + * + * @throws ApiException if the remote call fails + */ + public function calculateStats($location, array $optionalArgs = []) + { + $request = new CalculateStatsRequest(); + $requestParamHeaders = []; + $request->setLocation($location); + $requestParamHeaders['location'] = $location; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CalculateStats', CalculateStatsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates an analysis. The long running operation is done when the analysis + * has completed. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + * $analysis = new Analysis(); + * $operationResponse = $contactCenterInsightsClient->createAnalysis($formattedParent, $analysis); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->createAnalysis($formattedParent, $analysis); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'createAnalysis'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the analysis. + * @param Analysis $analysis Required. The analysis to create. + * @param array $optionalArgs { + * 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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAnalysis($parent, $analysis, array $optionalArgs = []) + { + $request = new CreateAnalysisRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAnalysis($analysis); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateAnalysis', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a conversation. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $conversation = new Conversation(); + * $response = $contactCenterInsightsClient->createConversation($formattedParent, $conversation); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the conversation. + * @param Conversation $conversation Required. The conversation resource to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $conversationId + * A unique ID for the new conversation. This ID will become the final + * component of the conversation's resource name. If no ID is specified, a + * server-generated ID will be used. + * + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * @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 \Google\Cloud\ContactCenterInsights\V1\Conversation + * + * @throws ApiException if the remote call fails + */ + public function createConversation($parent, $conversation, array $optionalArgs = []) + { + $request = new CreateConversationRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setConversation($conversation); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['conversationId'])) { + $request->setConversationId($optionalArgs['conversationId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateConversation', Conversation::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates an issue model. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $issueModel = new IssueModel(); + * $operationResponse = $contactCenterInsightsClient->createIssueModel($formattedParent, $issueModel); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->createIssueModel($formattedParent, $issueModel); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'createIssueModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the issue model. + * @param IssueModel $issueModel Required. The issue model to create. + * @param array $optionalArgs { + * 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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createIssueModel($parent, $issueModel, array $optionalArgs = []) + { + $request = new CreateIssueModelRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setIssueModel($issueModel); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateIssueModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a phrase matcher. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $phraseMatcher = new PhraseMatcher(); + * $response = $contactCenterInsightsClient->createPhraseMatcher($formattedParent, $phraseMatcher); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the phrase matcher. Required. The location + * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` + * @param PhraseMatcher $phraseMatcher Required. The phrase matcher resource to create. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher + * + * @throws ApiException if the remote call fails + */ + public function createPhraseMatcher($parent, $phraseMatcher, array $optionalArgs = []) + { + $request = new CreatePhraseMatcherRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPhraseMatcher($phraseMatcher); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreatePhraseMatcher', PhraseMatcher::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a view. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $view = new View(); + * $response = $contactCenterInsightsClient->createView($formattedParent, $view); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the view. Required. The location to create + * a view for. + * Format: `projects//locations/` or + * `projects//locations/` + * @param View $view Required. The view resource to create. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\View + * + * @throws ApiException if the remote call fails + */ + public function createView($parent, $view, array $optionalArgs = []) + { + $request = new CreateViewRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setView($view); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateView', View::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an analysis. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + * $contactCenterInsightsClient->deleteAnalysis($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the analysis to delete. + * @param array $optionalArgs { + * 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. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteAnalysis($name, array $optionalArgs = []) + { + $request = new DeleteAnalysisRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteAnalysis', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a conversation. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + * $contactCenterInsightsClient->deleteConversation($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the conversation to delete. + * @param array $optionalArgs { + * Optional. + * + * @type bool $force + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * @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. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteConversation($name, array $optionalArgs = []) + { + $request = new DeleteConversationRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['force'])) { + $request->setForce($optionalArgs['force']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteConversation', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an issue. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + * $contactCenterInsightsClient->deleteIssue($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the issue to delete. + * @param array $optionalArgs { + * 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. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteIssue($name, array $optionalArgs = []) + { + $request = new DeleteIssueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteIssue', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an issue model. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + * $operationResponse = $contactCenterInsightsClient->deleteIssueModel($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->deleteIssueModel($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'deleteIssueModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the issue model to delete. + * @param array $optionalArgs { + * 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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteIssueModel($name, array $optionalArgs = []) + { + $request = new DeleteIssueModelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteIssueModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a phrase matcher. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + * $contactCenterInsightsClient->deletePhraseMatcher($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the phrase matcher to delete. + * @param array $optionalArgs { + * 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. + * } + * + * @throws ApiException if the remote call fails + */ + public function deletePhraseMatcher($name, array $optionalArgs = []) + { + $request = new DeletePhraseMatcherRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeletePhraseMatcher', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a view. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + * $contactCenterInsightsClient->deleteView($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the view to delete. + * @param array $optionalArgs { + * 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. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteView($name, array $optionalArgs = []) + { + $request = new DeleteViewRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteView', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deploys an issue model. Returns an error if a model is already deployed. + * An issue model can only be used in analysis after it has been deployed. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + * $operationResponse = $contactCenterInsightsClient->deployIssueModel($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->deployIssueModel($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'deployIssueModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The issue model to deploy. + * @param array $optionalArgs { + * 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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deployIssueModel($name, array $optionalArgs = []) + { + $request = new DeployIssueModelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeployIssueModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Export insights data to a destination defined in the request body. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $operationResponse = $contactCenterInsightsClient->exportInsightsData($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->exportInsightsData($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'exportInsightsData'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource to export data from. + * @param array $optionalArgs { + * Optional. + * + * @type BigQueryDestination $bigQueryDestination + * Specified if sink is a BigQuery table. + * @type string $filter + * A filter to reduce results to a specific subset. Useful for exporting + * conversations with specific properties. + * @type string $kmsKey + * A fully qualified KMS key name for BigQuery tables protected by CMEK. + * Format: + * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} + * @type int $writeDisposition + * Options for what to do if the destination table already exists. + * For allowed values, use constants defined on {@see \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\WriteDisposition} + * @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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function exportInsightsData($parent, array $optionalArgs = []) + { + $request = new ExportInsightsDataRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['bigQueryDestination'])) { + $request->setBigQueryDestination($optionalArgs['bigQueryDestination']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['kmsKey'])) { + $request->setKmsKey($optionalArgs['kmsKey']); + } + + if (isset($optionalArgs['writeDisposition'])) { + $request->setWriteDisposition($optionalArgs['writeDisposition']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ExportInsightsData', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets an analysis. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + * $response = $contactCenterInsightsClient->getAnalysis($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the analysis to get. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\Analysis + * + * @throws ApiException if the remote call fails + */ + public function getAnalysis($name, array $optionalArgs = []) + { + $request = new GetAnalysisRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAnalysis', Analysis::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a conversation. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + * $response = $contactCenterInsightsClient->getConversation($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the conversation to get. + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * The level of details of the conversation. Default is `FULL`. + * For allowed values, use constants defined on {@see \Google\Cloud\ContactCenterInsights\V1\ConversationView} + * @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 \Google\Cloud\ContactCenterInsights\V1\Conversation + * + * @throws ApiException if the remote call fails + */ + public function getConversation($name, array $optionalArgs = []) + { + $request = new GetConversationRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetConversation', Conversation::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets an issue. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + * $response = $contactCenterInsightsClient->getIssue($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the issue to get. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\Issue + * + * @throws ApiException if the remote call fails + */ + public function getIssue($name, array $optionalArgs = []) + { + $request = new GetIssueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIssue', Issue::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets an issue model. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + * $response = $contactCenterInsightsClient->getIssueModel($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the issue model to get. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\IssueModel + * + * @throws ApiException if the remote call fails + */ + public function getIssueModel($name, array $optionalArgs = []) + { + $request = new GetIssueModelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIssueModel', IssueModel::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a phrase matcher. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + * $response = $contactCenterInsightsClient->getPhraseMatcher($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the phrase matcher to get. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher + * + * @throws ApiException if the remote call fails + */ + public function getPhraseMatcher($name, array $optionalArgs = []) + { + $request = new GetPhraseMatcherRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetPhraseMatcher', PhraseMatcher::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets project-level settings. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->settingsName('[PROJECT]', '[LOCATION]'); + * $response = $contactCenterInsightsClient->getSettings($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the settings resource to get. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\Settings + * + * @throws ApiException if the remote call fails + */ + public function getSettings($name, array $optionalArgs = []) + { + $request = new GetSettingsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetSettings', Settings::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a view. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + * $response = $contactCenterInsightsClient->getView($formattedName); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the view to get. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\View + * + * @throws ApiException if the remote call fails + */ + public function getView($name, array $optionalArgs = []) + { + $request = new GetViewRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetView', View::class, $optionalArgs, $request)->wait(); + } + + /** + * Imports conversations and processes them according to the user's + * configuration. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $operationResponse = $contactCenterInsightsClient->ingestConversations($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->ingestConversations($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'ingestConversations'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource for new conversations. + * @param array $optionalArgs { + * Optional. + * + * @type GcsSource $gcsSource + * A cloud storage bucket source. Note that any previously ingested objects + * from the source will be skipped to avoid duplication. + * @type TranscriptObjectConfig $transcriptObjectConfig + * Configuration for when `source` contains conversation transcripts. + * @type ConversationConfig $conversationConfig + * Configuration that applies to all conversations. + * @type RedactionConfig $redactionConfig + * Optional. DLP settings for transcript redaction. Optional, will default to + * the config specified in Settings. + * @type SpeechConfig $speechConfig + * Optional. Default Speech-to-Text configuration. Optional, will default to + * the config specified in Settings. + * @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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function ingestConversations($parent, array $optionalArgs = []) + { + $request = new IngestConversationsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['gcsSource'])) { + $request->setGcsSource($optionalArgs['gcsSource']); + } + + if (isset($optionalArgs['transcriptObjectConfig'])) { + $request->setTranscriptObjectConfig($optionalArgs['transcriptObjectConfig']); + } + + if (isset($optionalArgs['conversationConfig'])) { + $request->setConversationConfig($optionalArgs['conversationConfig']); + } + + if (isset($optionalArgs['redactionConfig'])) { + $request->setRedactionConfig($optionalArgs['redactionConfig']); + } + + if (isset($optionalArgs['speechConfig'])) { + $request->setSpeechConfig($optionalArgs['speechConfig']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('IngestConversations', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Lists analyses. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + * // Iterate over pages of elements + * $pagedResponse = $contactCenterInsightsClient->listAnalyses($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $contactCenterInsightsClient->listAnalyses($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the analyses. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAnalyses($parent, array $optionalArgs = []) + { + $request = new ListAnalysesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAnalyses', $optionalArgs, ListAnalysesResponse::class, $request); + } + + /** + * Lists conversations. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $contactCenterInsightsClient->listConversations($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $contactCenterInsightsClient->listConversations($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the conversation. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @type int $view + * The level of details of the conversation. Default is `BASIC`. + * For allowed values, use constants defined on {@see \Google\Cloud\ContactCenterInsights\V1\ConversationView} + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listConversations($parent, array $optionalArgs = []) + { + $request = new ListConversationsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListConversations', $optionalArgs, ListConversationsResponse::class, $request); + } + + /** + * Lists issue models. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $contactCenterInsightsClient->listIssueModels($formattedParent); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the issue model. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\ListIssueModelsResponse + * + * @throws ApiException if the remote call fails + */ + public function listIssueModels($parent, array $optionalArgs = []) + { + $request = new ListIssueModelsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListIssueModels', ListIssueModelsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists issues. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + * $response = $contactCenterInsightsClient->listIssues($formattedParent); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the issue. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\ListIssuesResponse + * + * @throws ApiException if the remote call fails + */ + public function listIssues($parent, array $optionalArgs = []) + { + $request = new ListIssuesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListIssues', ListIssuesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists phrase matchers. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $contactCenterInsightsClient->listPhraseMatchers($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $contactCenterInsightsClient->listPhraseMatchers($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the phrase matcher. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listPhraseMatchers($parent, array $optionalArgs = []) + { + $request = new ListPhraseMatchersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListPhraseMatchers', $optionalArgs, ListPhraseMatchersResponse::class, $request); + } + + /** + * Lists views. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $contactCenterInsightsClient->listViews($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $contactCenterInsightsClient->listViews($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the views. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listViews($parent, array $optionalArgs = []) + { + $request = new ListViewsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListViews', $optionalArgs, ListViewsResponse::class, $request); + } + + /** + * Undeploys an issue model. + * An issue model can not be used in analysis after it has been undeployed. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedName = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + * $operationResponse = $contactCenterInsightsClient->undeployIssueModel($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->undeployIssueModel($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'undeployIssueModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $name Required. The issue model to undeploy. + * @param array $optionalArgs { + * 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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function undeployIssueModel($name, array $optionalArgs = []) + { + $request = new UndeployIssueModelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UndeployIssueModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a conversation. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $conversation = new Conversation(); + * $response = $contactCenterInsightsClient->updateConversation($conversation); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param Conversation $conversation Required. The new values for the conversation. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. + * @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 \Google\Cloud\ContactCenterInsights\V1\Conversation + * + * @throws ApiException if the remote call fails + */ + public function updateConversation($conversation, array $optionalArgs = []) + { + $request = new UpdateConversationRequest(); + $requestParamHeaders = []; + $request->setConversation($conversation); + $requestParamHeaders['conversation.name'] = $conversation->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateConversation', Conversation::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an issue. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $issue = new Issue(); + * $response = $contactCenterInsightsClient->updateIssue($issue); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param Issue $issue Required. The new values for the issue. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. + * @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 \Google\Cloud\ContactCenterInsights\V1\Issue + * + * @throws ApiException if the remote call fails + */ + public function updateIssue($issue, array $optionalArgs = []) + { + $request = new UpdateIssueRequest(); + $requestParamHeaders = []; + $request->setIssue($issue); + $requestParamHeaders['issue.name'] = $issue->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateIssue', Issue::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an issue model. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $issueModel = new IssueModel(); + * $response = $contactCenterInsightsClient->updateIssueModel($issueModel); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param IssueModel $issueModel Required. The new values for the issue model. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. + * @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 \Google\Cloud\ContactCenterInsights\V1\IssueModel + * + * @throws ApiException if the remote call fails + */ + public function updateIssueModel($issueModel, array $optionalArgs = []) + { + $request = new UpdateIssueModelRequest(); + $requestParamHeaders = []; + $request->setIssueModel($issueModel); + $requestParamHeaders['issue_model.name'] = $issueModel->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateIssueModel', IssueModel::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a phrase matcher. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $phraseMatcher = new PhraseMatcher(); + * $response = $contactCenterInsightsClient->updatePhraseMatcher($phraseMatcher); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param PhraseMatcher $phraseMatcher Required. The new values for the phrase matcher. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. + * @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 \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher + * + * @throws ApiException if the remote call fails + */ + public function updatePhraseMatcher($phraseMatcher, array $optionalArgs = []) + { + $request = new UpdatePhraseMatcherRequest(); + $requestParamHeaders = []; + $request->setPhraseMatcher($phraseMatcher); + $requestParamHeaders['phrase_matcher.name'] = $phraseMatcher->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdatePhraseMatcher', PhraseMatcher::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates project-level settings. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $settings = new Settings(); + * $updateMask = new FieldMask(); + * $response = $contactCenterInsightsClient->updateSettings($settings, $updateMask); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param Settings $settings Required. The new settings values. + * @param FieldMask $updateMask Required. The list of fields to be updated. + * @param array $optionalArgs { + * 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 \Google\Cloud\ContactCenterInsights\V1\Settings + * + * @throws ApiException if the remote call fails + */ + public function updateSettings($settings, $updateMask, array $optionalArgs = []) + { + $request = new UpdateSettingsRequest(); + $requestParamHeaders = []; + $request->setSettings($settings); + $request->setUpdateMask($updateMask); + $requestParamHeaders['settings.name'] = $settings->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateSettings', Settings::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a view. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $view = new View(); + * $response = $contactCenterInsightsClient->updateView($view); + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param View $view Required. The new view. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. + * @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 \Google\Cloud\ContactCenterInsights\V1\View + * + * @throws ApiException if the remote call fails + */ + public function updateView($view, array $optionalArgs = []) + { + $request = new UpdateViewRequest(); + $requestParamHeaders = []; + $request->setView($view); + $requestParamHeaders['view.name'] = $view->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateView', View::class, $optionalArgs, $request)->wait(); + } + + /** + * Create a longrunning conversation upload operation. This method differs + * from CreateConversation by allowing audio transcription and optional DLP + * redaction. + * + * Sample code: + * ``` + * $contactCenterInsightsClient = new ContactCenterInsightsClient(); + * try { + * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); + * $conversation = new Conversation(); + * $operationResponse = $contactCenterInsightsClient->uploadConversation($formattedParent, $conversation); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $contactCenterInsightsClient->uploadConversation($formattedParent, $conversation); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'uploadConversation'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $contactCenterInsightsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the conversation. + * @param Conversation $conversation Required. The conversation resource to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $conversationId + * Optional. A unique ID for the new conversation. This ID will become the + * final component of the conversation's resource name. If no ID is specified, + * a server-generated ID will be used. + * + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + * @type RedactionConfig $redactionConfig + * Optional. DLP settings for transcript redaction. Will default to the config + * specified in Settings. + * @type SpeechConfig $speechConfig + * Optional. Speech-to-Text configuration. Will default to the config + * specified in Settings. + * @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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function uploadConversation($parent, $conversation, array $optionalArgs = []) + { + $request = new UploadConversationRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setConversation($conversation); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['conversationId'])) { + $request->setConversationId($optionalArgs['conversationId']); + } + + if (isset($optionalArgs['redactionConfig'])) { + $request->setRedactionConfig($optionalArgs['redactionConfig']); + } + + if (isset($optionalArgs['speechConfig'])) { + $request->setSpeechConfig($optionalArgs['speechConfig']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UploadConversation', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/gapic_metadata.json b/owl-bot-staging/ContactCenterInsights/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..66263ef3f61f --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/src/V1/gapic_metadata.json @@ -0,0 +1,213 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.contactcenterinsights.v1", + "libraryPackage": "Google\\Cloud\\ContactCenterInsights\\V1", + "services": { + "ContactCenterInsights": { + "clients": { + "grpc": { + "libraryClient": "ContactCenterInsightsGapicClient", + "rpcs": { + "BulkAnalyzeConversations": { + "methods": [ + "bulkAnalyzeConversations" + ] + }, + "BulkDeleteConversations": { + "methods": [ + "bulkDeleteConversations" + ] + }, + "CalculateIssueModelStats": { + "methods": [ + "calculateIssueModelStats" + ] + }, + "CalculateStats": { + "methods": [ + "calculateStats" + ] + }, + "CreateAnalysis": { + "methods": [ + "createAnalysis" + ] + }, + "CreateConversation": { + "methods": [ + "createConversation" + ] + }, + "CreateIssueModel": { + "methods": [ + "createIssueModel" + ] + }, + "CreatePhraseMatcher": { + "methods": [ + "createPhraseMatcher" + ] + }, + "CreateView": { + "methods": [ + "createView" + ] + }, + "DeleteAnalysis": { + "methods": [ + "deleteAnalysis" + ] + }, + "DeleteConversation": { + "methods": [ + "deleteConversation" + ] + }, + "DeleteIssue": { + "methods": [ + "deleteIssue" + ] + }, + "DeleteIssueModel": { + "methods": [ + "deleteIssueModel" + ] + }, + "DeletePhraseMatcher": { + "methods": [ + "deletePhraseMatcher" + ] + }, + "DeleteView": { + "methods": [ + "deleteView" + ] + }, + "DeployIssueModel": { + "methods": [ + "deployIssueModel" + ] + }, + "ExportInsightsData": { + "methods": [ + "exportInsightsData" + ] + }, + "GetAnalysis": { + "methods": [ + "getAnalysis" + ] + }, + "GetConversation": { + "methods": [ + "getConversation" + ] + }, + "GetIssue": { + "methods": [ + "getIssue" + ] + }, + "GetIssueModel": { + "methods": [ + "getIssueModel" + ] + }, + "GetPhraseMatcher": { + "methods": [ + "getPhraseMatcher" + ] + }, + "GetSettings": { + "methods": [ + "getSettings" + ] + }, + "GetView": { + "methods": [ + "getView" + ] + }, + "IngestConversations": { + "methods": [ + "ingestConversations" + ] + }, + "ListAnalyses": { + "methods": [ + "listAnalyses" + ] + }, + "ListConversations": { + "methods": [ + "listConversations" + ] + }, + "ListIssueModels": { + "methods": [ + "listIssueModels" + ] + }, + "ListIssues": { + "methods": [ + "listIssues" + ] + }, + "ListPhraseMatchers": { + "methods": [ + "listPhraseMatchers" + ] + }, + "ListViews": { + "methods": [ + "listViews" + ] + }, + "UndeployIssueModel": { + "methods": [ + "undeployIssueModel" + ] + }, + "UpdateConversation": { + "methods": [ + "updateConversation" + ] + }, + "UpdateIssue": { + "methods": [ + "updateIssue" + ] + }, + "UpdateIssueModel": { + "methods": [ + "updateIssueModel" + ] + }, + "UpdatePhraseMatcher": { + "methods": [ + "updatePhraseMatcher" + ] + }, + "UpdateSettings": { + "methods": [ + "updateSettings" + ] + }, + "UpdateView": { + "methods": [ + "updateView" + ] + }, + "UploadConversation": { + "methods": [ + "uploadConversation" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_client_config.json b/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_client_config.json new file mode 100644 index 000000000000..38c4895e8611 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_client_config.json @@ -0,0 +1,229 @@ +{ + "interfaces": { + "google.cloud.contactcenterinsights.v1.ContactCenterInsights": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BulkAnalyzeConversations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BulkDeleteConversations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CalculateIssueModelStats": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CalculateStats": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateAnalysis": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateConversation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreatePhraseMatcher": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateView": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteAnalysis": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteConversation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteIssue": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeletePhraseMatcher": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteView": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeployIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ExportInsightsData": { + "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", + "retry_params_name": "retry_policy_1_params" + }, + "GetConversation": { + "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", + "retry_params_name": "retry_policy_1_params" + }, + "GetIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPhraseMatcher": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSettings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetView": { + "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" + }, + "ListAnalyses": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConversations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIssueModels": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIssues": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPhraseMatchers": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListViews": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UndeployIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateConversation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateIssue": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdatePhraseMatcher": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSettings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateView": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UploadConversation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_descriptor_config.php b/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_descriptor_config.php new file mode 100644 index 000000000000..3e813b4ea4ef --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_descriptor_config.php @@ -0,0 +1,599 @@ + [ + 'google.cloud.contactcenterinsights.v1.ContactCenterInsights' => [ + 'BulkAnalyzeConversations' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsResponse', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BulkDeleteConversations' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsResponse', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAnalysis' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\Analysis', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\CreateAnalysisOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIssueModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\IssueModel', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\CreateIssueModelMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteIssueModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeployIssueModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\DeployIssueModelResponse', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\DeployIssueModelMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExportInsightsData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataResponse', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataMetadata', + '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', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UndeployIssueModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelResponse', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UploadConversation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\Conversation', + 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\UploadConversationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CalculateIssueModelStats' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\CalculateIssueModelStatsResponse', + 'headerParams' => [ + [ + 'keyName' => 'issue_model', + 'fieldAccessors' => [ + 'getIssueModel', + ], + ], + ], + ], + 'CalculateStats' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getLocation', + ], + ], + ], + ], + 'CreateConversation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Conversation', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePhraseMatcher' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\PhraseMatcher', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\View', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAnalysis' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteConversation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIssue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePhraseMatcher' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAnalysis' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Analysis', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetConversation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Conversation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIssue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Issue', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIssueModel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\IssueModel', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPhraseMatcher' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\PhraseMatcher', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Settings', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\View', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAnalyses' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAnalyses', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListAnalysesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListConversations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConversations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListConversationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIssueModels' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListIssueModelsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIssues' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListIssuesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPhraseMatchers' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPhraseMatchers', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListPhraseMatchersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListViews' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getViews', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListViewsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateConversation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Conversation', + 'headerParams' => [ + [ + 'keyName' => 'conversation.name', + 'fieldAccessors' => [ + 'getConversation', + 'getName', + ], + ], + ], + ], + 'UpdateIssue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Issue', + 'headerParams' => [ + [ + 'keyName' => 'issue.name', + 'fieldAccessors' => [ + 'getIssue', + 'getName', + ], + ], + ], + ], + 'UpdateIssueModel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\IssueModel', + 'headerParams' => [ + [ + 'keyName' => 'issue_model.name', + 'fieldAccessors' => [ + 'getIssueModel', + 'getName', + ], + ], + ], + ], + 'UpdatePhraseMatcher' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\PhraseMatcher', + 'headerParams' => [ + [ + 'keyName' => 'phrase_matcher.name', + 'fieldAccessors' => [ + 'getPhraseMatcher', + 'getName', + ], + ], + ], + ], + 'UpdateSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Settings', + 'headerParams' => [ + [ + 'keyName' => 'settings.name', + 'fieldAccessors' => [ + 'getSettings', + 'getName', + ], + ], + ], + ], + 'UpdateView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\View', + 'headerParams' => [ + [ + 'keyName' => 'view.name', + 'fieldAccessors' => [ + 'getView', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'analysis' => 'projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}', + 'conversation' => 'projects/{project}/locations/{location}/conversations/{conversation}', + 'conversationProfile' => 'projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}', + 'issue' => 'projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}', + 'issueModel' => 'projects/{project}/locations/{location}/issueModels/{issue_model}', + 'location' => 'projects/{project}/locations/{location}', + 'participant' => 'projects/{project}/conversations/{conversation}/participants/{participant}', + 'phraseMatcher' => 'projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}', + 'projectConversationParticipant' => 'projects/{project}/conversations/{conversation}/participants/{participant}', + 'projectLocationConversationParticipant' => 'projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}', + 'recognizer' => 'projects/{project}/locations/{location}/recognizers/{recognizer}', + 'settings' => 'projects/{project}/locations/{location}/settings', + 'view' => 'projects/{project}/locations/{location}/views/{view}', + ], + ], + ], +]; diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_rest_client_config.php b/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_rest_client_config.php new file mode 100644 index 000000000000..571d7849c475 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_rest_client_config.php @@ -0,0 +1,500 @@ + [ + 'google.cloud.contactcenterinsights.v1.ContactCenterInsights' => [ + 'BulkAnalyzeConversations' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations:bulkAnalyze', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BulkDeleteConversations' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations:bulkDelete', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CalculateIssueModelStats' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{issue_model=projects/*/locations/*/issueModels/*}:calculateIssueModelStats', + 'placeholders' => [ + 'issue_model' => [ + 'getters' => [ + 'getIssueModel', + ], + ], + ], + ], + 'CalculateStats' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{location=projects/*/locations/*}/conversations:calculateStats', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'CreateAnalysis' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/conversations/*}/analyses', + 'body' => 'analysis', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateConversation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations', + 'body' => 'conversation', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIssueModel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/issueModels', + 'body' => 'issue_model', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePhraseMatcher' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/phraseMatchers', + 'body' => 'phrase_matcher', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateView' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/views', + 'body' => 'view', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAnalysis' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/conversations/*/analyses/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteConversation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/conversations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIssue' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*/issues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIssueModel' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeletePhraseMatcher' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/phraseMatchers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteView' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/views/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeployIssueModel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*}:deploy', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportInsightsData' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/insightsdata:export', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetAnalysis' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/conversations/*/analyses/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConversation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/conversations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIssue' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*/issues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIssueModel' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPhraseMatcher' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/phraseMatchers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/settings}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetView' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/views/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'IngestConversations' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations:ingest', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAnalyses' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/conversations/*}/analyses', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListConversations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIssueModels' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/issueModels', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIssues' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/issueModels/*}/issues', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPhraseMatchers' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/phraseMatchers', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListViews' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/views', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UndeployIssueModel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*}:undeploy', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateConversation' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{conversation.name=projects/*/locations/*/conversations/*}', + 'body' => 'conversation', + 'placeholders' => [ + 'conversation.name' => [ + 'getters' => [ + 'getConversation', + 'getName', + ], + ], + ], + ], + 'UpdateIssue' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{issue.name=projects/*/locations/*/issueModels/*/issues/*}', + 'body' => 'issue', + 'placeholders' => [ + 'issue.name' => [ + 'getters' => [ + 'getIssue', + 'getName', + ], + ], + ], + ], + 'UpdateIssueModel' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{issue_model.name=projects/*/locations/*/issueModels/*}', + 'body' => 'issue_model', + 'placeholders' => [ + 'issue_model.name' => [ + 'getters' => [ + 'getIssueModel', + 'getName', + ], + ], + ], + ], + 'UpdatePhraseMatcher' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{phrase_matcher.name=projects/*/locations/*/phraseMatchers/*}', + 'body' => 'phrase_matcher', + 'placeholders' => [ + 'phrase_matcher.name' => [ + 'getters' => [ + 'getPhraseMatcher', + 'getName', + ], + ], + ], + ], + 'UpdateSettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{settings.name=projects/*/locations/*/settings}', + 'body' => 'settings', + 'placeholders' => [ + 'settings.name' => [ + 'getters' => [ + 'getSettings', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateView' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{view.name=projects/*/locations/*/views/*}', + 'body' => 'view', + 'placeholders' => [ + 'view.name' => [ + 'getters' => [ + 'getView', + 'getName', + ], + ], + ], + ], + 'UploadConversation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations:upload', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php b/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php new file mode 100644 index 000000000000..3a5b4226ecb8 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php @@ -0,0 +1,3448 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ContactCenterInsightsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ContactCenterInsightsClient($options); + } + + /** @test */ + public function bulkAnalyzeConversationsTest() + { + $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/bulkAnalyzeConversationsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $successfulAnalysisCount = 1153322545; + $failedAnalysisCount = 1044285998; + $expectedResponse = new BulkAnalyzeConversationsResponse(); + $expectedResponse->setSuccessfulAnalysisCount($successfulAnalysisCount); + $expectedResponse->setFailedAnalysisCount($failedAnalysisCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkAnalyzeConversationsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $filter = 'filter-1274492040'; + $analysisPercentage = 9980822; + $request = (new BulkAnalyzeConversationsRequest()) + ->setParent($formattedParent) + ->setFilter($filter) + ->setAnalysisPercentage($analysisPercentage); + $response = $gapicClient->bulkAnalyzeConversations($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/BulkAnalyzeConversations', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $actualValue = $actualApiRequestObject->getAnalysisPercentage(); + $this->assertProtobufEquals($analysisPercentage, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); + $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 bulkAnalyzeConversationsExceptionTest() + { + $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/bulkAnalyzeConversationsTest'); + $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]'); + $filter = 'filter-1274492040'; + $analysisPercentage = 9980822; + $request = (new BulkAnalyzeConversationsRequest()) + ->setParent($formattedParent) + ->setFilter($filter) + ->setAnalysisPercentage($analysisPercentage); + $response = $gapicClient->bulkAnalyzeConversations($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); + 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 bulkDeleteConversationsTest() + { + $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/bulkDeleteConversationsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BulkDeleteConversationsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkDeleteConversationsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new BulkDeleteConversationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->bulkDeleteConversations($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/BulkDeleteConversations', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteConversationsTest'); + $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 bulkDeleteConversationsExceptionTest() + { + $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/bulkDeleteConversationsTest'); + $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 BulkDeleteConversationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->bulkDeleteConversations($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteConversationsTest'); + 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 calculateIssueModelStatsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CalculateIssueModelStatsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedIssueModel = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $request = (new CalculateIssueModelStatsRequest()) + ->setIssueModel($formattedIssueModel); + $response = $gapicClient->calculateIssueModelStats($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/CalculateIssueModelStats', $actualFuncCall); + $actualValue = $actualRequestObject->getIssueModel(); + $this->assertProtobufEquals($formattedIssueModel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function calculateIssueModelStatsExceptionTest() + { + $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 + $formattedIssueModel = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $request = (new CalculateIssueModelStatsRequest()) + ->setIssueModel($formattedIssueModel); + try { + $gapicClient->calculateIssueModelStats($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 calculateStatsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $averageTurnCount = 1693477329; + $conversationCount = 1994187347; + $expectedResponse = new CalculateStatsResponse(); + $expectedResponse->setAverageTurnCount($averageTurnCount); + $expectedResponse->setConversationCount($conversationCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new CalculateStatsRequest()) + ->setLocation($formattedLocation); + $response = $gapicClient->calculateStats($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/CalculateStats', $actualFuncCall); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function calculateStatsExceptionTest() + { + $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 + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new CalculateStatsRequest()) + ->setLocation($formattedLocation); + try { + $gapicClient->calculateStats($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 createAnalysisTest() + { + $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/createAnalysisTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Analysis(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAnalysisTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $analysis = new Analysis(); + $request = (new CreateAnalysisRequest()) + ->setParent($formattedParent) + ->setAnalysis($analysis); + $response = $gapicClient->createAnalysis($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/CreateAnalysis', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAnalysis(); + $this->assertProtobufEquals($analysis, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); + $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 createAnalysisExceptionTest() + { + $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/createAnalysisTest'); + $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $analysis = new Analysis(); + $request = (new CreateAnalysisRequest()) + ->setParent($formattedParent) + ->setAnalysis($analysis); + $response = $gapicClient->createAnalysis($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); + 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 createConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $languageCode = 'languageCode-412800396'; + $agentId = 'agentId1469158549'; + $turnCount = 428155597; + $obfuscatedUserId = 'obfuscatedUserId-227848300'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setAgentId($agentId); + $expectedResponse->setTurnCount($turnCount); + $expectedResponse->setObfuscatedUserId($obfuscatedUserId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $conversation = new Conversation(); + $request = (new CreateConversationRequest()) + ->setParent($formattedParent) + ->setConversation($conversation); + $response = $gapicClient->createConversation($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/CreateConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConversation(); + $this->assertProtobufEquals($conversation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConversationExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $conversation = new Conversation(); + $request = (new CreateConversationRequest()) + ->setParent($formattedParent) + ->setConversation($conversation); + try { + $gapicClient->createConversation($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 createIssueModelTest() + { + $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/createIssueModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $issueCount = 1779144233; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new IssueModel(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIssueCount($issueCount); + $expectedResponse->setLanguageCode($languageCode); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIssueModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $issueModel = new IssueModel(); + $request = (new CreateIssueModelRequest()) + ->setParent($formattedParent) + ->setIssueModel($issueModel); + $response = $gapicClient->createIssueModel($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/CreateIssueModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIssueModel(); + $this->assertProtobufEquals($issueModel, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIssueModelTest'); + $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 createIssueModelExceptionTest() + { + $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/createIssueModelTest'); + $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]'); + $issueModel = new IssueModel(); + $request = (new CreateIssueModelRequest()) + ->setParent($formattedParent) + ->setIssueModel($issueModel); + $response = $gapicClient->createIssueModel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIssueModelTest'); + 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 createPhraseMatcherTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $versionTag = 'versionTag689430451'; + $displayName = 'displayName1615086568'; + $active = true; + $expectedResponse = new PhraseMatcher(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setVersionTag($versionTag); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setActive($active); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $phraseMatcher = new PhraseMatcher(); + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + $phraseMatcher->setType($phraseMatcherType); + $request = (new CreatePhraseMatcherRequest()) + ->setParent($formattedParent) + ->setPhraseMatcher($phraseMatcher); + $response = $gapicClient->createPhraseMatcher($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/CreatePhraseMatcher', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPhraseMatcher(); + $this->assertProtobufEquals($phraseMatcher, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPhraseMatcherExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $phraseMatcher = new PhraseMatcher(); + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + $phraseMatcher->setType($phraseMatcherType); + $request = (new CreatePhraseMatcherRequest()) + ->setParent($formattedParent) + ->setPhraseMatcher($phraseMatcher); + try { + $gapicClient->createPhraseMatcher($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 createViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $value = 'value111972721'; + $expectedResponse = new View(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setValue($value); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $view = new View(); + $request = (new CreateViewRequest()) + ->setParent($formattedParent) + ->setView($view); + $response = $gapicClient->createView($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/CreateView', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createViewExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $view = new View(); + $request = (new CreateViewRequest()) + ->setParent($formattedParent) + ->setView($view); + try { + $gapicClient->createView($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 deleteAnalysisTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + $request = (new DeleteAnalysisRequest()) + ->setName($formattedName); + $gapicClient->deleteAnalysis($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteAnalysis', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAnalysisExceptionTest() + { + $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->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + $request = (new DeleteAnalysisRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAnalysis($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 deleteConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $request = (new DeleteConversationRequest()) + ->setName($formattedName); + $gapicClient->deleteConversation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConversationExceptionTest() + { + $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $request = (new DeleteConversationRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteConversation($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 deleteIssueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + $request = (new DeleteIssueRequest()) + ->setName($formattedName); + $gapicClient->deleteIssue($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteIssue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteIssueExceptionTest() + { + $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->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + $request = (new DeleteIssueRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteIssue($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 deleteIssueModelTest() + { + $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/deleteIssueModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteIssueModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $request = (new DeleteIssueModelRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIssueModel($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/DeleteIssueModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIssueModelTest'); + $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 deleteIssueModelExceptionTest() + { + $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/deleteIssueModelTest'); + $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 DeleteIssueModelRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIssueModel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIssueModelTest'); + 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 deletePhraseMatcherTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + $request = (new DeletePhraseMatcherRequest()) + ->setName($formattedName); + $gapicClient->deletePhraseMatcher($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeletePhraseMatcher', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePhraseMatcherExceptionTest() + { + $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->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + $request = (new DeletePhraseMatcherRequest()) + ->setName($formattedName); + try { + $gapicClient->deletePhraseMatcher($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 deleteViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + $request = (new DeleteViewRequest()) + ->setName($formattedName); + $gapicClient->deleteView($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteViewExceptionTest() + { + $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->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + $request = (new DeleteViewRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteView($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 deployIssueModelTest() + { + $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/deployIssueModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new DeployIssueModelResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deployIssueModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $request = (new DeployIssueModelRequest()) + ->setName($formattedName); + $response = $gapicClient->deployIssueModel($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/DeployIssueModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployIssueModelTest'); + $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 deployIssueModelExceptionTest() + { + $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/deployIssueModelTest'); + $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 DeployIssueModelRequest()) + ->setName($formattedName); + $response = $gapicClient->deployIssueModel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployIssueModelTest'); + 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 exportInsightsDataTest() + { + $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/exportInsightsDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ExportInsightsDataResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportInsightsDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ExportInsightsDataRequest()) + ->setParent($formattedParent); + $response = $gapicClient->exportInsightsData($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/ExportInsightsData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportInsightsDataTest'); + $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 exportInsightsDataExceptionTest() + { + $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/exportInsightsDataTest'); + $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 ExportInsightsDataRequest()) + ->setParent($formattedParent); + $response = $gapicClient->exportInsightsData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportInsightsDataTest'); + 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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Analysis(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + $request = (new GetAnalysisRequest()) + ->setName($formattedName); + $response = $gapicClient->getAnalysis($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/GetAnalysis', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAnalysisExceptionTest() + { + $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->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + $request = (new GetAnalysisRequest()) + ->setName($formattedName); + try { + $gapicClient->getAnalysis($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 getConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $languageCode = 'languageCode-412800396'; + $agentId = 'agentId1469158549'; + $turnCount = 428155597; + $obfuscatedUserId = 'obfuscatedUserId-227848300'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name2); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setAgentId($agentId); + $expectedResponse->setTurnCount($turnCount); + $expectedResponse->setObfuscatedUserId($obfuscatedUserId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $request = (new GetConversationRequest()) + ->setName($formattedName); + $response = $gapicClient->getConversation($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/GetConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversationExceptionTest() + { + $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $request = (new GetConversationRequest()) + ->setName($formattedName); + try { + $gapicClient->getConversation($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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Issue(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + $request = (new GetIssueRequest()) + ->setName($formattedName); + $response = $gapicClient->getIssue($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/GetIssue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIssueExceptionTest() + { + $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->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + $request = (new GetIssueRequest()) + ->setName($formattedName); + try { + $gapicClient->getIssue($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 getIssueModelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $issueCount = 1779144233; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new IssueModel(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIssueCount($issueCount); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $request = (new GetIssueModelRequest()) + ->setName($formattedName); + $response = $gapicClient->getIssueModel($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/GetIssueModel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIssueModelExceptionTest() + { + $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->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $request = (new GetIssueModelRequest()) + ->setName($formattedName); + try { + $gapicClient->getIssueModel($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 getPhraseMatcherTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $versionTag = 'versionTag689430451'; + $displayName = 'displayName1615086568'; + $active = true; + $expectedResponse = new PhraseMatcher(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setVersionTag($versionTag); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setActive($active); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + $request = (new GetPhraseMatcherRequest()) + ->setName($formattedName); + $response = $gapicClient->getPhraseMatcher($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/GetPhraseMatcher', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPhraseMatcherExceptionTest() + { + $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->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + $request = (new GetPhraseMatcherRequest()) + ->setName($formattedName); + try { + $gapicClient->getPhraseMatcher($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 getSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Settings(); + $expectedResponse->setName($name2); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->settingsName('[PROJECT]', '[LOCATION]'); + $request = (new GetSettingsRequest()) + ->setName($formattedName); + $response = $gapicClient->getSettings($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/GetSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSettingsExceptionTest() + { + $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->settingsName('[PROJECT]', '[LOCATION]'); + $request = (new GetSettingsRequest()) + ->setName($formattedName); + try { + $gapicClient->getSettings($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 getViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $value = 'value111972721'; + $expectedResponse = new View(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setValue($value); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + $request = (new GetViewRequest()) + ->setName($formattedName); + $response = $gapicClient->getView($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/GetView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getViewExceptionTest() + { + $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->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + $request = (new GetViewRequest()) + ->setName($formattedName); + try { + $gapicClient->getView($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 ingestConversationsTest() + { + $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/ingestConversationsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new IngestConversationsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/ingestConversationsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new IngestConversationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->ingestConversations($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/IngestConversations', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/ingestConversationsTest'); + $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 ingestConversationsExceptionTest() + { + $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/ingestConversationsTest'); + $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 IngestConversationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->ingestConversations($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/ingestConversationsTest'); + 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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $analysesElement = new Analysis(); + $analyses = [ + $analysesElement, + ]; + $expectedResponse = new ListAnalysesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAnalyses($analyses); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $request = (new ListAnalysesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAnalyses($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAnalyses()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListAnalyses', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAnalysesExceptionTest() + { + $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 + $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $request = (new ListAnalysesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAnalyses($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 listConversationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $conversationsElement = new Conversation(); + $conversations = [ + $conversationsElement, + ]; + $expectedResponse = new ListConversationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConversations($conversations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListConversationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listConversations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConversations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListConversations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversationsExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListConversationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listConversations($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 listIssueModelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListIssueModelsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListIssueModelsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIssueModels($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/ListIssueModels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIssueModelsExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListIssueModelsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIssueModels($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 listIssuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListIssuesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $request = (new ListIssuesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIssues($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/ListIssues', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIssuesExceptionTest() + { + $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 + $formattedParent = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $request = (new ListIssuesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIssues($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 listPhraseMatchersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $phraseMatchersElement = new PhraseMatcher(); + $phraseMatchers = [ + $phraseMatchersElement, + ]; + $expectedResponse = new ListPhraseMatchersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPhraseMatchers($phraseMatchers); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPhraseMatchersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPhraseMatchers($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPhraseMatchers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListPhraseMatchers', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPhraseMatchersExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPhraseMatchersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPhraseMatchers($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 listViewsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $viewsElement = new View(); + $views = [ + $viewsElement, + ]; + $expectedResponse = new ListViewsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setViews($views); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListViewsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listViews($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getViews()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListViews', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listViewsExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListViewsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listViews($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 undeployIssueModelTest() + { + $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/undeployIssueModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UndeployIssueModelResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeployIssueModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $request = (new UndeployIssueModelRequest()) + ->setName($formattedName); + $response = $gapicClient->undeployIssueModel($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/UndeployIssueModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployIssueModelTest'); + $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 undeployIssueModelExceptionTest() + { + $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/undeployIssueModelTest'); + $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 UndeployIssueModelRequest()) + ->setName($formattedName); + $response = $gapicClient->undeployIssueModel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployIssueModelTest'); + 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 updateConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $languageCode = 'languageCode-412800396'; + $agentId = 'agentId1469158549'; + $turnCount = 428155597; + $obfuscatedUserId = 'obfuscatedUserId-227848300'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setAgentId($agentId); + $expectedResponse->setTurnCount($turnCount); + $expectedResponse->setObfuscatedUserId($obfuscatedUserId); + $transport->addResponse($expectedResponse); + // Mock request + $conversation = new Conversation(); + $request = (new UpdateConversationRequest()) + ->setConversation($conversation); + $response = $gapicClient->updateConversation($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/UpdateConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getConversation(); + $this->assertProtobufEquals($conversation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateConversationExceptionTest() + { + $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 + $conversation = new Conversation(); + $request = (new UpdateConversationRequest()) + ->setConversation($conversation); + try { + $gapicClient->updateConversation($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 updateIssueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Issue(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $issue = new Issue(); + $request = (new UpdateIssueRequest()) + ->setIssue($issue); + $response = $gapicClient->updateIssue($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/UpdateIssue', $actualFuncCall); + $actualValue = $actualRequestObject->getIssue(); + $this->assertProtobufEquals($issue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateIssueExceptionTest() + { + $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 + $issue = new Issue(); + $request = (new UpdateIssueRequest()) + ->setIssue($issue); + try { + $gapicClient->updateIssue($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 updateIssueModelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $issueCount = 1779144233; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new IssueModel(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIssueCount($issueCount); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $issueModel = new IssueModel(); + $request = (new UpdateIssueModelRequest()) + ->setIssueModel($issueModel); + $response = $gapicClient->updateIssueModel($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/UpdateIssueModel', $actualFuncCall); + $actualValue = $actualRequestObject->getIssueModel(); + $this->assertProtobufEquals($issueModel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateIssueModelExceptionTest() + { + $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 + $issueModel = new IssueModel(); + $request = (new UpdateIssueModelRequest()) + ->setIssueModel($issueModel); + try { + $gapicClient->updateIssueModel($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 updatePhraseMatcherTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $versionTag = 'versionTag689430451'; + $displayName = 'displayName1615086568'; + $active = true; + $expectedResponse = new PhraseMatcher(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setVersionTag($versionTag); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setActive($active); + $transport->addResponse($expectedResponse); + // Mock request + $phraseMatcher = new PhraseMatcher(); + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + $phraseMatcher->setType($phraseMatcherType); + $request = (new UpdatePhraseMatcherRequest()) + ->setPhraseMatcher($phraseMatcher); + $response = $gapicClient->updatePhraseMatcher($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/UpdatePhraseMatcher', $actualFuncCall); + $actualValue = $actualRequestObject->getPhraseMatcher(); + $this->assertProtobufEquals($phraseMatcher, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePhraseMatcherExceptionTest() + { + $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 + $phraseMatcher = new PhraseMatcher(); + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + $phraseMatcher->setType($phraseMatcherType); + $request = (new UpdatePhraseMatcherRequest()) + ->setPhraseMatcher($phraseMatcher); + try { + $gapicClient->updatePhraseMatcher($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 updateSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Settings(); + $expectedResponse->setName($name); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $settings = new Settings(); + $updateMask = new FieldMask(); + $request = (new UpdateSettingsRequest()) + ->setSettings($settings) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateSettings($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/UpdateSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getSettings(); + $this->assertProtobufEquals($settings, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSettingsExceptionTest() + { + $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 + $settings = new Settings(); + $updateMask = new FieldMask(); + $request = (new UpdateSettingsRequest()) + ->setSettings($settings) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateSettings($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 updateViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $value = 'value111972721'; + $expectedResponse = new View(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setValue($value); + $transport->addResponse($expectedResponse); + // Mock request + $view = new View(); + $request = (new UpdateViewRequest()) + ->setView($view); + $response = $gapicClient->updateView($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/UpdateView', $actualFuncCall); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateViewExceptionTest() + { + $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 + $view = new View(); + $request = (new UpdateViewRequest()) + ->setView($view); + try { + $gapicClient->updateView($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 uploadConversationTest() + { + $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/uploadConversationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $languageCode = 'languageCode-412800396'; + $agentId = 'agentId1469158549'; + $turnCount = 428155597; + $obfuscatedUserId = 'obfuscatedUserId-227848300'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setAgentId($agentId); + $expectedResponse->setTurnCount($turnCount); + $expectedResponse->setObfuscatedUserId($obfuscatedUserId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/uploadConversationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $conversation = new Conversation(); + $request = (new UploadConversationRequest()) + ->setParent($formattedParent) + ->setConversation($conversation); + $response = $gapicClient->uploadConversation($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/UploadConversation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConversation(); + $this->assertProtobufEquals($conversation, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/uploadConversationTest'); + $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 uploadConversationExceptionTest() + { + $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/uploadConversationTest'); + $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]'); + $conversation = new Conversation(); + $request = (new UploadConversationRequest()) + ->setParent($formattedParent) + ->setConversation($conversation); + $response = $gapicClient->uploadConversation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/uploadConversationTest'); + 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 bulkAnalyzeConversationsAsyncTest() + { + $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/bulkAnalyzeConversationsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $successfulAnalysisCount = 1153322545; + $failedAnalysisCount = 1044285998; + $expectedResponse = new BulkAnalyzeConversationsResponse(); + $expectedResponse->setSuccessfulAnalysisCount($successfulAnalysisCount); + $expectedResponse->setFailedAnalysisCount($failedAnalysisCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkAnalyzeConversationsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $filter = 'filter-1274492040'; + $analysisPercentage = 9980822; + $request = (new BulkAnalyzeConversationsRequest()) + ->setParent($formattedParent) + ->setFilter($filter) + ->setAnalysisPercentage($analysisPercentage); + $response = $gapicClient->bulkAnalyzeConversationsAsync($request)->wait(); + $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/BulkAnalyzeConversations', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $actualValue = $actualApiRequestObject->getAnalysisPercentage(); + $this->assertProtobufEquals($analysisPercentage, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); + $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()); + } +} diff --git a/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/ContactCenterInsightsClientTest.php b/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/ContactCenterInsightsClientTest.php new file mode 100644 index 000000000000..2689a76c9ba5 --- /dev/null +++ b/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/ContactCenterInsightsClientTest.php @@ -0,0 +1,3159 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ContactCenterInsightsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ContactCenterInsightsClient($options); + } + + /** @test */ + public function bulkAnalyzeConversationsTest() + { + $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/bulkAnalyzeConversationsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $successfulAnalysisCount = 1153322545; + $failedAnalysisCount = 1044285998; + $expectedResponse = new BulkAnalyzeConversationsResponse(); + $expectedResponse->setSuccessfulAnalysisCount($successfulAnalysisCount); + $expectedResponse->setFailedAnalysisCount($failedAnalysisCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkAnalyzeConversationsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $filter = 'filter-1274492040'; + $analysisPercentage = 9980822; + $response = $gapicClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); + $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/BulkAnalyzeConversations', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $actualValue = $actualApiRequestObject->getAnalysisPercentage(); + $this->assertProtobufEquals($analysisPercentage, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); + $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 bulkAnalyzeConversationsExceptionTest() + { + $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/bulkAnalyzeConversationsTest'); + $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]'); + $filter = 'filter-1274492040'; + $analysisPercentage = 9980822; + $response = $gapicClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); + 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 bulkDeleteConversationsTest() + { + $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/bulkDeleteConversationsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BulkDeleteConversationsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkDeleteConversationsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->bulkDeleteConversations($formattedParent); + $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/BulkDeleteConversations', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteConversationsTest'); + $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 bulkDeleteConversationsExceptionTest() + { + $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/bulkDeleteConversationsTest'); + $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]'); + $response = $gapicClient->bulkDeleteConversations($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteConversationsTest'); + 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 calculateIssueModelStatsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CalculateIssueModelStatsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedIssueModel = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $response = $gapicClient->calculateIssueModelStats($formattedIssueModel); + $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/CalculateIssueModelStats', $actualFuncCall); + $actualValue = $actualRequestObject->getIssueModel(); + $this->assertProtobufEquals($formattedIssueModel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function calculateIssueModelStatsExceptionTest() + { + $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 + $formattedIssueModel = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + try { + $gapicClient->calculateIssueModelStats($formattedIssueModel); + // 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 calculateStatsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $averageTurnCount = 1693477329; + $conversationCount = 1994187347; + $expectedResponse = new CalculateStatsResponse(); + $expectedResponse->setAverageTurnCount($averageTurnCount); + $expectedResponse->setConversationCount($conversationCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->calculateStats($formattedLocation); + $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/CalculateStats', $actualFuncCall); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function calculateStatsExceptionTest() + { + $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 + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->calculateStats($formattedLocation); + // 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 createAnalysisTest() + { + $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/createAnalysisTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Analysis(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAnalysisTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $analysis = new Analysis(); + $response = $gapicClient->createAnalysis($formattedParent, $analysis); + $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/CreateAnalysis', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAnalysis(); + $this->assertProtobufEquals($analysis, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); + $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 createAnalysisExceptionTest() + { + $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/createAnalysisTest'); + $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $analysis = new Analysis(); + $response = $gapicClient->createAnalysis($formattedParent, $analysis); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); + 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 createConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $languageCode = 'languageCode-412800396'; + $agentId = 'agentId1469158549'; + $turnCount = 428155597; + $obfuscatedUserId = 'obfuscatedUserId-227848300'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setAgentId($agentId); + $expectedResponse->setTurnCount($turnCount); + $expectedResponse->setObfuscatedUserId($obfuscatedUserId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $conversation = new Conversation(); + $response = $gapicClient->createConversation($formattedParent, $conversation); + $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/CreateConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConversation(); + $this->assertProtobufEquals($conversation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConversationExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $conversation = new Conversation(); + try { + $gapicClient->createConversation($formattedParent, $conversation); + // 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 createIssueModelTest() + { + $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/createIssueModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $issueCount = 1779144233; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new IssueModel(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIssueCount($issueCount); + $expectedResponse->setLanguageCode($languageCode); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIssueModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $issueModel = new IssueModel(); + $response = $gapicClient->createIssueModel($formattedParent, $issueModel); + $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/CreateIssueModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIssueModel(); + $this->assertProtobufEquals($issueModel, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIssueModelTest'); + $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 createIssueModelExceptionTest() + { + $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/createIssueModelTest'); + $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]'); + $issueModel = new IssueModel(); + $response = $gapicClient->createIssueModel($formattedParent, $issueModel); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIssueModelTest'); + 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 createPhraseMatcherTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $versionTag = 'versionTag689430451'; + $displayName = 'displayName1615086568'; + $active = true; + $expectedResponse = new PhraseMatcher(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setVersionTag($versionTag); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setActive($active); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $phraseMatcher = new PhraseMatcher(); + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + $phraseMatcher->setType($phraseMatcherType); + $response = $gapicClient->createPhraseMatcher($formattedParent, $phraseMatcher); + $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/CreatePhraseMatcher', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPhraseMatcher(); + $this->assertProtobufEquals($phraseMatcher, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPhraseMatcherExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $phraseMatcher = new PhraseMatcher(); + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + $phraseMatcher->setType($phraseMatcherType); + try { + $gapicClient->createPhraseMatcher($formattedParent, $phraseMatcher); + // 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 createViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $value = 'value111972721'; + $expectedResponse = new View(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setValue($value); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $view = new View(); + $response = $gapicClient->createView($formattedParent, $view); + $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/CreateView', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createViewExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $view = new View(); + try { + $gapicClient->createView($formattedParent, $view); + // 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 deleteAnalysisTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + $gapicClient->deleteAnalysis($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteAnalysis', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAnalysisExceptionTest() + { + $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->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + try { + $gapicClient->deleteAnalysis($formattedName); + // 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 deleteConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $gapicClient->deleteConversation($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConversationExceptionTest() + { + $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + try { + $gapicClient->deleteConversation($formattedName); + // 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 deleteIssueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + $gapicClient->deleteIssue($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteIssue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteIssueExceptionTest() + { + $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->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + try { + $gapicClient->deleteIssue($formattedName); + // 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 deleteIssueModelTest() + { + $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/deleteIssueModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteIssueModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $response = $gapicClient->deleteIssueModel($formattedName); + $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/DeleteIssueModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIssueModelTest'); + $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 deleteIssueModelExceptionTest() + { + $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/deleteIssueModelTest'); + $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]'); + $response = $gapicClient->deleteIssueModel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIssueModelTest'); + 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 deletePhraseMatcherTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + $gapicClient->deletePhraseMatcher($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeletePhraseMatcher', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePhraseMatcherExceptionTest() + { + $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->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + try { + $gapicClient->deletePhraseMatcher($formattedName); + // 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 deleteViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + $gapicClient->deleteView($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteViewExceptionTest() + { + $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->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + try { + $gapicClient->deleteView($formattedName); + // 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 deployIssueModelTest() + { + $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/deployIssueModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new DeployIssueModelResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deployIssueModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $response = $gapicClient->deployIssueModel($formattedName); + $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/DeployIssueModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployIssueModelTest'); + $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 deployIssueModelExceptionTest() + { + $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/deployIssueModelTest'); + $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]'); + $response = $gapicClient->deployIssueModel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployIssueModelTest'); + 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 exportInsightsDataTest() + { + $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/exportInsightsDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ExportInsightsDataResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportInsightsDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->exportInsightsData($formattedParent); + $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/ExportInsightsData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportInsightsDataTest'); + $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 exportInsightsDataExceptionTest() + { + $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/exportInsightsDataTest'); + $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]'); + $response = $gapicClient->exportInsightsData($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportInsightsDataTest'); + 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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Analysis(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + $response = $gapicClient->getAnalysis($formattedName); + $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/GetAnalysis', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAnalysisExceptionTest() + { + $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->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); + try { + $gapicClient->getAnalysis($formattedName); + // 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 getConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $languageCode = 'languageCode-412800396'; + $agentId = 'agentId1469158549'; + $turnCount = 428155597; + $obfuscatedUserId = 'obfuscatedUserId-227848300'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name2); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setAgentId($agentId); + $expectedResponse->setTurnCount($turnCount); + $expectedResponse->setObfuscatedUserId($obfuscatedUserId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $response = $gapicClient->getConversation($formattedName); + $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/GetConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversationExceptionTest() + { + $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + try { + $gapicClient->getConversation($formattedName); + // 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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Issue(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + $response = $gapicClient->getIssue($formattedName); + $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/GetIssue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIssueExceptionTest() + { + $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->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); + try { + $gapicClient->getIssue($formattedName); + // 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 getIssueModelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $issueCount = 1779144233; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new IssueModel(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIssueCount($issueCount); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $response = $gapicClient->getIssueModel($formattedName); + $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/GetIssueModel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIssueModelExceptionTest() + { + $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->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + try { + $gapicClient->getIssueModel($formattedName); + // 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 getPhraseMatcherTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $versionTag = 'versionTag689430451'; + $displayName = 'displayName1615086568'; + $active = true; + $expectedResponse = new PhraseMatcher(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setVersionTag($versionTag); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setActive($active); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + $response = $gapicClient->getPhraseMatcher($formattedName); + $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/GetPhraseMatcher', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPhraseMatcherExceptionTest() + { + $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->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); + try { + $gapicClient->getPhraseMatcher($formattedName); + // 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 getSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Settings(); + $expectedResponse->setName($name2); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->settingsName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->getSettings($formattedName); + $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/GetSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSettingsExceptionTest() + { + $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->settingsName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->getSettings($formattedName); + // 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 getViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $value = 'value111972721'; + $expectedResponse = new View(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setValue($value); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + $response = $gapicClient->getView($formattedName); + $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/GetView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getViewExceptionTest() + { + $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->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); + try { + $gapicClient->getView($formattedName); + // 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 ingestConversationsTest() + { + $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/ingestConversationsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new IngestConversationsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/ingestConversationsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->ingestConversations($formattedParent); + $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/IngestConversations', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/ingestConversationsTest'); + $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 ingestConversationsExceptionTest() + { + $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/ingestConversationsTest'); + $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]'); + $response = $gapicClient->ingestConversations($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/ingestConversationsTest'); + 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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $analysesElement = new Analysis(); + $analyses = [ + $analysesElement, + ]; + $expectedResponse = new ListAnalysesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAnalyses($analyses); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + $response = $gapicClient->listAnalyses($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAnalyses()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListAnalyses', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAnalysesExceptionTest() + { + $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 + $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); + try { + $gapicClient->listAnalyses($formattedParent); + // 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 listConversationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $conversationsElement = new Conversation(); + $conversations = [ + $conversationsElement, + ]; + $expectedResponse = new ListConversationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConversations($conversations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listConversations($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConversations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListConversations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversationsExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listConversations($formattedParent); + // 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 listIssueModelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListIssueModelsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listIssueModels($formattedParent); + $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/ListIssueModels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIssueModelsExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listIssueModels($formattedParent); + // 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 listIssuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListIssuesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $response = $gapicClient->listIssues($formattedParent); + $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/ListIssues', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIssuesExceptionTest() + { + $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 + $formattedParent = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + try { + $gapicClient->listIssues($formattedParent); + // 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 listPhraseMatchersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $phraseMatchersElement = new PhraseMatcher(); + $phraseMatchers = [ + $phraseMatchersElement, + ]; + $expectedResponse = new ListPhraseMatchersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPhraseMatchers($phraseMatchers); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listPhraseMatchers($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPhraseMatchers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListPhraseMatchers', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPhraseMatchersExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listPhraseMatchers($formattedParent); + // 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 listViewsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $viewsElement = new View(); + $views = [ + $viewsElement, + ]; + $expectedResponse = new ListViewsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setViews($views); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listViews($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getViews()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListViews', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listViewsExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listViews($formattedParent); + // 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 undeployIssueModelTest() + { + $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/undeployIssueModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UndeployIssueModelResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeployIssueModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); + $response = $gapicClient->undeployIssueModel($formattedName); + $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/UndeployIssueModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployIssueModelTest'); + $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 undeployIssueModelExceptionTest() + { + $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/undeployIssueModelTest'); + $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]'); + $response = $gapicClient->undeployIssueModel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployIssueModelTest'); + 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 updateConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $languageCode = 'languageCode-412800396'; + $agentId = 'agentId1469158549'; + $turnCount = 428155597; + $obfuscatedUserId = 'obfuscatedUserId-227848300'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setAgentId($agentId); + $expectedResponse->setTurnCount($turnCount); + $expectedResponse->setObfuscatedUserId($obfuscatedUserId); + $transport->addResponse($expectedResponse); + // Mock request + $conversation = new Conversation(); + $response = $gapicClient->updateConversation($conversation); + $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/UpdateConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getConversation(); + $this->assertProtobufEquals($conversation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateConversationExceptionTest() + { + $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 + $conversation = new Conversation(); + try { + $gapicClient->updateConversation($conversation); + // 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 updateIssueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Issue(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $issue = new Issue(); + $response = $gapicClient->updateIssue($issue); + $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/UpdateIssue', $actualFuncCall); + $actualValue = $actualRequestObject->getIssue(); + $this->assertProtobufEquals($issue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateIssueExceptionTest() + { + $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 + $issue = new Issue(); + try { + $gapicClient->updateIssue($issue); + // 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 updateIssueModelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $issueCount = 1779144233; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new IssueModel(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIssueCount($issueCount); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $issueModel = new IssueModel(); + $response = $gapicClient->updateIssueModel($issueModel); + $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/UpdateIssueModel', $actualFuncCall); + $actualValue = $actualRequestObject->getIssueModel(); + $this->assertProtobufEquals($issueModel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateIssueModelExceptionTest() + { + $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 + $issueModel = new IssueModel(); + try { + $gapicClient->updateIssueModel($issueModel); + // 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 updatePhraseMatcherTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $versionTag = 'versionTag689430451'; + $displayName = 'displayName1615086568'; + $active = true; + $expectedResponse = new PhraseMatcher(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setVersionTag($versionTag); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setActive($active); + $transport->addResponse($expectedResponse); + // Mock request + $phraseMatcher = new PhraseMatcher(); + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + $phraseMatcher->setType($phraseMatcherType); + $response = $gapicClient->updatePhraseMatcher($phraseMatcher); + $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/UpdatePhraseMatcher', $actualFuncCall); + $actualValue = $actualRequestObject->getPhraseMatcher(); + $this->assertProtobufEquals($phraseMatcher, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePhraseMatcherExceptionTest() + { + $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 + $phraseMatcher = new PhraseMatcher(); + $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; + $phraseMatcher->setType($phraseMatcherType); + try { + $gapicClient->updatePhraseMatcher($phraseMatcher); + // 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 updateSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Settings(); + $expectedResponse->setName($name); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $settings = new Settings(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateSettings($settings, $updateMask); + $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/UpdateSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getSettings(); + $this->assertProtobufEquals($settings, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSettingsExceptionTest() + { + $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 + $settings = new Settings(); + $updateMask = new FieldMask(); + try { + $gapicClient->updateSettings($settings, $updateMask); + // 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 updateViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $value = 'value111972721'; + $expectedResponse = new View(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setValue($value); + $transport->addResponse($expectedResponse); + // Mock request + $view = new View(); + $response = $gapicClient->updateView($view); + $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/UpdateView', $actualFuncCall); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateViewExceptionTest() + { + $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 + $view = new View(); + try { + $gapicClient->updateView($view); + // 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 uploadConversationTest() + { + $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/uploadConversationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $languageCode = 'languageCode-412800396'; + $agentId = 'agentId1469158549'; + $turnCount = 428155597; + $obfuscatedUserId = 'obfuscatedUserId-227848300'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setAgentId($agentId); + $expectedResponse->setTurnCount($turnCount); + $expectedResponse->setObfuscatedUserId($obfuscatedUserId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/uploadConversationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $conversation = new Conversation(); + $response = $gapicClient->uploadConversation($formattedParent, $conversation); + $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/UploadConversation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConversation(); + $this->assertProtobufEquals($conversation, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/uploadConversationTest'); + $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 uploadConversationExceptionTest() + { + $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/uploadConversationTest'); + $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]'); + $conversation = new Conversation(); + $response = $gapicClient->uploadConversation($formattedParent, $conversation); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/uploadConversationTest'); + 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()); + } +} From 572b9e8e2c64106d4b4c2c07b0d6ffe2dc39da72 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 25 Jan 2024 18:02:51 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata/V1/Resources.php | Bin 17307 -> 17721 bytes ContactCenterInsights/src/V1/Conversation.php | 44 + .../src}/V1/Conversation/QualityMetadata.php | 8 +- .../QualityMetadata/AgentInfo.php | 10 +- .../ConversationConfig.php | 48 +- .../V1/ContactCenterInsights.php | Bin 22895 -> 0 bytes .../Contactcenterinsights/V1/Resources.php | Bin 17721 -> 0 bytes .../ContactCenterInsights/V1/Analysis.php | 263 -- .../V1/AnalysisResult.php | 119 - .../AnalysisResult/CallAnalysisMetadata.php | 250 -- .../V1/AnnotationBoundary.php | 116 - .../V1/AnnotatorSelector.php | 453 --- .../AnnotatorSelector/SummarizationConfig.php | 117 - .../SummarizationModel.php | 57 - .../V1/AnswerFeedback.php | 140 - .../V1/AnswerFeedback/CorrectnessLevel.php | 71 - .../V1/ArticleSuggestionData.php | 265 -- .../V1/BulkAnalyzeConversationsMetadata.php | 309 -- .../V1/BulkAnalyzeConversationsRequest.php | 206 - .../V1/BulkAnalyzeConversationsResponse.php | 101 - .../V1/BulkDeleteConversationsMetadata.php | 203 - .../V1/BulkDeleteConversationsRequest.php | 203 - .../V1/BulkDeleteConversationsResponse.php | 33 - .../V1/CalculateIssueModelStatsRequest.php | 81 - .../V1/CalculateIssueModelStatsResponse.php | 81 - .../V1/CalculateStatsRequest.php | 119 - .../V1/CalculateStatsResponse.php | 366 -- .../V1/CalculateStatsResponse/TimeSeries.php | 122 - .../TimeSeries/Interval.php | 114 - .../V1/CallAnnotation.php | 432 --- .../ContactCenterInsights/V1/Conversation.php | 890 ----- .../V1/Conversation/CallMetadata.php | 104 - .../V1/Conversation/Medium.php | 64 - .../V1/Conversation/Transcript.php | 70 - .../Transcript/TranscriptSegment.php | 406 -- .../DialogflowSegmentMetadata.php | 74 - .../Transcript/TranscriptSegment/WordInfo.php | 204 - .../V1/ConversationDataSource.php | 108 - .../V1/ConversationLevelSentiment.php | 111 - .../V1/ConversationParticipant.php | 226 -- .../V1/ConversationParticipant/Role.php | 78 - ...onversationSummarizationSuggestionData.php | 265 -- .../V1/ConversationView.php | 63 - .../V1/CreateAnalysisOperationMetadata.php | 199 - .../V1/CreateAnalysisRequest.php | 127 - .../V1/CreateConversationRequest.php | 184 - .../V1/CreateIssueModelMetadata.php | 165 - .../V1/CreateIssueModelRequest.php | 127 - .../V1/CreatePhraseMatcherRequest.php | 142 - .../V1/CreateViewRequest.php | 142 - .../V1/DeleteAnalysisRequest.php | 81 - .../V1/DeleteConversationRequest.php | 123 - .../V1/DeleteIssueModelMetadata.php | 165 - .../V1/DeleteIssueModelRequest.php | 81 - .../V1/DeleteIssueRequest.php | 81 - .../V1/DeletePhraseMatcherRequest.php | 81 - .../V1/DeleteViewRequest.php | 81 - .../V1/DeployIssueModelMetadata.php | 165 - .../V1/DeployIssueModelRequest.php | 81 - .../V1/DeployIssueModelResponse.php | 33 - .../V1/DialogflowIntent.php | 68 - .../V1/DialogflowInteractionData.php | 109 - .../V1/DialogflowSource.php | 113 - .../Cloud/ContactCenterInsights/V1/Entity.php | 243 -- .../ContactCenterInsights/V1/Entity/Type.php | 163 - .../V1/EntityMentionData.php | 150 - .../V1/EntityMentionData/MentionType.php | 64 - .../V1/ExactMatchConfig.php | 67 - .../V1/ExportInsightsDataMetadata.php | 203 - .../V1/ExportInsightsDataRequest.php | 237 -- .../BigQueryDestination.php | 162 - .../WriteDisposition.php | 65 - .../V1/ExportInsightsDataResponse.php | 33 - .../V1/FaqAnswerData.php | 265 -- .../ContactCenterInsights/V1/GcsSource.php | 109 - .../V1/GetAnalysisRequest.php | 81 - .../V1/GetConversationRequest.php | 115 - .../V1/GetIssueModelRequest.php | 81 - .../V1/GetIssueRequest.php | 81 - .../V1/GetPhraseMatcherRequest.php | 81 - .../V1/GetSettingsRequest.php | 81 - .../V1/GetViewRequest.php | 81 - .../ContactCenterInsights/V1/HoldData.php | 33 - .../V1/IngestConversationsMetadata.php | 247 -- .../IngestConversationsStats.php | 184 - .../V1/IngestConversationsRequest.php | 308 -- .../ConversationConfig.php | 158 - .../IngestConversationsRequest/GcsSource.php | 104 - .../GcsSource/BucketObjectType.php | 62 - .../TranscriptObjectConfig.php | 70 - .../V1/IngestConversationsResponse.php | 33 - .../Cloud/ContactCenterInsights/V1/Intent.php | 102 - .../V1/IntentMatchData.php | 74 - .../V1/InterruptionData.php | 33 - .../Cloud/ContactCenterInsights/V1/Issue.php | 235 -- .../V1/IssueAssignment.php | 143 - .../V1/IssueMatchData.php | 77 - .../ContactCenterInsights/V1/IssueModel.php | 425 -- .../V1/IssueModel/InputDataConfig.php | 155 - .../V1/IssueModel/ModelType.php | 64 - .../V1/IssueModel/State.php | 86 - .../V1/IssueModelLabelStats.php | 139 - .../V1/IssueModelLabelStats/IssueStats.php | 146 - .../V1/IssueModelResult.php | 105 - .../V1/ListAnalysesRequest.php | 207 - .../V1/ListAnalysesResponse.php | 105 - .../V1/ListConversationsRequest.php | 241 -- .../V1/ListConversationsResponse.php | 109 - .../V1/ListIssueModelsRequest.php | 81 - .../V1/ListIssueModelsResponse.php | 67 - .../V1/ListIssuesRequest.php | 81 - .../V1/ListIssuesResponse.php | 67 - .../V1/ListPhraseMatchersRequest.php | 207 - .../V1/ListPhraseMatchersResponse.php | 105 - .../V1/ListViewsRequest.php | 169 - .../V1/ListViewsResponse.php | 105 - .../V1/PhraseMatchData.php | 102 - .../V1/PhraseMatchRule.php | 153 - .../V1/PhraseMatchRuleConfig.php | 75 - .../V1/PhraseMatchRuleGroup.php | 101 - .../PhraseMatchRuleGroupType.php | 65 - .../V1/PhraseMatcher.php | 477 --- .../V1/PhraseMatcher/PhraseMatcherType.php | 65 - .../V1/RedactionConfig.php | 117 - .../V1/RuntimeAnnotation.php | 458 --- .../V1/SentimentData.php | 105 - .../ContactCenterInsights/V1/Settings.php | 479 --- .../V1/Settings/AnalysisConfig.php | 160 - .../ContactCenterInsights/V1/SilenceData.php | 33 - .../V1/SmartComposeSuggestionData.php | 189 - .../V1/SmartReplyData.php | 189 - .../ContactCenterInsights/V1/SpeechConfig.php | 75 - .../V1/UndeployIssueModelMetadata.php | 165 - .../V1/UndeployIssueModelRequest.php | 81 - .../V1/UndeployIssueModelResponse.php | 33 - .../V1/UpdateConversationRequest.php | 136 - .../V1/UpdateIssueModelRequest.php | 136 - .../V1/UpdateIssueRequest.php | 136 - .../V1/UpdatePhraseMatcherRequest.php | 136 - .../V1/UpdateSettingsRequest.php | 136 - .../V1/UpdateViewRequest.php | 136 - .../V1/UploadConversationMetadata.php | 247 -- .../V1/UploadConversationRequest.php | 257 -- .../Cloud/ContactCenterInsights/V1/View.php | 231 -- .../bulk_analyze_conversations.php | 93 - .../bulk_delete_conversations.php | 85 - .../calculate_issue_model_stats.php | 75 - .../calculate_stats.php | 71 - .../create_analysis.php | 90 - .../create_conversation.php | 73 - .../create_issue_model.php | 85 - .../create_phrase_matcher.php | 80 - .../create_view.php | 76 - .../delete_analysis.php | 74 - .../delete_conversation.php | 73 - .../delete_issue.php | 74 - .../delete_issue_model.php | 84 - .../delete_phrase_matcher.php | 73 - .../delete_view.php | 69 - .../deploy_issue_model.php | 88 - .../export_insights_data.php | 83 - .../get_analysis.php | 76 - .../get_conversation.php | 75 - .../ContactCenterInsightsClient/get_issue.php | 76 - .../get_issue_model.php | 75 - .../get_phrase_matcher.php | 75 - .../get_settings.php | 71 - .../ContactCenterInsightsClient/get_view.php | 71 - .../ingest_conversations.php | 84 - .../list_analyses.php | 80 - .../list_conversations.php | 76 - .../list_issue_models.php | 71 - .../list_issues.php | 75 - .../list_phrase_matchers.php | 76 - .../list_views.php | 76 - .../undeploy_issue_model.php | 88 - .../update_conversation.php | 59 - .../update_issue.php | 59 - .../update_issue_model.php | 59 - .../update_phrase_matcher.php | 73 - .../update_settings.php | 62 - .../update_view.php | 59 - .../upload_conversation.php | 87 - .../V1/Client/ContactCenterInsightsClient.php | 1609 -------- .../v1/src/V1/ContactCenterInsightsClient.php | 34 - .../ContactCenterInsightsGapicClient.php | 2882 -------------- .../v1/src/V1/gapic_metadata.json | 213 - ...contact_center_insights_client_config.json | 229 -- ...tact_center_insights_descriptor_config.php | 599 --- ...act_center_insights_rest_client_config.php | 500 --- .../ContactCenterInsightsClientTest.php | 3448 ----------------- .../V1/ContactCenterInsightsClientTest.php | 3159 --------------- 192 files changed, 75 insertions(+), 36451 deletions(-) rename {owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights => ContactCenterInsights/src}/V1/Conversation/QualityMetadata.php (94%) rename {owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights => ContactCenterInsights/src}/V1/Conversation/QualityMetadata/AgentInfo.php (93%) delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/ContactCenterInsights.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/Resources.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Analysis.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult/CallAnalysisMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotationBoundary.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback/CorrectnessLevel.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ArticleSuggestionData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries/Interval.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CallAnnotation.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/CallMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Medium.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/DialogflowSegmentMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/WordInfo.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationDataSource.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationLevelSentiment.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant/Role.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationSummarizationSuggestionData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationView.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisOperationMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateConversationRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreatePhraseMatcherRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateViewRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteAnalysisRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteConversationRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeletePhraseMatcherRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteViewRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowIntent.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowInteractionData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowSource.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity/Type.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData/MentionType.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExactMatchConfig.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/BigQueryDestination.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/WriteDisposition.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/FaqAnswerData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GcsSource.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetAnalysisRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetConversationRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueModelRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetPhraseMatcherRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetSettingsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetViewRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/HoldData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata/IngestConversationsStats.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/ConversationConfig.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource/BucketObjectType.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/TranscriptObjectConfig.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Intent.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IntentMatchData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/InterruptionData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Issue.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueAssignment.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueMatchData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/InputDataConfig.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/ModelType.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/State.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats/IssueStats.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelResult.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRule.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleConfig.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup/PhraseMatchRuleGroupType.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher/PhraseMatcherType.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RedactionConfig.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RuntimeAnnotation.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SentimentData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings/AnalysisConfig.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SilenceData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartComposeSuggestionData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartReplyData.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SpeechConfig.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelResponse.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateConversationRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueModelRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdatePhraseMatcherRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateSettingsRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateViewRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationMetadata.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationRequest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/View.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_stats.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_analysis.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_conversation.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_issue_model.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_view.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_analysis.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_conversation.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue_model.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_view.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/deploy_issue_model.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/export_insights_data.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_analysis.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_conversation.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue_model.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_settings.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_view.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/ingest_conversations.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_analyses.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_conversations.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issue_models.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issues.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_views.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_conversation.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue_model.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_settings.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_view.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/upload_conversation.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/Client/ContactCenterInsightsClient.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/ContactCenterInsightsClient.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/Gapic/ContactCenterInsightsGapicClient.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_client_config.json delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_descriptor_config.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_rest_client_config.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php delete mode 100644 owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/ContactCenterInsightsClientTest.php diff --git a/ContactCenterInsights/metadata/V1/Resources.php b/ContactCenterInsights/metadata/V1/Resources.php index efdf056be1b197efdb2b724d8794f01f62086798..f6fc935d67b78b997359dd878f2e670ed34b5dd1 100644 GIT binary patch delta 301 zcmbQ;&bYISal?HkruLS}51IBb?GfKRpV^a1GL}oAurx6zv!pUUH?<@&C9xz?LPCL2 zgM0DOEM&wf$BJg61lh% z(^KNE&Jhye;(!{EGI@uLjD`>o m7fVTMVlLEt2`+(@%;JLl;!Lm`lk-zjfwll`-n@_Ft`z`D(P4=I delta 34 scmV+-0Nww&iUFI40kGc!0_lL0;R3t@o)oj614#n2M+Vmdvt0_@Isk4B^8f$< diff --git a/ContactCenterInsights/src/V1/Conversation.php b/ContactCenterInsights/src/V1/Conversation.php index 7a793c32ae3e..2908651f732c 100644 --- a/ContactCenterInsights/src/V1/Conversation.php +++ b/ContactCenterInsights/src/V1/Conversation.php @@ -67,6 +67,12 @@ class Conversation extends \Google\Protobuf\Internal\Message * Generated from protobuf field map labels = 6; */ private $labels; + /** + * Conversation metadata related to quality management. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24; + */ + private $quality_metadata = null; /** * Output only. The conversation transcript. * @@ -162,6 +168,8 @@ class Conversation extends \Google\Protobuf\Internal\Message * @type array|\Google\Protobuf\Internal\MapField $labels * A map for the user to specify any custom fields. A maximum of 20 labels per * 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 \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript $transcript * Output only. The conversation transcript. * @type int $medium @@ -544,6 +552,42 @@ public function setLabels($var) return $this; } + /** + * Conversation metadata related to quality management. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24; + * @return \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata|null + */ + public function getQualityMetadata() + { + return $this->quality_metadata; + } + + public function hasQualityMetadata() + { + return isset($this->quality_metadata); + } + + public function clearQualityMetadata() + { + unset($this->quality_metadata); + } + + /** + * Conversation metadata related to quality management. + * + * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24; + * @param \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata $var + * @return $this + */ + public function setQualityMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata::class); + $this->quality_metadata = $var; + + return $this; + } + /** * Output only. The conversation transcript. * diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata.php b/ContactCenterInsights/src/V1/Conversation/QualityMetadata.php similarity index 94% rename from owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata.php rename to ContactCenterInsights/src/V1/Conversation/QualityMetadata.php index dc583d1d0951..db37db1e5315 100644 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata.php +++ b/ContactCenterInsights/src/V1/Conversation/QualityMetadata.php @@ -20,19 +20,19 @@ class QualityMetadata extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 customer_satisfaction_rating = 1; */ - protected $customer_satisfaction_rating = 0; + private $customer_satisfaction_rating = 0; /** * The amount of time the customer waited to connect with an agent. * * Generated from protobuf field .google.protobuf.Duration wait_duration = 2; */ - protected $wait_duration = null; + private $wait_duration = null; /** * An arbitrary string value specifying the menu path the customer took. * * Generated from protobuf field string menu_path = 3; */ - protected $menu_path = ''; + private $menu_path = ''; /** * Information about agents involved in the call. * @@ -177,6 +177,4 @@ public function setAgentInfo($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QualityMetadata::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_QualityMetadata::class); diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata/AgentInfo.php b/ContactCenterInsights/src/V1/Conversation/QualityMetadata/AgentInfo.php similarity index 93% rename from owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata/AgentInfo.php rename to ContactCenterInsights/src/V1/Conversation/QualityMetadata/AgentInfo.php index bc96fced0761..a70b3e0ea4d1 100644 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/QualityMetadata/AgentInfo.php +++ b/ContactCenterInsights/src/V1/Conversation/QualityMetadata/AgentInfo.php @@ -20,26 +20,26 @@ class AgentInfo extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string agent_id = 1; */ - protected $agent_id = ''; + private $agent_id = ''; /** * The agent's name. * * Generated from protobuf field string display_name = 2; */ - protected $display_name = ''; + private $display_name = ''; /** * A user-specified string representing the agent's team. * * Generated from protobuf field string team = 3; */ - protected $team = ''; + private $team = ''; /** * A user-provided string indicating the outcome of the agent's segment of * the call. * * Generated from protobuf field string disposition_code = 4; */ - protected $disposition_code = ''; + private $disposition_code = ''; /** * Constructor. @@ -171,6 +171,4 @@ public function setDispositionCode($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AgentInfo::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_QualityMetadata_AgentInfo::class); diff --git a/ContactCenterInsights/src/V1/IngestConversationsRequest/ConversationConfig.php b/ContactCenterInsights/src/V1/IngestConversationsRequest/ConversationConfig.php index 48440262ec28..7ef44795ed89 100644 --- a/ContactCenterInsights/src/V1/IngestConversationsRequest/ConversationConfig.php +++ b/ContactCenterInsights/src/V1/IngestConversationsRequest/ConversationConfig.php @@ -23,17 +23,17 @@ class ConversationConfig extends \Google\Protobuf\Internal\Message */ private $agent_id = ''; /** - * Optional. For audio conversations, this field indicates which of the - * channels, 1 or 2, contains the agent. Note that this must be set for - * audio conversations to be properly displayed and analyzed. + * 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 + * analyzed. * * Generated from protobuf field int32 agent_channel = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $agent_channel = 0; /** - * Optional. For audio conversations, this field indicates which of the - * channels, 1 or 2, contains the customer. Note that this must be set for - * audio conversations to be properly displayed and analyzed. + * 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 + * analyzed. * * Generated from protobuf field int32 customer_channel = 3 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -49,13 +49,13 @@ class ConversationConfig extends \Google\Protobuf\Internal\Message * An opaque, user-specified string representing the human agent who handled * the conversations. * @type int $agent_channel - * Optional. For audio conversations, this field indicates which of the - * channels, 1 or 2, contains the agent. Note that this must be set for - * audio conversations to be properly displayed and analyzed. + * 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 + * analyzed. * @type int $customer_channel - * Optional. For audio conversations, this field indicates which of the - * channels, 1 or 2, contains the customer. Note that this must be set for - * audio conversations to be properly displayed and analyzed. + * 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 + * analyzed. * } */ public function __construct($data = NULL) { @@ -92,9 +92,9 @@ public function setAgentId($var) } /** - * Optional. For audio conversations, this field indicates which of the - * channels, 1 or 2, contains the agent. Note that this must be set for - * audio conversations to be properly displayed and analyzed. + * 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 + * analyzed. * * Generated from protobuf field int32 agent_channel = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -105,9 +105,9 @@ public function getAgentChannel() } /** - * Optional. For audio conversations, this field indicates which of the - * channels, 1 or 2, contains the agent. Note that this must be set for - * audio conversations to be properly displayed and analyzed. + * 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 + * analyzed. * * Generated from protobuf field int32 agent_channel = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var @@ -122,9 +122,9 @@ public function setAgentChannel($var) } /** - * Optional. For audio conversations, this field indicates which of the - * channels, 1 or 2, contains the customer. Note that this must be set for - * audio conversations to be properly displayed and analyzed. + * 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 + * analyzed. * * Generated from protobuf field int32 customer_channel = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -135,9 +135,9 @@ public function getCustomerChannel() } /** - * Optional. For audio conversations, this field indicates which of the - * channels, 1 or 2, contains the customer. Note that this must be set for - * audio conversations to be properly displayed and analyzed. + * 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 + * analyzed. * * Generated from protobuf field int32 customer_channel = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/ContactCenterInsights.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/ContactCenterInsights.php deleted file mode 100644 index 268019807493e93f7b33f9f522704b658283580f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22895 zcmdTsTWlNIbs=rp(v@XX*K12=*1Pn0H?g%|5~97kUi!5|N|w26OR_|1^I*V^$dNQ_ zzA`hE*GYvGX_}%RO@Tg;d;~%JQMAoR5FmY^{pnB97HYqeqG*Mt$VZBzMSofp{a7?b z&wb64Ltc`q(d^I4oO|v)@8_MleXqUSMwe4ddQ&$wTd$?Io~7(vJ=Hc_cB|T|r?xuV z+q#*mwi<1tuAAvpYGEa{yi!UnE)+|b0Mu%A%&MMC?X+4ubv;w9w>q^s$JEa zwr(0t%h=hqt<2uMcu-+aD&kR^o`+CVYv@*6tLmwx)%+vf)@quqm6zz&=a(R-Dy^Bqt#3ifR$!dzj8Ij_9SaxX}5q^cTxh?Rl+`CUAagY(A4VX1>LHeM%!+g ztFSbe+tF=@>ExFySNXAIJ7YU_h2faXg^;|Hvdxa}Jw25&b-QCWZ&AF-2K&xm?#gMqH;T*0J~?5!qcvEcw@ zKWsI3%ucguGVq9#r?Po)PQtm&}tS3XjmJBdRTWhrC zVb|K#@;aziCxXM&R$jkraLZ6@HOCO{gNwQ1s4h|DPokgvZVVNUz`5X8*(Pb~q0(JF zRC;edIm6G=+6Fi?qU+2#C13VD*d_{H+2R__7hLcxFuB_DM{n>)eY~T9vN+gf4pw&+ zFw=4rkS}_PFQP6Kd`_muwTwUic<{MS^oTzcZrcH7lr=zG_zFR`v%(fC!50XIneA$Z zIIRxHUa6sT1+8A~)FH4Cg|OE2&v!tZ@GUf6Z&j%k&Bju(D--#vKT_i#sh80u@w=5~ zSc4QSkX0k|kOSb;=)|^B2d_FCC!or&Aap)>jMWCWrsL}fX5i#M;EMyX4;iq2zGT6@N~1% z(Cq52Zp|J~9lJ7_{fs!Zw+g1alapR2+dpu3f5bLlY})2C{3VpEb}YNq=z9JbJ^!<# zonN5)MQSe>F7?RTFdy` zMlXd$Um>Ev9KonpEgfZOKlHy3=LDGaOSk`Dq7!)z=vE*I!Vo!~q zM8}@!&zJ+jQ)mou>FCT*bMc$83NW>#C4>KC=wVNm@io4catWrAs6w zl|S|)^%$N<<9f5kK!}hgvps~%KvvKxuieZNXE~978+Q9hy^iL)hv9(lFL-<|{xtY! zmbnjjU6uGHzj$tCcuFY0L`{tK~q*+*Q>i?&q=B^vT|6bu$~Q-AI4EK%3p6d!V2>dd!HReJpPTol+F~Jsm4$W%qHe|`QN=RU1l({1a?3nU{ z7@B=(ShiQ0oh)($dz?lSZITsQQ1S}PZdoPuo<{scQ~%Jecqn5@Gt^Y)mvkRr zg_Br9$4M84J2`OFkeCnUs0Fvki6e09o4~D&HuQmXFKGhXpl2oJ#Bj_a3LVE8G})nt zK^kj4p}Ns6$T=moVxbEQ5Jb9TcVxVT^k%ySZ8nO~xbg?%C|PXoKoaHUiDMZWLOWHf z!Wt)>hW8}3HG13hQq@|g&Ata8!#|5=ZBuKqo>rx`^#O!o;Z;e9pUi%0^aD%I2`lsf zAQpW2gBTvc^r3X9ddy4U%<>1>(xC^FyaHkPc8z8uJI5FfMY9tF>3%4hCI2giCL9@q z??79f>J#0rbWDSL18O4s2=fPA?Dn%ZQ_R!Za(Q&AJ1C^{^n51!5*$LKxbhe!f)B8Q zUdnG2-dikHR`TyI7D|=Ur&kv%8_Vmfi-qF-;^IQ$W8lqEX-!>TFRT?;ONkhsKx690 zLUAP#Pa5cacU=P}pJ?bcqtl=qIGxQ&(&tr!^dq_hbudW{Ved1pA_+7O@u+E6Ad{mV z5vYu&*e}&xNO$!*3saN>_##TMS|2(L;xTPP(8u|4bb^_F{tTM(nWplW$I-{TDDU&n zSl$n2EUF}9yI}82Su*G}Wa*@(U(rpoWs2Sl7W+e+Dotvojzze241Xntk_Ppq#1}X@ zHMmdOQ(%TF+d1iio!~7L%pr$OYc`5T@;i{~M6JM=(RnDItGZ=DqUA`G^reWhj4?u9 zMYFXI=iU)b*f~q?M@xW9|S4B%F&@?IEBt`YtW6Y`BxA( z$&OPlcGV>4uG8L|^6eOO|9nNL2-(Fz9W_FVaUaZv=chc(WrUdf)X}0cCOnBNUyq@) zBqL+L>P{d%LR5!KITaJV;75#SiK?I+8c!@i9F+3tbqNFWE5PtV3B!XAa?QNVYTv3<`#e zleFB53KuZch~&EPefScL0$dmCXa_@|dh8JTFp2hfYUS5skkEi4hf9m2(Br@e1<#^H zL;J7-O-10hHx`h#DyusP)5n#sKxZ)mt>>k3p;pJDq{olITWH)|ND!5R6#!dw^(|iVOw``-yreUlxC|ia^9+1u(JCDic zaO*(q4Mp1suFq8&+Q7wU(8(tat3n#^L^URG9Zf$q4N#w&0U^qQOBJmqZ7s8-ix^OBTidF$x@AK7EJ_5=04u)u z{#voLSXn5pudb{YOU0GtKuLkoX||-awy|7LON&reB+x1Lo4UHXxV(^v=cmx5N5;g6 zl3`LE`+07i`NzQ&T()T#MqcRkAV&0JH!e8#^II`A!_r50;vr5ML5<%-lLi}7k`W5e z8RsQEh>Ho!8vh1T_8^YWUyLh3G2WFVCx|*{FG+@HSi{XFSg=08Kh|v5xa)P<^3#=*Gk+5Z{il7w%;6L^WtnCgG{Q^iz2 z>Vm0T(64XSLPWExKS!kT5Ink_!5RB^(9#J%e*UZ-I>LsL7tCEpXM`saCjO4kiDao0 zxrXMX3UjLWq$;0we4yh~mjZp7q21FO!rtAvbG?mD7$g)6w|Y%7Y%!F7F@~@wNV&Wi zqnpyc*kpE~Jz23n@BnBNVUK%p5%GHVVT96xOB~|%9HsdYNm*#eP#p5mpUu$5aeinq z?V(ikfm~>7Fr4g|aGcSI=k&<3L;0y_8vn` zN4Mm6(%6;3$?OeDbba`+obQ+U?AG_lF_{r?9kM@2y4S?Gg7|QGJwj*v91zwv6bqtT zhE+5JZpnv)klzEJd&*JwbOU9j+>>uZWg8`#rTKn7`g4Ahgbz9d?s`yIt5_O56ibJ6 zI;=&zuG>)E?>Oo=N{d$PrThjo?iuysC&6LpwnG(7Pvrhpw&yH%V$?!~+ZklW&Mfb1 zF*MEG1i3^Za2mnl?(*9ltmpEYq)#A+GlW17KVM2yN5X_7QIcZ4iDWPfR zNW55#D!jROQKH}(Ad)Syt%lxuG03=W^wWTKo4mg9lyWv@L?iO2GV(Ty;w-Z zvj4CE(=#?%@xRA}KZ3-EnSu8(EZe&YgK{Y(hq+*+G`{?UAOBihRp!aNU0-C^Bk%AQ zoRyi&IM?|zbNi&Mb;qkY-?h*~^)ds#=3V6b2aLw?Khvx)c)d}Y_{iIC$&14JJ#Sj1 zom;a?o054)xj8tQFp-7Zn7P>8fjWmy`DE7X>fnDn`K=E`R?N)Eyr3hAxkc$;&fcZ; zdqtEc{fh{R`vndf5R^I0cwCLR=7|aTFJg$)IbH(r9U-GWqul`9NQA#b3BQh+eh)(H zp-Kw?dBdZ8qHee23$@@qf#B>i;ei0gf7qpalQZISZ_80~g z7O`Dd5`kqE@r$K zz?>XLfEN*#^|vu}il{f+UAM68-7GJVAVs!<^}}*gdgLRkrzu5?*tM$ffr>KI5R8*n zQ9qa<1DUz!bb15A&w`u1=DxVsWE}1%Cs+)2`=NNmX=gtL_%b8@ zu9A@=p1!S0`m|QgJ7_*sF*gg^ovt*@CU*4=FvX0J@GgeW4=U5AbEivx~0+fOqkxAm#87EE}SIP$N)#mr^^AndEyV zD}D+^e)4^&VMw~*l3+>KFabD0g{;g&;5<=b>9ZiIXQHy7@lfUFCjSJg$h^Hvmb489 z0R>ro9FWNbF*l?j4%B&cj=fRpzV1)U2^>As{trs0f515aoqj+`I=@8eyrsNJ%}ZY4 za%|X2-7GCS57ZmcV`oCNA3Y}#fj7=^c=RY8VZxx2g#Us+$__wzhYy;)v_pXDh6(R$ zc6sK||Hm;jF1!bpeQ{9$2wDf4IVww3<~htdOVX4x<0Sr6c$>e5uLU?}Z(-Sc#V&}z zU$!3fLUQ*~^byn3y?DI~P{HYO{mkD(mFkIHSQaY}j38(*foPP5CEn_yK2Scoxnjw& zIrO1AO}Frcw%-HVJg!ihHV=%TEvmBPYBe{qTKy_ibx~7c>8dVj13|@-WD6pCAFhBp z72adK5=>B{I+UImM{<*D#K8Sf^=5Mzg2P#si24SE()CCeSiy>+hKR}*rF%ii$|R|6 z@08uj1xDnD>N%dOvUOr~j{gcGBKSH##j*)W5O6edRZ8v+%*gHKH2t)C+~q$)s3RWC zM~)>O>cXIcBH5a>+YVfd3qJCCy3zfNpF-DxLKEpMa~M7nrFFCmtROMU>2R^kjUbk< zLZ#1K_;6TvffZN}XIXnx7VBA+S(fiMNzb_8mkV(&Awx^DHNwJtG2+LhO)b0;z4Rm9 z1N4Il@@1zdL1?a%8_dJtJmrHJ>qWTLV2j9ctCWyK)%p4t{(aVr7WV_BLm~JR0V4>M zZAJ??g7c&e(S+WwtfiGVX7u}la`JjY-r@mWs3d1>~)I0z_6!EibeZ5 z=N`wQ`hxh?r+$9|*(8fnbc`*VO}Ze0utBEz$|9v{Ub)JQjecw=QpNVj?SvftAP0nJ z9<#`g_;+IHBq#{Q{0+&}g0CM6?VA+s*Dyo7mm*P|Jy8hQJV62hLDj;t9~5yQ1h%r` z@c?qO&iPR96KW{-ZiM+W&=IE1l+&_ExF7=kfplbrV*F+{O?8Bz)Kljv&cyq2MM;n! ze5(EpAcF1VGeZEHix8vkmQbW!-@=2KP5+wXrQC7(}ZdYTUsj#sr@34?>HSV;? zm@ABS25@q}0qlRhp}lphD@=Rq+woVI=m&t)1@ZylbXR23oAU=^U73F=SbQqjk9HZp z75uO9D{RYLj_wKn>qcQNw>iIcf{viCf71CZ={5HKUC-xwE%;J^QSI`nUb>QfQgq@# diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/Resources.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/GPBMetadata/Google/Cloud/Contactcenterinsights/V1/Resources.php deleted file mode 100644 index f6fc935d67b78b997359dd878f2e670ed34b5dd1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17721 zcmd5^U2Gdyb`Gf@lZTQljTM__k_|J75hsnQSV_8DCE0|OsGmdMS;E*=<7cFv1p4TPyNolcm7CP8Z&NC zKUn0<+;i_a_uTLN4&QmNcif{Fvm0i|v}%so$R3_%ontfGv${^V-fd?O`$tEnm92MA zdabr;<+9neQg*jg%@)_TsxM%u-R)a-b0ypCcAIT;sow7P8%ya||W(`~8RneV7uLeZfmOARF! zb^rOn`;N=Id_e!|8qGlW@0*q_#Hrn**?O(rHcr$rNngswZl;#s&qZ2mE=Vi43PSF2 z+k8s9O)2y9Udu8KUPbz{Ae?atyDa3q?b(cJw`js~+Ua@m==GsTT_q??{4PI<#}{al z&w4tB=aYPKN-I-}PrD%@AsrW#-gPORFZmERYoJmQIHbKvsk&tX$|NHb7cs&sncz|V z9@e5pO-37)BZ974j+|=YqCwizG~2Fqn*CbSH0s@knV!Rtq&80pTtXfLY5uc5@XtB*l_xFMyE+c(A4poR{%CiJ9IMum z*q2TS!rvcR5cI%Z9SsvD33c+rAfZ#(A-ONQ&o1sa^tevP;LaO{s*M^4$ zF$i2^{7h#4^b(POptTda;)8@?n@#Ww#fS;M_Qv7MC!X^^RwUufpHI`m&{geqnt_91 zL#`6Er?Jx1@;Qc1a{IX>?Uts&=j?WlS`8DbghOBfiPI#d(y1r?t(gR z*RTN*g4V9U=1F}voLW=ZkSXm)bVbP+I%UBTZuM#aFvii;@;KnU=Tp&s6QgGWhuodW zb4(<(e)7a6;X{GiX3qp|P|}7z0nrpnrhN*B2%j~sJ4S-$uLAwQu zRPVxTG#f%`6Pa6-3OWNRn)uW_RSG>zQ}=7_zSQO9O8k4V%x84fpE3x!T4>~YaAa!v zyAh>5NSdeAS7=&VY3(X$I|wcJcZ~hr%3g7GYkjM@Hvg11N3^$D+ASKZ`R(obn3kZ) z)y;f$KECpY5A&yV8>ezO;#5n5b8f?hKUoTz6>SY(?I&g(ap{-p)7etH3q!)DaOq3; z;~59Do)3;2!LMfpqJ*pUg&Axa83Lu@Aoa5vCPl<>_7;gTPn*rP$Vth zcn)rbF1ua|l*R719Thyh6>-~KP7oGiuv|)&H03>XEdY8O!t7eg{fp{EDDR7tLRGdJtu};*i+iv{AHZ!&SdPIS4 z)NL8EAo{A(Lc?=%TyipWdHiGLQY|ECT1Hm-+m!UCV^5>jZ?w8b-)bokc!uTzrkSq` zOV7JJrGH5C{+U%#)=P9Pu;Ac{kQAkUgk};xjsDLGnsfI|s*={Gt0Jm(CGJNk@RFN$UAJ5N zgqP&NeKK7a;)fA+$X%9{@OZgnnV-;Xcz;3`_MNbWy%mu|LGe_W@*mSoNP16#yd)^d!=)c3 zs?aROFcZHYk%<6Z23(#lXlwPqjnVv|IJGTG1@=fm(VJiAZ`0_Ev|5YjANT~db($8W zY(OEaSJZV25_uaL?+&}7`p+nH&bb-z+!>Ijv~8O6&ZyA<^C~komOrb1K$i#Bq`~JC zy!kGmUGG}b1&nFe2ZBBU+|m^M*EG!yfEP>`pM1;e_eA_B)+^or$fqJOp7$Cky*nfV zPP~li(u3Xy@Z*smM$9G!Dibx!5p}U5hpM%$QS!LkZb(A2Vp&l$KARY)sNAJ1P!E}q z!(T+sLUJNt%{=G?eb)QAzE6qlMU;lm(bZX=g1GB6@Y)AhmPQrbntIzx%=(rUiCg>P{%F;gmUZZodT{T5vX6vudS7fmC8JE zsJxc17UxsQFHEaPW_bKwd26*eKdZk=)6%HpfjH8qa^FWL|Md6h^1w+($UYYY2h%#2 zz|CMdp{5<2N-RLvVBrT$gFZ{C02=FvzFkb!e-oz#sV@OQTGd`YNS@bf2a44palGV?093$|Wcovfn7;s#s)kb{u?9A+8_NTo{41Jr~kZmRBB- z7&^ZH^dCqf%SqU69+gKKR2~t!eyerBwCi@t8WG0?6EXt+5CTJS#S}T&xyU&(pW$4E zhf89xWAL?leUufjKgjVR58XtCkZnxV7%o70i%IcL!#@QfB#b!;fEIyHlWinY^Rm1g z6{~&HBH73bw+qv#u5zijL?q)TVM=5%@9_!eMC>F^+E6W(ea>X&Z(^+TVa9g7A|h+? zH!C8>(=qK8de##ZHo?ygsv03HpxXaAnm%f^;U3Ejul@;5i48?2f1y$ZC=b{RWI6YD z*NS`FrF+PF#&F=0^4r$#28;$wh<9^>t%Un9-=37Ww~JN&Hl^n&>5D5vS9eNl#qCk> z0b?OR<<4!)=zUp6YW2axyz}^>Q$A`cuH}WpNVthFGPp+0ElyKHpZx=YEn>!uOUE`pQ5HW4$RE5U=RN)H8emHfp{$zL(1&_a+rrCfWWm;Tk z^!sD9XDDTv_ggjxhVWQ~O=B>f;%*g0IlOCpkL!Jc8SPzK^hN|bU}SuAPLfj^mq7`! z7o9}Mk@Wr9$jmKA6+nowT<9BPH%}NxL1&sP=l4xvW)f&oNe8`1!|LOBHLY&HXQQOR zDVV7CA~0bYL^ha)_8wgo(}~)Q5p4F6710X?gdP{GizSJuTJ(<0EsxVY6DXtR${;w{ zdn6Mb7cEEMqlEyUrX`Hxi}d{7W;tIe8aw&wDuRPia1Rd=B{akq(p${$-s8{lm7fE& z&S*IjXoaTMHll);++Y!~Lw`|s3uSW8^uLeOVt};2drhT>(tuYZ9>h_kg6ine_qDQ2 zT5wT93m-QHI54gLF{KAC36&H(_8Q#`?wC>D-!2*(<gH&O;G?~EteRY61loSq(FRNg?E!v8N zmdeC()Rbe{9j+*rXx8qTX8qWWog~)25mh8&tfa-89?SeT=2tV-97}ZYvfEn6k#tfy(vumA-goqq6s~{#Tc1VW=+>DPm1D zPr-e#y>3huxkrWEJoj+5&2TrTC~eSD?K5bL{Q!%VM=xs5X}$JYUX0^30BCJfD$q}) zIys^y<15^WROUt`Ma`tNq{c6gbQy_#-lfwOHESVAuSzOI0yw0rfnEeYbCv`R)!-Yo zJ>G9}*z##8R(?h|>Onx3ExM|~HprJOEIr|#UF-~ZsCs?2ehzaf-0gm$twPOZ4q+NP z#=IJZv{d8QD3IEj2^BrQaY1F5EedP1ab%i}!&?1QW&EOQqSWbiHP|bn{36b1&4k@s zXt7;D7XmrXmeMCK#l0ZPM9KIOYq2v9trlj>UbOJQ_tr@SBz?^#U+-0LhsT1 z(6|@qxz$p+TwJa0B8_isqc*TTkS#(2Xtz`~)MIexkyYA5!C(vi{XOq;98S*c`hM`z zg#O2IdU_<3ULTxlD~a5e|c7gqJUz0!xDI1&wlqMg)dhe-GVj`@^v0Vg4v_u!qV z2)sHZfkBD98YhxLDl>k>w6-g(hS>YL4xtjFNa`+F_ZJy8SU@QfF5%0M#4rv7J) zGLJSG+`%2NL+9^u3;;36YGenR&EZI!^?$?mPOwpUz=CPd(&B)Pl&>2}_8}5~r$uBK z*Z*|_Zs}^k=AH9S3FodH)9aCcK(qV}k%#czZJ;-&Z$6HA7$Q!Zt749dnnI$)2tKsV z&;}kHJmH0ep-Nb4VZ9Vq2{qR6q6%c}C0k{pTjAClcvE4BnG1aF#|OJ#PSCZWYy*iX zxCOy>{=oYJ^1Tm{3@p6*b^hRGy5TF*pdTEd2$yAnF1hdHaM+T>B|YS-1*VaZQ{d_f z^0|RGdLS0@X07*X51X4L);r0`IH9XgCJm<>G%35317jc@r(=s27N#QBA2n0j@zO zxa}=)+eSdd?2OkCiE}A<3BFnwSTP553A8dVhC?H$3}+W*qGdZG@aAQt#uO z1I^5D<8)=jb-Y!)h*^E4g({*3tNhu*^4Iw#y7g!b195NYo*W6_`YBxr^CgPe3Vw_y z$yS(EQM=oGO5Y(Z#HzRssC*tRK|A@fY9caZi8qW~8qF0@5!l|syEEece5^2sx8Ot< zvvi*ezndZ)?vrSI6z0&pEMB&@At0x_7yHPN?`pfRq2o=PW_NVQ?GlnE_!$Un&@htp z4&Q#n^}mbX*bu)6krTfNfgno^U&XO7tu6KQ61h9K|HXaoK>c)t``Z!WClB!B5f9@x zCCQZ)K@)#Q5nWlqqj}`lA5UepN>l&@$AkI?JPcknlmeeU%>P>~qWRT67%_j4=)fFj zO99iwg&Fv+>W#rOjTi8ZUz9p$f`|FW#hEqj{iv&8w@aq(z=;3l>~Igoogle.cloud.contactcenterinsights.v1.Analysis - */ -class Analysis extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the analysis. - * Format: - * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. The time at which the analysis was requested. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $request_time = null; - /** - * Output only. The time at which the analysis was created, which occurs when - * the long-running operation completes. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The result of the analysis, which is populated when the - * analysis finishes. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult analysis_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $analysis_result = null; - /** - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; - */ - protected $annotator_selector = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of the analysis. - * Format: - * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} - * @type \Google\Protobuf\Timestamp $request_time - * Output only. The time at which the analysis was requested. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the analysis was created, which occurs when - * the long-running operation completes. - * @type \Google\Cloud\ContactCenterInsights\V1\AnalysisResult $analysis_result - * Output only. The result of the analysis, which is populated when the - * analysis finishes. - * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $annotator_selector - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of the analysis. - * Format: - * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} - * - * 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 analysis. - * Format: - * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} - * - * 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; - } - - /** - * Output only. The time at which the analysis was requested. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * Output only. The time at which the analysis was requested. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * Output only. The time at which the analysis was created, which occurs when - * the long-running operation completes. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which the analysis was created, which occurs when - * the long-running operation completes. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 result of the analysis, which is populated when the - * analysis finishes. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult analysis_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ContactCenterInsights\V1\AnalysisResult|null - */ - public function getAnalysisResult() - { - return $this->analysis_result; - } - - public function hasAnalysisResult() - { - return isset($this->analysis_result); - } - - public function clearAnalysisResult() - { - unset($this->analysis_result); - } - - /** - * Output only. The result of the analysis, which is populated when the - * analysis finishes. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult analysis_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ContactCenterInsights\V1\AnalysisResult $var - * @return $this - */ - public function setAnalysisResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnalysisResult::class); - $this->analysis_result = $var; - - return $this; - } - - /** - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; - * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector|null - */ - public function getAnnotatorSelector() - { - return $this->annotator_selector; - } - - public function hasAnnotatorSelector() - { - return isset($this->annotator_selector); - } - - public function clearAnnotatorSelector() - { - unset($this->annotator_selector); - } - - /** - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; - * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $var - * @return $this - */ - public function setAnnotatorSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector::class); - $this->annotator_selector = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult.php deleted file mode 100644 index f3f49c60cfdc..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.contactcenterinsights.v1.AnalysisResult - */ -class AnalysisResult extends \Google\Protobuf\Internal\Message -{ - /** - * The time at which the analysis ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 1; - */ - protected $end_time = null; - protected $metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\AnalysisResult\CallAnalysisMetadata $call_analysis_metadata - * Call-specific metadata created by the analysis. - * @type \Google\Protobuf\Timestamp $end_time - * The time at which the analysis ended. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Call-specific metadata created by the analysis. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata call_analysis_metadata = 2; - * @return \Google\Cloud\ContactCenterInsights\V1\AnalysisResult\CallAnalysisMetadata|null - */ - public function getCallAnalysisMetadata() - { - return $this->readOneof(2); - } - - public function hasCallAnalysisMetadata() - { - return $this->hasOneof(2); - } - - /** - * Call-specific metadata created by the analysis. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata call_analysis_metadata = 2; - * @param \Google\Cloud\ContactCenterInsights\V1\AnalysisResult\CallAnalysisMetadata $var - * @return $this - */ - public function setCallAnalysisMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnalysisResult\CallAnalysisMetadata::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The time at which the analysis ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 1; - * @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 at which the analysis ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getMetadata() - { - return $this->whichOneof("metadata"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult/CallAnalysisMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult/CallAnalysisMetadata.php deleted file mode 100644 index fbd877ddba3e..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnalysisResult/CallAnalysisMetadata.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - */ -class CallAnalysisMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * A list of call annotations that apply to this call. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CallAnnotation annotations = 2; - */ - private $annotations; - /** - * All the entities in the call. - * - * Generated from protobuf field map entities = 3; - */ - private $entities; - /** - * Overall conversation-level sentiment for each channel of the call. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.ConversationLevelSentiment sentiments = 4; - */ - private $sentiments; - /** - * All the matched intents in the call. - * - * Generated from protobuf field map intents = 6; - */ - private $intents; - /** - * All the matched phrase matchers in the call. - * - * Generated from protobuf field map phrase_matchers = 7; - */ - private $phrase_matchers; - /** - * Overall conversation-level issue modeling result. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelResult issue_model_result = 8; - */ - protected $issue_model_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ContactCenterInsights\V1\CallAnnotation>|\Google\Protobuf\Internal\RepeatedField $annotations - * A list of call annotations that apply to this call. - * @type array|\Google\Protobuf\Internal\MapField $entities - * 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 array|\Google\Protobuf\Internal\MapField $intents - * All the matched intents in the call. - * @type array|\Google\Protobuf\Internal\MapField $phrase_matchers - * All the matched phrase matchers in the call. - * @type \Google\Cloud\ContactCenterInsights\V1\IssueModelResult $issue_model_result - * Overall conversation-level issue modeling result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A list of call annotations that apply to this call. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CallAnnotation annotations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * A list of call annotations that apply to this call. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CallAnnotation annotations = 2; - * @param array<\Google\Cloud\ContactCenterInsights\V1\CallAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\CallAnnotation::class); - $this->annotations = $arr; - - return $this; - } - - /** - * All the entities in the call. - * - * Generated from protobuf field map entities = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * All the entities in the call. - * - * Generated from protobuf field map entities = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * Overall conversation-level sentiment for each channel of the call. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.ConversationLevelSentiment sentiments = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentiments() - { - return $this->sentiments; - } - - /** - * Overall conversation-level sentiment for each channel of the call. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.ConversationLevelSentiment sentiments = 4; - * @param array<\Google\Cloud\ContactCenterInsights\V1\ConversationLevelSentiment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentiments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\ConversationLevelSentiment::class); - $this->sentiments = $arr; - - return $this; - } - - /** - * All the matched intents in the call. - * - * Generated from protobuf field map intents = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getIntents() - { - return $this->intents; - } - - /** - * All the matched intents in the call. - * - * Generated from protobuf field map intents = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setIntents($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Intent::class); - $this->intents = $arr; - - return $this; - } - - /** - * All the matched phrase matchers in the call. - * - * Generated from protobuf field map phrase_matchers = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getPhraseMatchers() - { - return $this->phrase_matchers; - } - - /** - * All the matched phrase matchers in the call. - * - * Generated from protobuf field map phrase_matchers = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setPhraseMatchers($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData::class); - $this->phrase_matchers = $arr; - - return $this; - } - - /** - * Overall conversation-level issue modeling result. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelResult issue_model_result = 8; - * @return \Google\Cloud\ContactCenterInsights\V1\IssueModelResult|null - */ - public function getIssueModelResult() - { - return $this->issue_model_result; - } - - public function hasIssueModelResult() - { - return isset($this->issue_model_result); - } - - public function clearIssueModelResult() - { - unset($this->issue_model_result); - } - - /** - * Overall conversation-level issue modeling result. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelResult issue_model_result = 8; - * @param \Google\Cloud\ContactCenterInsights\V1\IssueModelResult $var - * @return $this - */ - public function setIssueModelResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModelResult::class); - $this->issue_model_result = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CallAnalysisMetadata::class, \Google\Cloud\ContactCenterInsights\V1\AnalysisResult_CallAnalysisMetadata::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotationBoundary.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotationBoundary.php deleted file mode 100644 index f36dc2dfdf24..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotationBoundary.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.contactcenterinsights.v1.AnnotationBoundary - */ -class AnnotationBoundary extends \Google\Protobuf\Internal\Message -{ - /** - * The index in the sequence of transcribed pieces of the conversation where - * the boundary is located. This index starts at zero. - * - * Generated from protobuf field int32 transcript_index = 1; - */ - protected $transcript_index = 0; - protected $detailed_boundary; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $word_index - * The word index of this boundary with respect to the first word in the - * transcript piece. This index starts at zero. - * @type int $transcript_index - * The index in the sequence of transcribed pieces of the conversation where - * the boundary is located. This index starts at zero. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The word index of this boundary with respect to the first word in the - * transcript piece. This index starts at zero. - * - * Generated from protobuf field int32 word_index = 3; - * @return int - */ - public function getWordIndex() - { - return $this->readOneof(3); - } - - public function hasWordIndex() - { - return $this->hasOneof(3); - } - - /** - * The word index of this boundary with respect to the first word in the - * transcript piece. This index starts at zero. - * - * Generated from protobuf field int32 word_index = 3; - * @param int $var - * @return $this - */ - public function setWordIndex($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The index in the sequence of transcribed pieces of the conversation where - * the boundary is located. This index starts at zero. - * - * Generated from protobuf field int32 transcript_index = 1; - * @return int - */ - public function getTranscriptIndex() - { - return $this->transcript_index; - } - - /** - * The index in the sequence of transcribed pieces of the conversation where - * the boundary is located. This index starts at zero. - * - * Generated from protobuf field int32 transcript_index = 1; - * @param int $var - * @return $this - */ - public function setTranscriptIndex($var) - { - GPBUtil::checkInt32($var); - $this->transcript_index = $var; - - return $this; - } - - /** - * @return string - */ - public function getDetailedBoundary() - { - return $this->whichOneof("detailed_boundary"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector.php deleted file mode 100644 index d2548d2c4a3f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector.php +++ /dev/null @@ -1,453 +0,0 @@ -google.cloud.contactcenterinsights.v1.AnnotatorSelector - */ -class AnnotatorSelector extends \Google\Protobuf\Internal\Message -{ - /** - * Whether to run the interruption annotator. - * - * Generated from protobuf field bool run_interruption_annotator = 1; - */ - protected $run_interruption_annotator = false; - /** - * Whether to run the silence annotator. - * - * Generated from protobuf field bool run_silence_annotator = 2; - */ - protected $run_silence_annotator = false; - /** - * Whether to run the active phrase matcher annotator(s). - * - * Generated from protobuf field bool run_phrase_matcher_annotator = 3; - */ - protected $run_phrase_matcher_annotator = false; - /** - * The list of phrase matchers to run. If not provided, all active phrase - * matchers will be used. If inactive phrase matchers are provided, they will - * not be used. Phrase matchers will be run only if - * run_phrase_matcher_annotator is set to true. Format: - * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * - * Generated from protobuf field repeated string phrase_matchers = 4 [(.google.api.resource_reference) = { - */ - private $phrase_matchers; - /** - * Whether to run the sentiment annotator. - * - * Generated from protobuf field bool run_sentiment_annotator = 5; - */ - protected $run_sentiment_annotator = false; - /** - * Whether to run the entity annotator. - * - * Generated from protobuf field bool run_entity_annotator = 6; - */ - protected $run_entity_annotator = false; - /** - * Whether to run the intent annotator. - * - * Generated from protobuf field bool run_intent_annotator = 7; - */ - protected $run_intent_annotator = false; - /** - * Whether to run the issue model annotator. A model should have already been - * deployed for this to take effect. - * - * Generated from protobuf field bool run_issue_model_annotator = 8; - */ - protected $run_issue_model_annotator = false; - /** - * The issue model to run. If not provided, the most recently deployed topic - * model will be used. The provided issue model will only be used for - * inference if the issue model is deployed and if run_issue_model_annotator - * is set to true. If more than one issue model is provided, only the first - * provided issue model will be used for inference. - * - * Generated from protobuf field repeated string issue_models = 10 [(.google.api.resource_reference) = { - */ - private $issue_models; - /** - * Whether to run the summarization annotator. - * - * Generated from protobuf field bool run_summarization_annotator = 9; - */ - protected $run_summarization_annotator = false; - /** - * Configuration for the summarization annotator. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig summarization_config = 11; - */ - protected $summarization_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $run_interruption_annotator - * Whether to run the interruption annotator. - * @type bool $run_silence_annotator - * Whether to run the silence annotator. - * @type bool $run_phrase_matcher_annotator - * Whether to run the active phrase matcher annotator(s). - * @type array|\Google\Protobuf\Internal\RepeatedField $phrase_matchers - * The list of phrase matchers to run. If not provided, all active phrase - * matchers will be used. If inactive phrase matchers are provided, they will - * not be used. Phrase matchers will be run only if - * run_phrase_matcher_annotator is set to true. Format: - * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * @type bool $run_sentiment_annotator - * Whether to run the sentiment annotator. - * @type bool $run_entity_annotator - * Whether to run the entity annotator. - * @type bool $run_intent_annotator - * Whether to run the intent annotator. - * @type bool $run_issue_model_annotator - * Whether to run the issue model annotator. A model should have already been - * deployed for this to take effect. - * @type array|\Google\Protobuf\Internal\RepeatedField $issue_models - * The issue model to run. If not provided, the most recently deployed topic - * model will be used. The provided issue model will only be used for - * inference if the issue model is deployed and if run_issue_model_annotator - * is set to true. If more than one issue model is provided, only the first - * provided issue model will be used for inference. - * @type bool $run_summarization_annotator - * Whether to run the summarization annotator. - * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig $summarization_config - * Configuration for the summarization annotator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Whether to run the interruption annotator. - * - * Generated from protobuf field bool run_interruption_annotator = 1; - * @return bool - */ - public function getRunInterruptionAnnotator() - { - return $this->run_interruption_annotator; - } - - /** - * Whether to run the interruption annotator. - * - * Generated from protobuf field bool run_interruption_annotator = 1; - * @param bool $var - * @return $this - */ - public function setRunInterruptionAnnotator($var) - { - GPBUtil::checkBool($var); - $this->run_interruption_annotator = $var; - - return $this; - } - - /** - * Whether to run the silence annotator. - * - * Generated from protobuf field bool run_silence_annotator = 2; - * @return bool - */ - public function getRunSilenceAnnotator() - { - return $this->run_silence_annotator; - } - - /** - * Whether to run the silence annotator. - * - * Generated from protobuf field bool run_silence_annotator = 2; - * @param bool $var - * @return $this - */ - public function setRunSilenceAnnotator($var) - { - GPBUtil::checkBool($var); - $this->run_silence_annotator = $var; - - return $this; - } - - /** - * Whether to run the active phrase matcher annotator(s). - * - * Generated from protobuf field bool run_phrase_matcher_annotator = 3; - * @return bool - */ - public function getRunPhraseMatcherAnnotator() - { - return $this->run_phrase_matcher_annotator; - } - - /** - * Whether to run the active phrase matcher annotator(s). - * - * Generated from protobuf field bool run_phrase_matcher_annotator = 3; - * @param bool $var - * @return $this - */ - public function setRunPhraseMatcherAnnotator($var) - { - GPBUtil::checkBool($var); - $this->run_phrase_matcher_annotator = $var; - - return $this; - } - - /** - * The list of phrase matchers to run. If not provided, all active phrase - * matchers will be used. If inactive phrase matchers are provided, they will - * not be used. Phrase matchers will be run only if - * run_phrase_matcher_annotator is set to true. Format: - * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * - * Generated from protobuf field repeated string phrase_matchers = 4 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPhraseMatchers() - { - return $this->phrase_matchers; - } - - /** - * The list of phrase matchers to run. If not provided, all active phrase - * matchers will be used. If inactive phrase matchers are provided, they will - * not be used. Phrase matchers will be run only if - * run_phrase_matcher_annotator is set to true. Format: - * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * - * Generated from protobuf field repeated string phrase_matchers = 4 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPhraseMatchers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->phrase_matchers = $arr; - - return $this; - } - - /** - * Whether to run the sentiment annotator. - * - * Generated from protobuf field bool run_sentiment_annotator = 5; - * @return bool - */ - public function getRunSentimentAnnotator() - { - return $this->run_sentiment_annotator; - } - - /** - * Whether to run the sentiment annotator. - * - * Generated from protobuf field bool run_sentiment_annotator = 5; - * @param bool $var - * @return $this - */ - public function setRunSentimentAnnotator($var) - { - GPBUtil::checkBool($var); - $this->run_sentiment_annotator = $var; - - return $this; - } - - /** - * Whether to run the entity annotator. - * - * Generated from protobuf field bool run_entity_annotator = 6; - * @return bool - */ - public function getRunEntityAnnotator() - { - return $this->run_entity_annotator; - } - - /** - * Whether to run the entity annotator. - * - * Generated from protobuf field bool run_entity_annotator = 6; - * @param bool $var - * @return $this - */ - public function setRunEntityAnnotator($var) - { - GPBUtil::checkBool($var); - $this->run_entity_annotator = $var; - - return $this; - } - - /** - * Whether to run the intent annotator. - * - * Generated from protobuf field bool run_intent_annotator = 7; - * @return bool - */ - public function getRunIntentAnnotator() - { - return $this->run_intent_annotator; - } - - /** - * Whether to run the intent annotator. - * - * Generated from protobuf field bool run_intent_annotator = 7; - * @param bool $var - * @return $this - */ - public function setRunIntentAnnotator($var) - { - GPBUtil::checkBool($var); - $this->run_intent_annotator = $var; - - return $this; - } - - /** - * Whether to run the issue model annotator. A model should have already been - * deployed for this to take effect. - * - * Generated from protobuf field bool run_issue_model_annotator = 8; - * @return bool - */ - public function getRunIssueModelAnnotator() - { - return $this->run_issue_model_annotator; - } - - /** - * Whether to run the issue model annotator. A model should have already been - * deployed for this to take effect. - * - * Generated from protobuf field bool run_issue_model_annotator = 8; - * @param bool $var - * @return $this - */ - public function setRunIssueModelAnnotator($var) - { - GPBUtil::checkBool($var); - $this->run_issue_model_annotator = $var; - - return $this; - } - - /** - * The issue model to run. If not provided, the most recently deployed topic - * model will be used. The provided issue model will only be used for - * inference if the issue model is deployed and if run_issue_model_annotator - * is set to true. If more than one issue model is provided, only the first - * provided issue model will be used for inference. - * - * Generated from protobuf field repeated string issue_models = 10 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIssueModels() - { - return $this->issue_models; - } - - /** - * The issue model to run. If not provided, the most recently deployed topic - * model will be used. The provided issue model will only be used for - * inference if the issue model is deployed and if run_issue_model_annotator - * is set to true. If more than one issue model is provided, only the first - * provided issue model will be used for inference. - * - * Generated from protobuf field repeated string issue_models = 10 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIssueModels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->issue_models = $arr; - - return $this; - } - - /** - * Whether to run the summarization annotator. - * - * Generated from protobuf field bool run_summarization_annotator = 9; - * @return bool - */ - public function getRunSummarizationAnnotator() - { - return $this->run_summarization_annotator; - } - - /** - * Whether to run the summarization annotator. - * - * Generated from protobuf field bool run_summarization_annotator = 9; - * @param bool $var - * @return $this - */ - public function setRunSummarizationAnnotator($var) - { - GPBUtil::checkBool($var); - $this->run_summarization_annotator = $var; - - return $this; - } - - /** - * Configuration for the summarization annotator. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig summarization_config = 11; - * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig|null - */ - public function getSummarizationConfig() - { - return $this->summarization_config; - } - - public function hasSummarizationConfig() - { - return isset($this->summarization_config); - } - - public function clearSummarizationConfig() - { - unset($this->summarization_config); - } - - /** - * Configuration for the summarization annotator. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig summarization_config = 11; - * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig $var - * @return $this - */ - public function setSummarizationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig::class); - $this->summarization_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig.php deleted file mode 100644 index b050ddc9554a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig - */ -class SummarizationConfig extends \Google\Protobuf\Internal\Message -{ - protected $model_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_profile - * Resource name of the Dialogflow conversation profile. - * Format: - * projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} - * @type int $summarization_model - * Default summarization model to be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the Dialogflow conversation profile. - * Format: - * projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} - * - * Generated from protobuf field string conversation_profile = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getConversationProfile() - { - return $this->readOneof(1); - } - - public function hasConversationProfile() - { - return $this->hasOneof(1); - } - - /** - * Resource name of the Dialogflow conversation profile. - * Format: - * projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} - * - * Generated from protobuf field string conversation_profile = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setConversationProfile($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Default summarization model to be used. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel summarization_model = 2; - * @return int - */ - public function getSummarizationModel() - { - return $this->readOneof(2); - } - - public function hasSummarizationModel() - { - return $this->hasOneof(2); - } - - /** - * Default summarization model to be used. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel summarization_model = 2; - * @param int $var - * @return $this - */ - public function setSummarizationModel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector\SummarizationConfig\SummarizationModel::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getModelSource() - { - return $this->whichOneof("model_source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SummarizationConfig::class, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector_SummarizationConfig::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php deleted file mode 100644 index e086c9ea930b..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnnotatorSelector/SummarizationConfig/SummarizationModel.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel - */ -class SummarizationModel -{ - /** - * Unspecified summarization model. - * - * Generated from protobuf enum SUMMARIZATION_MODEL_UNSPECIFIED = 0; - */ - const SUMMARIZATION_MODEL_UNSPECIFIED = 0; - /** - * The CCAI baseline model. - * - * Generated from protobuf enum BASELINE_MODEL = 1; - */ - const BASELINE_MODEL = 1; - - private static $valueToName = [ - self::SUMMARIZATION_MODEL_UNSPECIFIED => 'SUMMARIZATION_MODEL_UNSPECIFIED', - self::BASELINE_MODEL => 'BASELINE_MODEL', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SummarizationModel::class, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector_SummarizationConfig_SummarizationModel::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback.php deleted file mode 100644 index 213afb4ccc53..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.contactcenterinsights.v1.AnswerFeedback - */ -class AnswerFeedback extends \Google\Protobuf\Internal\Message -{ - /** - * The correctness level of an answer. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel correctness_level = 1; - */ - protected $correctness_level = 0; - /** - * Indicates whether an answer or item was clicked by the human agent. - * - * Generated from protobuf field bool clicked = 2; - */ - protected $clicked = false; - /** - * Indicates whether an answer or item was displayed to the human agent in the - * agent desktop UI. - * - * Generated from protobuf field bool displayed = 3; - */ - protected $displayed = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $correctness_level - * The correctness level of an answer. - * @type bool $clicked - * Indicates whether an answer or item was clicked by the human agent. - * @type bool $displayed - * Indicates whether an answer or item was displayed to the human agent in the - * agent desktop UI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The correctness level of an answer. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel correctness_level = 1; - * @return int - */ - public function getCorrectnessLevel() - { - return $this->correctness_level; - } - - /** - * The correctness level of an answer. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel correctness_level = 1; - * @param int $var - * @return $this - */ - public function setCorrectnessLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback\CorrectnessLevel::class); - $this->correctness_level = $var; - - return $this; - } - - /** - * Indicates whether an answer or item was clicked by the human agent. - * - * Generated from protobuf field bool clicked = 2; - * @return bool - */ - public function getClicked() - { - return $this->clicked; - } - - /** - * Indicates whether an answer or item was clicked by the human agent. - * - * Generated from protobuf field bool clicked = 2; - * @param bool $var - * @return $this - */ - public function setClicked($var) - { - GPBUtil::checkBool($var); - $this->clicked = $var; - - return $this; - } - - /** - * Indicates whether an answer or item was displayed to the human agent in the - * agent desktop UI. - * - * Generated from protobuf field bool displayed = 3; - * @return bool - */ - public function getDisplayed() - { - return $this->displayed; - } - - /** - * Indicates whether an answer or item was displayed to the human agent in the - * agent desktop UI. - * - * Generated from protobuf field bool displayed = 3; - * @param bool $var - * @return $this - */ - public function setDisplayed($var) - { - GPBUtil::checkBool($var); - $this->displayed = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback/CorrectnessLevel.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback/CorrectnessLevel.php deleted file mode 100644 index 2695eda6c4bd..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/AnswerFeedback/CorrectnessLevel.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel - */ -class CorrectnessLevel -{ - /** - * Correctness level unspecified. - * - * Generated from protobuf enum CORRECTNESS_LEVEL_UNSPECIFIED = 0; - */ - const CORRECTNESS_LEVEL_UNSPECIFIED = 0; - /** - * Answer is totally wrong. - * - * Generated from protobuf enum NOT_CORRECT = 1; - */ - const NOT_CORRECT = 1; - /** - * Answer is partially correct. - * - * Generated from protobuf enum PARTIALLY_CORRECT = 2; - */ - const PARTIALLY_CORRECT = 2; - /** - * Answer is fully correct. - * - * Generated from protobuf enum FULLY_CORRECT = 3; - */ - const FULLY_CORRECT = 3; - - private static $valueToName = [ - self::CORRECTNESS_LEVEL_UNSPECIFIED => 'CORRECTNESS_LEVEL_UNSPECIFIED', - self::NOT_CORRECT => 'NOT_CORRECT', - self::PARTIALLY_CORRECT => 'PARTIALLY_CORRECT', - self::FULLY_CORRECT => 'FULLY_CORRECT', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CorrectnessLevel::class, \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback_CorrectnessLevel::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ArticleSuggestionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ArticleSuggestionData.php deleted file mode 100644 index e6fec5e3efb9..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ArticleSuggestionData.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.contactcenterinsights.v1.ArticleSuggestionData - */ -class ArticleSuggestionData extends \Google\Protobuf\Internal\Message -{ - /** - * Article title. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * Article URI. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * The system's confidence score that this article is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field float confidence_score = 3; - */ - protected $confidence_score = 0.0; - /** - * Map that contains metadata about the Article Suggestion and the document - * that it originates from. - * - * Generated from protobuf field map metadata = 4; - */ - private $metadata; - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 5; - */ - protected $query_record = ''; - /** - * The knowledge document that this answer was extracted from. - * Format: - * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} - * - * Generated from protobuf field string source = 6; - */ - protected $source = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * Article title. - * @type string $uri - * Article URI. - * @type float $confidence_score - * The system's confidence score that this article is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Map that contains metadata about the Article Suggestion and the document - * that it originates from. - * @type string $query_record - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * @type string $source - * The knowledge document that this answer was extracted from. - * Format: - * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Article title. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Article title. - * - * Generated from protobuf field string title = 1; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Article URI. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Article URI. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The system's confidence score that this article is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field float confidence_score = 3; - * @return float - */ - public function getConfidenceScore() - { - return $this->confidence_score; - } - - /** - * The system's confidence score that this article is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field float confidence_score = 3; - * @param float $var - * @return $this - */ - public function setConfidenceScore($var) - { - GPBUtil::checkFloat($var); - $this->confidence_score = $var; - - return $this; - } - - /** - * Map that contains metadata about the Article Suggestion and the document - * that it originates from. - * - * Generated from protobuf field map metadata = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Map that contains metadata about the Article Suggestion and the document - * that it originates from. - * - * Generated from protobuf field map metadata = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 5; - * @return string - */ - public function getQueryRecord() - { - return $this->query_record; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 5; - * @param string $var - * @return $this - */ - public function setQueryRecord($var) - { - GPBUtil::checkString($var, True); - $this->query_record = $var; - - return $this; - } - - /** - * The knowledge document that this answer was extracted from. - * Format: - * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} - * - * Generated from protobuf field string source = 6; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * The knowledge document that this answer was extracted from. - * Format: - * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} - * - * Generated from protobuf field string source = 6; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsMetadata.php deleted file mode 100644 index f93ac9e68a44..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsMetadata.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata - */ -class BulkAnalyzeConversationsMetadata 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 request for bulk analyze. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest request = 3; - */ - protected $request = null; - /** - * The number of requested analyses that have completed successfully so far. - * - * Generated from protobuf field int32 completed_analyses_count = 4; - */ - protected $completed_analyses_count = 0; - /** - * The number of requested analyses that have failed so far. - * - * Generated from protobuf field int32 failed_analyses_count = 5; - */ - protected $failed_analyses_count = 0; - /** - * Total number of analyses requested. Computed by the number of conversations - * returned by `filter` multiplied by `analysis_percentage` in the request. - * - * Generated from protobuf field int32 total_requested_analyses_count = 6; - */ - protected $total_requested_analyses_count = 0; - /** - * Output only. Partial errors during bulk analyze operation that might cause - * the operation output to be incomplete. - * - * Generated from protobuf field repeated .google.rpc.Status partial_errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $partial_errors; - - /** - * 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\BulkAnalyzeConversationsRequest $request - * The original request for bulk analyze. - * @type int $completed_analyses_count - * The number of requested analyses that have completed successfully so far. - * @type int $failed_analyses_count - * The number of requested analyses that have failed so far. - * @type int $total_requested_analyses_count - * Total number of analyses requested. Computed by the number of conversations - * returned by `filter` multiplied by `analysis_percentage` in the request. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors - * Output only. Partial errors during bulk analyze 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); - } - - /** - * 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 request for bulk analyze. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest request = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsRequest|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * The original request for bulk analyze. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest request = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsRequest::class); - $this->request = $var; - - return $this; - } - - /** - * The number of requested analyses that have completed successfully so far. - * - * Generated from protobuf field int32 completed_analyses_count = 4; - * @return int - */ - public function getCompletedAnalysesCount() - { - return $this->completed_analyses_count; - } - - /** - * The number of requested analyses that have completed successfully so far. - * - * Generated from protobuf field int32 completed_analyses_count = 4; - * @param int $var - * @return $this - */ - public function setCompletedAnalysesCount($var) - { - GPBUtil::checkInt32($var); - $this->completed_analyses_count = $var; - - return $this; - } - - /** - * The number of requested analyses that have failed so far. - * - * Generated from protobuf field int32 failed_analyses_count = 5; - * @return int - */ - public function getFailedAnalysesCount() - { - return $this->failed_analyses_count; - } - - /** - * The number of requested analyses that have failed so far. - * - * Generated from protobuf field int32 failed_analyses_count = 5; - * @param int $var - * @return $this - */ - public function setFailedAnalysesCount($var) - { - GPBUtil::checkInt32($var); - $this->failed_analyses_count = $var; - - return $this; - } - - /** - * Total number of analyses requested. Computed by the number of conversations - * returned by `filter` multiplied by `analysis_percentage` in the request. - * - * Generated from protobuf field int32 total_requested_analyses_count = 6; - * @return int - */ - public function getTotalRequestedAnalysesCount() - { - return $this->total_requested_analyses_count; - } - - /** - * Total number of analyses requested. Computed by the number of conversations - * returned by `filter` multiplied by `analysis_percentage` in the request. - * - * Generated from protobuf field int32 total_requested_analyses_count = 6; - * @param int $var - * @return $this - */ - public function setTotalRequestedAnalysesCount($var) - { - GPBUtil::checkInt32($var); - $this->total_requested_analyses_count = $var; - - return $this; - } - - /** - * Output only. Partial errors during bulk analyze operation that might cause - * the operation output to be incomplete. - * - * Generated from protobuf field repeated .google.rpc.Status partial_errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartialErrors() - { - return $this->partial_errors; - } - - /** - * Output only. Partial errors during bulk analyze operation that might cause - * the operation output to be incomplete. - * - * Generated from protobuf field repeated .google.rpc.Status partial_errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsRequest.php deleted file mode 100644 index b73df51d31e4..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest - */ -class BulkAnalyzeConversationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource to create analyses in. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Filter used to select the subset of conversations to analyze. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Required. Percentage of selected conversation to analyze, between - * [0, 100]. - * - * Generated from protobuf field float analysis_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $analysis_percentage = 0.0; - /** - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; - */ - protected $annotator_selector = null; - - /** - * @param string $parent Required. The parent resource to create analyses in. Please see - * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * @param string $filter Required. Filter used to select the subset of conversations to analyze. - * @param float $analysisPercentage Required. Percentage of selected conversation to analyze, between - * [0, 100]. - * - * @return \Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsRequest - * - * @experimental - */ - public static function build(string $parent, string $filter, float $analysisPercentage): self - { - return (new self()) - ->setParent($parent) - ->setFilter($filter) - ->setAnalysisPercentage($analysisPercentage); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource to create analyses in. - * @type string $filter - * Required. Filter used to select the subset of conversations to analyze. - * @type float $analysis_percentage - * Required. Percentage of selected conversation to analyze, between - * [0, 100]. - * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $annotator_selector - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource to create analyses in. - * - * 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 to create analyses in. - * - * 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; - } - - /** - * Required. Filter used to select the subset of conversations to analyze. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. Filter used to select the subset of conversations to analyze. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Required. Percentage of selected conversation to analyze, between - * [0, 100]. - * - * Generated from protobuf field float analysis_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getAnalysisPercentage() - { - return $this->analysis_percentage; - } - - /** - * Required. Percentage of selected conversation to analyze, between - * [0, 100]. - * - * Generated from protobuf field float analysis_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setAnalysisPercentage($var) - { - GPBUtil::checkFloat($var); - $this->analysis_percentage = $var; - - return $this; - } - - /** - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; - * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector|null - */ - public function getAnnotatorSelector() - { - return $this->annotator_selector; - } - - public function hasAnnotatorSelector() - { - return isset($this->annotator_selector); - } - - public function clearAnnotatorSelector() - { - unset($this->annotator_selector); - } - - /** - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 8; - * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $var - * @return $this - */ - public function setAnnotatorSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector::class); - $this->annotator_selector = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsResponse.php deleted file mode 100644 index adccae48897f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkAnalyzeConversationsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse - */ -class BulkAnalyzeConversationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Count of successful analyses. - * - * Generated from protobuf field int32 successful_analysis_count = 1; - */ - protected $successful_analysis_count = 0; - /** - * Count of failed analyses. - * - * Generated from protobuf field int32 failed_analysis_count = 2; - */ - protected $failed_analysis_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $successful_analysis_count - * Count of successful analyses. - * @type int $failed_analysis_count - * Count of failed analyses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Count of successful analyses. - * - * Generated from protobuf field int32 successful_analysis_count = 1; - * @return int - */ - public function getSuccessfulAnalysisCount() - { - return $this->successful_analysis_count; - } - - /** - * Count of successful analyses. - * - * Generated from protobuf field int32 successful_analysis_count = 1; - * @param int $var - * @return $this - */ - public function setSuccessfulAnalysisCount($var) - { - GPBUtil::checkInt32($var); - $this->successful_analysis_count = $var; - - return $this; - } - - /** - * Count of failed analyses. - * - * Generated from protobuf field int32 failed_analysis_count = 2; - * @return int - */ - public function getFailedAnalysisCount() - { - return $this->failed_analysis_count; - } - - /** - * Count of failed analyses. - * - * Generated from protobuf field int32 failed_analysis_count = 2; - * @param int $var - * @return $this - */ - public function setFailedAnalysisCount($var) - { - GPBUtil::checkInt32($var); - $this->failed_analysis_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsMetadata.php deleted file mode 100644 index 753b1ea23b0e..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsMetadata.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata - */ -class BulkDeleteConversationsMetadata 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 request for bulk delete. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest request = 3; - */ - protected $request = null; - /** - * Partial errors during bulk delete conversations 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 - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest $request - * The original request for bulk delete. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors - * Partial errors during bulk delete conversations 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); - } - - /** - * 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 request for bulk delete. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest request = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * The original request for bulk delete. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest request = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest::class); - $this->request = $var; - - return $this; - } - - /** - * Partial errors during bulk delete conversations 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 bulk delete conversations 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsRequest.php deleted file mode 100644 index 90e90424bd7f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest - */ -class BulkDeleteConversationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource to delete conversations from. - * Format: - * projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Filter used to select the subset of conversations to delete. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Maximum number of conversations to delete. - * - * Generated from protobuf field int32 max_delete_count = 3; - */ - protected $max_delete_count = 0; - /** - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * - * Generated from protobuf field bool force = 4; - */ - protected $force = false; - - /** - * @param string $parent Required. The parent resource to delete conversations from. - * Format: - * projects/{project}/locations/{location} - * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * @param string $filter Filter used to select the subset of conversations to delete. - * - * @return \Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsRequest - * - * @experimental - */ - public static function build(string $parent, string $filter): self - { - return (new self()) - ->setParent($parent) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource to delete conversations from. - * Format: - * projects/{project}/locations/{location} - * @type string $filter - * Filter used to select the subset of conversations to delete. - * @type int $max_delete_count - * Maximum number of conversations to delete. - * @type bool $force - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource to delete conversations from. - * Format: - * projects/{project}/locations/{location} - * - * 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 to delete conversations from. - * Format: - * projects/{project}/locations/{location} - * - * 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; - } - - /** - * Filter used to select the subset of conversations to delete. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter used to select the subset of conversations to delete. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Maximum number of conversations to delete. - * - * Generated from protobuf field int32 max_delete_count = 3; - * @return int - */ - public function getMaxDeleteCount() - { - return $this->max_delete_count; - } - - /** - * Maximum number of conversations to delete. - * - * Generated from protobuf field int32 max_delete_count = 3; - * @param int $var - * @return $this - */ - public function setMaxDeleteCount($var) - { - GPBUtil::checkInt32($var); - $this->max_delete_count = $var; - - return $this; - } - - /** - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * - * Generated from protobuf field bool force = 4; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * - * Generated from protobuf field bool force = 4; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsResponse.php deleted file mode 100644 index ca52f6da6873..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/BulkDeleteConversationsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse - */ -class BulkDeleteConversationsResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsRequest.php deleted file mode 100644 index 8daa93a4a679..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest - */ -class CalculateIssueModelStatsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the issue model to query against. - * - * Generated from protobuf field string issue_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $issue_model = ''; - - /** - * @param string $issueModel Required. The resource name of the issue model to query against. Please see - * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\CalculateIssueModelStatsRequest - * - * @experimental - */ - public static function build(string $issueModel): self - { - return (new self()) - ->setIssueModel($issueModel); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issue_model - * Required. The resource name of the issue model to query against. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the issue model to query against. - * - * Generated from protobuf field string issue_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getIssueModel() - { - return $this->issue_model; - } - - /** - * Required. The resource name of the issue model to query against. - * - * Generated from protobuf field string issue_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIssueModel($var) - { - GPBUtil::checkString($var, True); - $this->issue_model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsResponse.php deleted file mode 100644 index 932814766c92..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateIssueModelStatsResponse.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse - */ -class CalculateIssueModelStatsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The latest label statistics for the queried issue model. Includes results - * on both training data and data labeled after deployment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats current_stats = 4; - */ - protected $current_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats $current_stats - * The latest label statistics for the queried issue model. Includes results - * on both training data and data labeled after deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The latest label statistics for the queried issue model. Includes results - * on both training data and data labeled after deployment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats current_stats = 4; - * @return \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats|null - */ - public function getCurrentStats() - { - return $this->current_stats; - } - - public function hasCurrentStats() - { - return isset($this->current_stats); - } - - public function clearCurrentStats() - { - unset($this->current_stats); - } - - /** - * The latest label statistics for the queried issue model. Includes results - * on both training data and data labeled after deployment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats current_stats = 4; - * @param \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats $var - * @return $this - */ - public function setCurrentStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats::class); - $this->current_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsRequest.php deleted file mode 100644 index 5f422bb77f78..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.contactcenterinsights.v1.CalculateStatsRequest - */ -class CalculateStatsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location of the conversations. - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $location = ''; - /** - * A filter to reduce results to a specific subset. This field is useful for - * getting statistics about conversations with specific properties. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - - /** - * @param string $location Required. The location of the conversations. Please see - * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\CalculateStatsRequest - * - * @experimental - */ - public static function build(string $location): self - { - return (new self()) - ->setLocation($location); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * Required. The location of the conversations. - * @type string $filter - * A filter to reduce results to a specific subset. This field is useful for - * getting statistics about conversations with specific properties. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location of the conversations. - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The location of the conversations. - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * A filter to reduce results to a specific subset. This field is useful for - * getting statistics about conversations with specific properties. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter to reduce results to a specific subset. This field is useful for - * getting statistics about conversations with specific properties. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse.php deleted file mode 100644 index 973f3b649b1e..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse.php +++ /dev/null @@ -1,366 +0,0 @@ -google.cloud.contactcenterinsights.v1.CalculateStatsResponse - */ -class CalculateStatsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The average duration of all conversations. The average is calculated using - * only conversations that have a time duration. - * - * Generated from protobuf field .google.protobuf.Duration average_duration = 1; - */ - protected $average_duration = null; - /** - * The average number of turns per conversation. - * - * Generated from protobuf field int32 average_turn_count = 2; - */ - protected $average_turn_count = 0; - /** - * The total number of conversations. - * - * Generated from protobuf field int32 conversation_count = 3; - */ - protected $conversation_count = 0; - /** - * A map associating each smart highlighter display name with its respective - * number of matches in the set of conversations. - * - * Generated from protobuf field map smart_highlighter_matches = 4; - */ - private $smart_highlighter_matches; - /** - * A map associating each custom highlighter resource name with its respective - * number of matches in the set of conversations. - * - * Generated from protobuf field map custom_highlighter_matches = 5; - */ - private $custom_highlighter_matches; - /** - * A map associating each issue resource name with its respective number of - * matches in the set of conversations. Key has the format: - * `projects//locations//issueModels//issues/` - * Deprecated, use `issue_matches_stats` field instead. - * - * Generated from protobuf field map issue_matches = 6 [deprecated = true]; - * @deprecated - */ - private $issue_matches; - /** - * A map associating each issue resource name with its respective number of - * matches in the set of conversations. Key has the format: - * `projects//locations//issueModels//issues/` - * - * Generated from protobuf field map issue_matches_stats = 8; - */ - private $issue_matches_stats; - /** - * A time series representing the count of conversations created over time - * that match that requested filter criteria. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries conversation_count_time_series = 7; - */ - protected $conversation_count_time_series = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $average_duration - * The average duration of all conversations. The average is calculated using - * only conversations that have a time duration. - * @type int $average_turn_count - * The average number of turns per conversation. - * @type int $conversation_count - * The total number of conversations. - * @type array|\Google\Protobuf\Internal\MapField $smart_highlighter_matches - * A map associating each smart highlighter display name with its respective - * number of matches in the set of conversations. - * @type array|\Google\Protobuf\Internal\MapField $custom_highlighter_matches - * A map associating each custom highlighter resource name with its respective - * number of matches in the set of conversations. - * @type array|\Google\Protobuf\Internal\MapField $issue_matches - * A map associating each issue resource name with its respective number of - * matches in the set of conversations. Key has the format: - * `projects//locations//issueModels//issues/` - * Deprecated, use `issue_matches_stats` field instead. - * @type array|\Google\Protobuf\Internal\MapField $issue_matches_stats - * A map associating each issue resource name with its respective number of - * matches in the set of conversations. Key has the format: - * `projects//locations//issueModels//issues/` - * @type \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries $conversation_count_time_series - * A time series representing the count of conversations created over time - * that match that requested filter criteria. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The average duration of all conversations. The average is calculated using - * only conversations that have a time duration. - * - * Generated from protobuf field .google.protobuf.Duration average_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getAverageDuration() - { - return $this->average_duration; - } - - public function hasAverageDuration() - { - return isset($this->average_duration); - } - - public function clearAverageDuration() - { - unset($this->average_duration); - } - - /** - * The average duration of all conversations. The average is calculated using - * only conversations that have a time duration. - * - * Generated from protobuf field .google.protobuf.Duration average_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setAverageDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->average_duration = $var; - - return $this; - } - - /** - * The average number of turns per conversation. - * - * Generated from protobuf field int32 average_turn_count = 2; - * @return int - */ - public function getAverageTurnCount() - { - return $this->average_turn_count; - } - - /** - * The average number of turns per conversation. - * - * Generated from protobuf field int32 average_turn_count = 2; - * @param int $var - * @return $this - */ - public function setAverageTurnCount($var) - { - GPBUtil::checkInt32($var); - $this->average_turn_count = $var; - - return $this; - } - - /** - * The total number of conversations. - * - * Generated from protobuf field int32 conversation_count = 3; - * @return int - */ - public function getConversationCount() - { - return $this->conversation_count; - } - - /** - * The total number of conversations. - * - * Generated from protobuf field int32 conversation_count = 3; - * @param int $var - * @return $this - */ - public function setConversationCount($var) - { - GPBUtil::checkInt32($var); - $this->conversation_count = $var; - - return $this; - } - - /** - * A map associating each smart highlighter display name with its respective - * number of matches in the set of conversations. - * - * Generated from protobuf field map smart_highlighter_matches = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSmartHighlighterMatches() - { - return $this->smart_highlighter_matches; - } - - /** - * A map associating each smart highlighter display name with its respective - * number of matches in the set of conversations. - * - * Generated from protobuf field map smart_highlighter_matches = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSmartHighlighterMatches($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); - $this->smart_highlighter_matches = $arr; - - return $this; - } - - /** - * A map associating each custom highlighter resource name with its respective - * number of matches in the set of conversations. - * - * Generated from protobuf field map custom_highlighter_matches = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCustomHighlighterMatches() - { - return $this->custom_highlighter_matches; - } - - /** - * A map associating each custom highlighter resource name with its respective - * number of matches in the set of conversations. - * - * Generated from protobuf field map custom_highlighter_matches = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCustomHighlighterMatches($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); - $this->custom_highlighter_matches = $arr; - - return $this; - } - - /** - * A map associating each issue resource name with its respective number of - * matches in the set of conversations. Key has the format: - * `projects//locations//issueModels//issues/` - * Deprecated, use `issue_matches_stats` field instead. - * - * Generated from protobuf field map issue_matches = 6 [deprecated = true]; - * @return \Google\Protobuf\Internal\MapField - * @deprecated - */ - public function getIssueMatches() - { - @trigger_error('issue_matches is deprecated.', E_USER_DEPRECATED); - return $this->issue_matches; - } - - /** - * A map associating each issue resource name with its respective number of - * matches in the set of conversations. Key has the format: - * `projects//locations//issueModels//issues/` - * Deprecated, use `issue_matches_stats` field instead. - * - * Generated from protobuf field map issue_matches = 6 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - * @deprecated - */ - public function setIssueMatches($var) - { - @trigger_error('issue_matches is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); - $this->issue_matches = $arr; - - return $this; - } - - /** - * A map associating each issue resource name with its respective number of - * matches in the set of conversations. Key has the format: - * `projects//locations//issueModels//issues/` - * - * Generated from protobuf field map issue_matches_stats = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getIssueMatchesStats() - { - return $this->issue_matches_stats; - } - - /** - * A map associating each issue resource name with its respective number of - * matches in the set of conversations. Key has the format: - * `projects//locations//issueModels//issues/` - * - * Generated from protobuf field map issue_matches_stats = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setIssueMatchesStats($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats\IssueStats::class); - $this->issue_matches_stats = $arr; - - return $this; - } - - /** - * A time series representing the count of conversations created over time - * that match that requested filter criteria. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries conversation_count_time_series = 7; - * @return \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries|null - */ - public function getConversationCountTimeSeries() - { - return $this->conversation_count_time_series; - } - - public function hasConversationCountTimeSeries() - { - return isset($this->conversation_count_time_series); - } - - public function clearConversationCountTimeSeries() - { - unset($this->conversation_count_time_series); - } - - /** - * A time series representing the count of conversations created over time - * that match that requested filter criteria. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries conversation_count_time_series = 7; - * @param \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries $var - * @return $this - */ - public function setConversationCountTimeSeries($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries::class); - $this->conversation_count_time_series = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries.php deleted file mode 100644 index ffe33908677a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries - */ -class TimeSeries extends \Google\Protobuf\Internal\Message -{ - /** - * The duration of each interval. - * - * Generated from protobuf field .google.protobuf.Duration interval_duration = 1; - */ - protected $interval_duration = null; - /** - * An ordered list of intervals from earliest to latest, where each interval - * represents the number of conversations that transpired during the time - * window. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval points = 2; - */ - private $points; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $interval_duration - * The duration of each interval. - * @type array<\Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries\Interval>|\Google\Protobuf\Internal\RepeatedField $points - * An ordered list of intervals from earliest to latest, where each interval - * represents the number of conversations that transpired during the time - * window. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The duration of each interval. - * - * Generated from protobuf field .google.protobuf.Duration interval_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getIntervalDuration() - { - return $this->interval_duration; - } - - public function hasIntervalDuration() - { - return isset($this->interval_duration); - } - - public function clearIntervalDuration() - { - unset($this->interval_duration); - } - - /** - * The duration of each interval. - * - * Generated from protobuf field .google.protobuf.Duration interval_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setIntervalDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->interval_duration = $var; - - return $this; - } - - /** - * An ordered list of intervals from earliest to latest, where each interval - * represents the number of conversations that transpired during the time - * window. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval points = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPoints() - { - return $this->points; - } - - /** - * An ordered list of intervals from earliest to latest, where each interval - * represents the number of conversations that transpired during the time - * window. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval points = 2; - * @param array<\Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries\Interval>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse\TimeSeries\Interval::class); - $this->points = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimeSeries::class, \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse_TimeSeries::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries/Interval.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries/Interval.php deleted file mode 100644 index fd7aa0d92378..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CalculateStatsResponse/TimeSeries/Interval.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval - */ -class Interval extends \Google\Protobuf\Internal\Message -{ - /** - * The start time of this interval. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The number of conversations created in this interval. - * - * Generated from protobuf field int32 conversation_count = 2; - */ - protected $conversation_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The start time of this interval. - * @type int $conversation_count - * The number of conversations created in this interval. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The start time of this interval. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The start time of this interval. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The number of conversations created in this interval. - * - * Generated from protobuf field int32 conversation_count = 2; - * @return int - */ - public function getConversationCount() - { - return $this->conversation_count; - } - - /** - * The number of conversations created in this interval. - * - * Generated from protobuf field int32 conversation_count = 2; - * @param int $var - * @return $this - */ - public function setConversationCount($var) - { - GPBUtil::checkInt32($var); - $this->conversation_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Interval::class, \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse_TimeSeries_Interval::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CallAnnotation.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CallAnnotation.php deleted file mode 100644 index 9b2679366c44..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CallAnnotation.php +++ /dev/null @@ -1,432 +0,0 @@ -google.cloud.contactcenterinsights.v1.CallAnnotation - */ -class CallAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The channel of the audio where the annotation occurs. For single-channel - * audio, this field is not populated. - * - * Generated from protobuf field int32 channel_tag = 1; - */ - protected $channel_tag = 0; - /** - * The boundary in the conversation where the annotation starts, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_start_boundary = 4; - */ - protected $annotation_start_boundary = null; - /** - * The boundary in the conversation where the annotation ends, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_end_boundary = 5; - */ - protected $annotation_end_boundary = null; - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\InterruptionData $interruption_data - * Data specifying an interruption. - * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment_data - * Data specifying sentiment. - * @type \Google\Cloud\ContactCenterInsights\V1\SilenceData $silence_data - * Data specifying silence. - * @type \Google\Cloud\ContactCenterInsights\V1\HoldData $hold_data - * Data specifying a hold. - * @type \Google\Cloud\ContactCenterInsights\V1\EntityMentionData $entity_mention_data - * Data specifying an entity mention. - * @type \Google\Cloud\ContactCenterInsights\V1\IntentMatchData $intent_match_data - * Data specifying an intent match. - * @type \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData $phrase_match_data - * Data specifying a phrase match. - * @type \Google\Cloud\ContactCenterInsights\V1\IssueMatchData $issue_match_data - * Data specifying an issue match. - * @type int $channel_tag - * The channel of the audio where the annotation occurs. For single-channel - * audio, this field is not populated. - * @type \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $annotation_start_boundary - * The boundary in the conversation where the annotation starts, inclusive. - * @type \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $annotation_end_boundary - * The boundary in the conversation where the annotation ends, inclusive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Data specifying an interruption. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.InterruptionData interruption_data = 10; - * @return \Google\Cloud\ContactCenterInsights\V1\InterruptionData|null - */ - public function getInterruptionData() - { - return $this->readOneof(10); - } - - public function hasInterruptionData() - { - return $this->hasOneof(10); - } - - /** - * Data specifying an interruption. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.InterruptionData interruption_data = 10; - * @param \Google\Cloud\ContactCenterInsights\V1\InterruptionData $var - * @return $this - */ - public function setInterruptionData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\InterruptionData::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Data specifying sentiment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 11; - * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null - */ - public function getSentimentData() - { - return $this->readOneof(11); - } - - public function hasSentimentData() - { - return $this->hasOneof(11); - } - - /** - * Data specifying sentiment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 11; - * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var - * @return $this - */ - public function setSentimentData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Data specifying silence. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SilenceData silence_data = 12; - * @return \Google\Cloud\ContactCenterInsights\V1\SilenceData|null - */ - public function getSilenceData() - { - return $this->readOneof(12); - } - - public function hasSilenceData() - { - return $this->hasOneof(12); - } - - /** - * Data specifying silence. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SilenceData silence_data = 12; - * @param \Google\Cloud\ContactCenterInsights\V1\SilenceData $var - * @return $this - */ - public function setSilenceData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SilenceData::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Data specifying a hold. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.HoldData hold_data = 13; - * @return \Google\Cloud\ContactCenterInsights\V1\HoldData|null - */ - public function getHoldData() - { - return $this->readOneof(13); - } - - public function hasHoldData() - { - return $this->hasOneof(13); - } - - /** - * Data specifying a hold. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.HoldData hold_data = 13; - * @param \Google\Cloud\ContactCenterInsights\V1\HoldData $var - * @return $this - */ - public function setHoldData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\HoldData::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Data specifying an entity mention. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData entity_mention_data = 15; - * @return \Google\Cloud\ContactCenterInsights\V1\EntityMentionData|null - */ - public function getEntityMentionData() - { - return $this->readOneof(15); - } - - public function hasEntityMentionData() - { - return $this->hasOneof(15); - } - - /** - * Data specifying an entity mention. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData entity_mention_data = 15; - * @param \Google\Cloud\ContactCenterInsights\V1\EntityMentionData $var - * @return $this - */ - public function setEntityMentionData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\EntityMentionData::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Data specifying an intent match. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IntentMatchData intent_match_data = 16; - * @return \Google\Cloud\ContactCenterInsights\V1\IntentMatchData|null - */ - public function getIntentMatchData() - { - return $this->readOneof(16); - } - - public function hasIntentMatchData() - { - return $this->hasOneof(16); - } - - /** - * Data specifying an intent match. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IntentMatchData intent_match_data = 16; - * @param \Google\Cloud\ContactCenterInsights\V1\IntentMatchData $var - * @return $this - */ - public function setIntentMatchData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IntentMatchData::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Data specifying a phrase match. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchData phrase_match_data = 17; - * @return \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData|null - */ - public function getPhraseMatchData() - { - return $this->readOneof(17); - } - - public function hasPhraseMatchData() - { - return $this->hasOneof(17); - } - - /** - * Data specifying a phrase match. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchData phrase_match_data = 17; - * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData $var - * @return $this - */ - public function setPhraseMatchData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchData::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Data specifying an issue match. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueMatchData issue_match_data = 18; - * @return \Google\Cloud\ContactCenterInsights\V1\IssueMatchData|null - */ - public function getIssueMatchData() - { - return $this->readOneof(18); - } - - public function hasIssueMatchData() - { - return $this->hasOneof(18); - } - - /** - * Data specifying an issue match. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueMatchData issue_match_data = 18; - * @param \Google\Cloud\ContactCenterInsights\V1\IssueMatchData $var - * @return $this - */ - public function setIssueMatchData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueMatchData::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * The channel of the audio where the annotation occurs. For single-channel - * audio, this field is not populated. - * - * Generated from protobuf field int32 channel_tag = 1; - * @return int - */ - public function getChannelTag() - { - return $this->channel_tag; - } - - /** - * The channel of the audio where the annotation occurs. For single-channel - * audio, this field is not populated. - * - * Generated from protobuf field int32 channel_tag = 1; - * @param int $var - * @return $this - */ - public function setChannelTag($var) - { - GPBUtil::checkInt32($var); - $this->channel_tag = $var; - - return $this; - } - - /** - * The boundary in the conversation where the annotation starts, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_start_boundary = 4; - * @return \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary|null - */ - public function getAnnotationStartBoundary() - { - return $this->annotation_start_boundary; - } - - public function hasAnnotationStartBoundary() - { - return isset($this->annotation_start_boundary); - } - - public function clearAnnotationStartBoundary() - { - unset($this->annotation_start_boundary); - } - - /** - * The boundary in the conversation where the annotation starts, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_start_boundary = 4; - * @param \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $var - * @return $this - */ - public function setAnnotationStartBoundary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary::class); - $this->annotation_start_boundary = $var; - - return $this; - } - - /** - * The boundary in the conversation where the annotation ends, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_end_boundary = 5; - * @return \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary|null - */ - public function getAnnotationEndBoundary() - { - return $this->annotation_end_boundary; - } - - public function hasAnnotationEndBoundary() - { - return isset($this->annotation_end_boundary); - } - - public function clearAnnotationEndBoundary() - { - unset($this->annotation_end_boundary); - } - - /** - * The boundary in the conversation where the annotation ends, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary annotation_end_boundary = 5; - * @param \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $var - * @return $this - */ - public function setAnnotationEndBoundary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary::class); - $this->annotation_end_boundary = $var; - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation.php deleted file mode 100644 index 1de28cfd8c8d..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation.php +++ /dev/null @@ -1,890 +0,0 @@ -google.cloud.contactcenterinsights.v1.Conversation - */ -class Conversation extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the conversation. - * Format: - * projects/{project}/locations/{location}/conversations/{conversation} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * The source of the audio and transcription for the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationDataSource data_source = 2; - */ - protected $data_source = null; - /** - * Output only. The time at which the conversation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The most recent time at which the conversation was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The time at which the conversation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 17; - */ - protected $start_time = null; - /** - * A user-specified language code for the conversation. - * - * Generated from protobuf field string language_code = 14; - */ - protected $language_code = ''; - /** - * An opaque, user-specified string representing the human agent who handled - * the conversation. - * - * Generated from protobuf field string agent_id = 5; - */ - protected $agent_id = ''; - /** - * A map for the user to specify any custom fields. A maximum of 20 labels per - * conversation is allowed, with a maximum of 256 characters per entry. - * - * Generated from protobuf field map labels = 6; - */ - private $labels; - /** - * Conversation metadata related to quality management. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24; - */ - protected $quality_metadata = null; - /** - * Output only. The conversation transcript. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript transcript = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $transcript = null; - /** - * Immutable. The conversation medium, if unspecified will default to - * PHONE_CALL. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 9 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $medium = 0; - /** - * Output only. The duration of the conversation. - * - * Generated from protobuf field .google.protobuf.Duration duration = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $duration = null; - /** - * Output only. The number of turns in the conversation. - * - * Generated from protobuf field int32 turn_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $turn_count = 0; - /** - * Output only. The conversation's latest analysis, if one exists. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis latest_analysis = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_analysis = null; - /** - * Output only. Latest summary of the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData latest_summary = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_summary = null; - /** - * Output only. The annotations that were generated during the customer and - * agent interaction. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.RuntimeAnnotation runtime_annotations = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $runtime_annotations; - /** - * Output only. All the matched Dialogflow intents in the call. The key - * corresponds to a Dialogflow intent, format: - * projects/{project}/agent/{agent}/intents/{intent} - * - * Generated from protobuf field map dialogflow_intents = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $dialogflow_intents; - /** - * Obfuscated user ID which the customer sent to us. - * - * Generated from protobuf field string obfuscated_user_id = 21; - */ - protected $obfuscated_user_id = ''; - protected $metadata; - protected $expiration; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\Conversation\CallMetadata $call_metadata - * Call-specific metadata. - * @type \Google\Protobuf\Timestamp $expire_time - * The time at which this conversation should expire. After this time, the - * conversation data and any associated analyses will be deleted. - * @type \Google\Protobuf\Duration $ttl - * Input only. The TTL for this resource. If specified, then this TTL will - * be used to calculate the expire time. - * @type string $name - * Immutable. The resource name of the conversation. - * Format: - * projects/{project}/locations/{location}/conversations/{conversation} - * @type \Google\Cloud\ContactCenterInsights\V1\ConversationDataSource $data_source - * The source of the audio and transcription for the conversation. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the conversation was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The most recent time at which the conversation was updated. - * @type \Google\Protobuf\Timestamp $start_time - * The time at which the conversation started. - * @type string $language_code - * A user-specified language code for the conversation. - * @type string $agent_id - * An opaque, user-specified string representing the human agent who handled - * the conversation. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A map for the user to specify any custom fields. A maximum of 20 labels per - * 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 \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript $transcript - * Output only. The conversation transcript. - * @type int $medium - * Immutable. The conversation medium, if unspecified will default to - * PHONE_CALL. - * @type \Google\Protobuf\Duration $duration - * Output only. The duration of the conversation. - * @type int $turn_count - * Output only. The number of turns in the conversation. - * @type \Google\Cloud\ContactCenterInsights\V1\Analysis $latest_analysis - * Output only. The conversation's latest analysis, if one exists. - * @type \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData $latest_summary - * Output only. Latest summary of the conversation. - * @type array<\Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation>|\Google\Protobuf\Internal\RepeatedField $runtime_annotations - * Output only. The annotations that were generated during the customer and - * agent interaction. - * @type array|\Google\Protobuf\Internal\MapField $dialogflow_intents - * Output only. All the matched Dialogflow intents in the call. The key - * corresponds to a Dialogflow intent, format: - * projects/{project}/agent/{agent}/intents/{intent} - * @type string $obfuscated_user_id - * Obfuscated user ID which the customer sent to us. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Call-specific metadata. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.CallMetadata call_metadata = 7; - * @return \Google\Cloud\ContactCenterInsights\V1\Conversation\CallMetadata|null - */ - public function getCallMetadata() - { - return $this->readOneof(7); - } - - public function hasCallMetadata() - { - return $this->hasOneof(7); - } - - /** - * Call-specific metadata. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.CallMetadata call_metadata = 7; - * @param \Google\Cloud\ContactCenterInsights\V1\Conversation\CallMetadata $var - * @return $this - */ - public function setCallMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\CallMetadata::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The time at which this conversation should expire. After this time, the - * conversation data and any associated analyses will be deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 15; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->readOneof(15); - } - - public function hasExpireTime() - { - return $this->hasOneof(15); - } - - /** - * The time at which this conversation should expire. After this time, the - * conversation data and any associated analyses will be deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 15; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Input only. The TTL for this resource. If specified, then this TTL will - * be used to calculate the expire time. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 16 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getTtl() - { - return $this->readOneof(16); - } - - public function hasTtl() - { - return $this->hasOneof(16); - } - - /** - * Input only. The TTL for this resource. If specified, then this TTL will - * be used to calculate the expire time. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 16 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Immutable. The resource name of the conversation. - * Format: - * projects/{project}/locations/{location}/conversations/{conversation} - * - * 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 conversation. - * Format: - * projects/{project}/locations/{location}/conversations/{conversation} - * - * 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; - } - - /** - * The source of the audio and transcription for the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationDataSource data_source = 2; - * @return \Google\Cloud\ContactCenterInsights\V1\ConversationDataSource|null - */ - public function getDataSource() - { - return $this->data_source; - } - - public function hasDataSource() - { - return isset($this->data_source); - } - - public function clearDataSource() - { - unset($this->data_source); - } - - /** - * The source of the audio and transcription for the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationDataSource data_source = 2; - * @param \Google\Cloud\ContactCenterInsights\V1\ConversationDataSource $var - * @return $this - */ - public function setDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ConversationDataSource::class); - $this->data_source = $var; - - return $this; - } - - /** - * Output only. The time at which the conversation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which the conversation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 most recent time at which the conversation was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The most recent time at which the conversation was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The time at which the conversation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 17; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time at which the conversation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 17; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * A user-specified language code for the conversation. - * - * Generated from protobuf field string language_code = 14; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * A user-specified language code for the conversation. - * - * Generated from protobuf field string language_code = 14; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * An opaque, user-specified string representing the human agent who handled - * the conversation. - * - * Generated from protobuf field string agent_id = 5; - * @return string - */ - public function getAgentId() - { - return $this->agent_id; - } - - /** - * An opaque, user-specified string representing the human agent who handled - * the conversation. - * - * Generated from protobuf field string agent_id = 5; - * @param string $var - * @return $this - */ - public function setAgentId($var) - { - GPBUtil::checkString($var, True); - $this->agent_id = $var; - - return $this; - } - - /** - * A map for the user to specify any custom fields. A maximum of 20 labels per - * conversation is allowed, with a maximum of 256 characters per entry. - * - * Generated from protobuf field map labels = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A map for the user to specify any custom fields. A maximum of 20 labels per - * conversation is allowed, with a maximum of 256 characters per entry. - * - * Generated from protobuf field map labels = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Conversation metadata related to quality management. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24; - * @return \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata|null - */ - public function getQualityMetadata() - { - return $this->quality_metadata; - } - - public function hasQualityMetadata() - { - return isset($this->quality_metadata); - } - - public function clearQualityMetadata() - { - unset($this->quality_metadata); - } - - /** - * Conversation metadata related to quality management. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata quality_metadata = 24; - * @param \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata $var - * @return $this - */ - public function setQualityMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\QualityMetadata::class); - $this->quality_metadata = $var; - - return $this; - } - - /** - * Output only. The conversation transcript. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript transcript = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript|null - */ - public function getTranscript() - { - return $this->transcript; - } - - public function hasTranscript() - { - return isset($this->transcript); - } - - public function clearTranscript() - { - unset($this->transcript); - } - - /** - * Output only. The conversation transcript. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript transcript = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript $var - * @return $this - */ - public function setTranscript($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript::class); - $this->transcript = $var; - - return $this; - } - - /** - * Immutable. The conversation medium, if unspecified will default to - * PHONE_CALL. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 9 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getMedium() - { - return $this->medium; - } - - /** - * Immutable. The conversation medium, if unspecified will default to - * PHONE_CALL. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 9 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setMedium($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Medium::class); - $this->medium = $var; - - return $this; - } - - /** - * Output only. The duration of the conversation. - * - * Generated from protobuf field .google.protobuf.Duration duration = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Output only. The duration of the conversation. - * - * Generated from protobuf field .google.protobuf.Duration duration = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Output only. The number of turns in the conversation. - * - * Generated from protobuf field int32 turn_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTurnCount() - { - return $this->turn_count; - } - - /** - * Output only. The number of turns in the conversation. - * - * Generated from protobuf field int32 turn_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTurnCount($var) - { - GPBUtil::checkInt32($var); - $this->turn_count = $var; - - return $this; - } - - /** - * Output only. The conversation's latest analysis, if one exists. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis latest_analysis = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ContactCenterInsights\V1\Analysis|null - */ - public function getLatestAnalysis() - { - return $this->latest_analysis; - } - - public function hasLatestAnalysis() - { - return isset($this->latest_analysis); - } - - public function clearLatestAnalysis() - { - unset($this->latest_analysis); - } - - /** - * Output only. The conversation's latest analysis, if one exists. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis latest_analysis = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ContactCenterInsights\V1\Analysis $var - * @return $this - */ - public function setLatestAnalysis($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Analysis::class); - $this->latest_analysis = $var; - - return $this; - } - - /** - * Output only. Latest summary of the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData latest_summary = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData|null - */ - public function getLatestSummary() - { - return $this->latest_summary; - } - - public function hasLatestSummary() - { - return isset($this->latest_summary); - } - - public function clearLatestSummary() - { - unset($this->latest_summary); - } - - /** - * Output only. Latest summary of the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData latest_summary = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData $var - * @return $this - */ - public function setLatestSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData::class); - $this->latest_summary = $var; - - return $this; - } - - /** - * Output only. The annotations that were generated during the customer and - * agent interaction. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.RuntimeAnnotation runtime_annotations = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRuntimeAnnotations() - { - return $this->runtime_annotations; - } - - /** - * Output only. The annotations that were generated during the customer and - * agent interaction. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.RuntimeAnnotation runtime_annotations = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRuntimeAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation::class); - $this->runtime_annotations = $arr; - - return $this; - } - - /** - * Output only. All the matched Dialogflow intents in the call. The key - * corresponds to a Dialogflow intent, format: - * projects/{project}/agent/{agent}/intents/{intent} - * - * Generated from protobuf field map dialogflow_intents = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDialogflowIntents() - { - return $this->dialogflow_intents; - } - - /** - * Output only. All the matched Dialogflow intents in the call. The key - * corresponds to a Dialogflow intent, format: - * projects/{project}/agent/{agent}/intents/{intent} - * - * Generated from protobuf field map dialogflow_intents = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDialogflowIntents($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\DialogflowIntent::class); - $this->dialogflow_intents = $arr; - - return $this; - } - - /** - * Obfuscated user ID which the customer sent to us. - * - * Generated from protobuf field string obfuscated_user_id = 21; - * @return string - */ - public function getObfuscatedUserId() - { - return $this->obfuscated_user_id; - } - - /** - * Obfuscated user ID which the customer sent to us. - * - * Generated from protobuf field string obfuscated_user_id = 21; - * @param string $var - * @return $this - */ - public function setObfuscatedUserId($var) - { - GPBUtil::checkString($var, True); - $this->obfuscated_user_id = $var; - - return $this; - } - - /** - * @return string - */ - public function getMetadata() - { - return $this->whichOneof("metadata"); - } - - /** - * @return string - */ - public function getExpiration() - { - return $this->whichOneof("expiration"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/CallMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/CallMetadata.php deleted file mode 100644 index 3884e88264b0..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/CallMetadata.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - */ -class CallMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The audio channel that contains the customer. - * - * Generated from protobuf field int32 customer_channel = 1; - */ - protected $customer_channel = 0; - /** - * The audio channel that contains the agent. - * - * Generated from protobuf field int32 agent_channel = 2; - */ - protected $agent_channel = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $customer_channel - * The audio channel that contains the customer. - * @type int $agent_channel - * The audio channel that contains the agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The audio channel that contains the customer. - * - * Generated from protobuf field int32 customer_channel = 1; - * @return int - */ - public function getCustomerChannel() - { - return $this->customer_channel; - } - - /** - * The audio channel that contains the customer. - * - * Generated from protobuf field int32 customer_channel = 1; - * @param int $var - * @return $this - */ - public function setCustomerChannel($var) - { - GPBUtil::checkInt32($var); - $this->customer_channel = $var; - - return $this; - } - - /** - * The audio channel that contains the agent. - * - * Generated from protobuf field int32 agent_channel = 2; - * @return int - */ - public function getAgentChannel() - { - return $this->agent_channel; - } - - /** - * The audio channel that contains the agent. - * - * Generated from protobuf field int32 agent_channel = 2; - * @param int $var - * @return $this - */ - public function setAgentChannel($var) - { - GPBUtil::checkInt32($var); - $this->agent_channel = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CallMetadata::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_CallMetadata::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Medium.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Medium.php deleted file mode 100644 index 21c573d1e54a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Medium.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.contactcenterinsights.v1.Conversation.Medium - */ -class Medium -{ - /** - * Default value, if unspecified will default to PHONE_CALL. - * - * Generated from protobuf enum MEDIUM_UNSPECIFIED = 0; - */ - const MEDIUM_UNSPECIFIED = 0; - /** - * The format for conversations that took place over the phone. - * - * Generated from protobuf enum PHONE_CALL = 1; - */ - const PHONE_CALL = 1; - /** - * The format for conversations that took place over chat. - * - * Generated from protobuf enum CHAT = 2; - */ - const CHAT = 2; - - private static $valueToName = [ - self::MEDIUM_UNSPECIFIED => 'MEDIUM_UNSPECIFIED', - self::PHONE_CALL => 'PHONE_CALL', - self::CHAT => 'CHAT', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Medium::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Medium::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript.php deleted file mode 100644 index 5387fe5354ae..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.contactcenterinsights.v1.Conversation.Transcript - */ -class Transcript extends \Google\Protobuf\Internal\Message -{ - /** - * A list of sequential transcript segments that comprise the conversation. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment transcript_segments = 1; - */ - private $transcript_segments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment>|\Google\Protobuf\Internal\RepeatedField $transcript_segments - * A list of sequential transcript segments that comprise the conversation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A list of sequential transcript segments that comprise the conversation. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment transcript_segments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTranscriptSegments() - { - return $this->transcript_segments; - } - - /** - * A list of sequential transcript segments that comprise the conversation. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment transcript_segments = 1; - * @param array<\Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTranscriptSegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment::class); - $this->transcript_segments = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Transcript::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Transcript::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment.php deleted file mode 100644 index 1c98cf068b8c..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment.php +++ /dev/null @@ -1,406 +0,0 @@ -google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - */ -class TranscriptSegment extends \Google\Protobuf\Internal\Message -{ - /** - * The time that the message occurred, if provided. - * - * Generated from protobuf field .google.protobuf.Timestamp message_time = 6; - */ - protected $message_time = null; - /** - * The text of this segment. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * A confidence estimate between 0.0 and 1.0 of the fidelity of this - * segment. A default value of 0.0 indicates that the value is unset. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * A list of the word-specific information for each word in the segment. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo words = 3; - */ - private $words; - /** - * The language code of this segment as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * Example: "en-US". - * - * Generated from protobuf field string language_code = 4; - */ - protected $language_code = ''; - /** - * For conversations derived from multi-channel audio, this is the channel - * number corresponding to the audio from that channel. For - * audioChannelCount = N, its output values can range from '1' to 'N'. A - * channel tag of 0 indicates that the audio is mono. - * - * Generated from protobuf field int32 channel_tag = 5; - */ - protected $channel_tag = 0; - /** - * The participant of this segment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant segment_participant = 9; - */ - protected $segment_participant = null; - /** - * CCAI metadata relating to the current transcript segment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata dialogflow_segment_metadata = 10; - */ - protected $dialogflow_segment_metadata = null; - /** - * The sentiment for this transcript segment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 11; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $message_time - * The time that the message occurred, if provided. - * @type string $text - * The text of this segment. - * @type float $confidence - * A confidence estimate between 0.0 and 1.0 of the fidelity of this - * segment. A default value of 0.0 indicates that the value is unset. - * @type array<\Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\WordInfo>|\Google\Protobuf\Internal\RepeatedField $words - * A list of the word-specific information for each word in the segment. - * @type string $language_code - * The language code of this segment as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * Example: "en-US". - * @type int $channel_tag - * For conversations derived from multi-channel audio, this is the channel - * number corresponding to the audio from that channel. For - * audioChannelCount = N, its output values can range from '1' to 'N'. A - * channel tag of 0 indicates that the audio is mono. - * @type \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant $segment_participant - * The participant of this segment. - * @type \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata $dialogflow_segment_metadata - * CCAI metadata relating to the current transcript segment. - * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment - * The sentiment for this transcript segment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The time that the message occurred, if provided. - * - * Generated from protobuf field .google.protobuf.Timestamp message_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getMessageTime() - { - return $this->message_time; - } - - public function hasMessageTime() - { - return isset($this->message_time); - } - - public function clearMessageTime() - { - unset($this->message_time); - } - - /** - * The time that the message occurred, if provided. - * - * Generated from protobuf field .google.protobuf.Timestamp message_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setMessageTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->message_time = $var; - - return $this; - } - - /** - * The text of this segment. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The text of this segment. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * A confidence estimate between 0.0 and 1.0 of the fidelity of this - * segment. A default value of 0.0 indicates that the value is unset. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * A confidence estimate between 0.0 and 1.0 of the fidelity of this - * segment. A default value of 0.0 indicates that the value is unset. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * A list of the word-specific information for each word in the segment. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo words = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWords() - { - return $this->words; - } - - /** - * A list of the word-specific information for each word in the segment. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo words = 3; - * @param array<\Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\WordInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\WordInfo::class); - $this->words = $arr; - - return $this; - } - - /** - * The language code of this segment as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * Example: "en-US". - * - * Generated from protobuf field string language_code = 4; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language code of this segment as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * Example: "en-US". - * - * Generated from protobuf field string language_code = 4; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * For conversations derived from multi-channel audio, this is the channel - * number corresponding to the audio from that channel. For - * audioChannelCount = N, its output values can range from '1' to 'N'. A - * channel tag of 0 indicates that the audio is mono. - * - * Generated from protobuf field int32 channel_tag = 5; - * @return int - */ - public function getChannelTag() - { - return $this->channel_tag; - } - - /** - * For conversations derived from multi-channel audio, this is the channel - * number corresponding to the audio from that channel. For - * audioChannelCount = N, its output values can range from '1' to 'N'. A - * channel tag of 0 indicates that the audio is mono. - * - * Generated from protobuf field int32 channel_tag = 5; - * @param int $var - * @return $this - */ - public function setChannelTag($var) - { - GPBUtil::checkInt32($var); - $this->channel_tag = $var; - - return $this; - } - - /** - * The participant of this segment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant segment_participant = 9; - * @return \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant|null - */ - public function getSegmentParticipant() - { - return $this->segment_participant; - } - - public function hasSegmentParticipant() - { - return isset($this->segment_participant); - } - - public function clearSegmentParticipant() - { - unset($this->segment_participant); - } - - /** - * The participant of this segment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant segment_participant = 9; - * @param \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant $var - * @return $this - */ - public function setSegmentParticipant($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant::class); - $this->segment_participant = $var; - - return $this; - } - - /** - * CCAI metadata relating to the current transcript segment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata dialogflow_segment_metadata = 10; - * @return \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata|null - */ - public function getDialogflowSegmentMetadata() - { - return $this->dialogflow_segment_metadata; - } - - public function hasDialogflowSegmentMetadata() - { - return isset($this->dialogflow_segment_metadata); - } - - public function clearDialogflowSegmentMetadata() - { - unset($this->dialogflow_segment_metadata); - } - - /** - * CCAI metadata relating to the current transcript segment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata dialogflow_segment_metadata = 10; - * @param \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata $var - * @return $this - */ - public function setDialogflowSegmentMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata::class); - $this->dialogflow_segment_metadata = $var; - - return $this; - } - - /** - * The sentiment for this transcript segment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 11; - * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * The sentiment for this transcript segment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 11; - * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); - $this->sentiment = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TranscriptSegment::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Transcript_TranscriptSegment::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/DialogflowSegmentMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/DialogflowSegmentMetadata.php deleted file mode 100644 index 86b130b36b18..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/DialogflowSegmentMetadata.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - */ -class DialogflowSegmentMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Whether the transcript segment was covered under the configured smart - * reply allowlist in Agent Assist. - * - * Generated from protobuf field bool smart_reply_allowlist_covered = 1; - */ - protected $smart_reply_allowlist_covered = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $smart_reply_allowlist_covered - * Whether the transcript segment was covered under the configured smart - * reply allowlist in Agent Assist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Whether the transcript segment was covered under the configured smart - * reply allowlist in Agent Assist. - * - * Generated from protobuf field bool smart_reply_allowlist_covered = 1; - * @return bool - */ - public function getSmartReplyAllowlistCovered() - { - return $this->smart_reply_allowlist_covered; - } - - /** - * Whether the transcript segment was covered under the configured smart - * reply allowlist in Agent Assist. - * - * Generated from protobuf field bool smart_reply_allowlist_covered = 1; - * @param bool $var - * @return $this - */ - public function setSmartReplyAllowlistCovered($var) - { - GPBUtil::checkBool($var); - $this->smart_reply_allowlist_covered = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DialogflowSegmentMetadata::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Transcript_TranscriptSegment_DialogflowSegmentMetadata::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/WordInfo.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/WordInfo.php deleted file mode 100644 index 8070e337828e..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Conversation/Transcript/TranscriptSegment/WordInfo.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - */ -class WordInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Time offset of the start of this word relative to the beginning of - * the total conversation. - * - * Generated from protobuf field .google.protobuf.Duration start_offset = 1; - */ - protected $start_offset = null; - /** - * Time offset of the end of this word relative to the beginning of the - * total conversation. - * - * Generated from protobuf field .google.protobuf.Duration end_offset = 2; - */ - protected $end_offset = null; - /** - * The word itself. Includes punctuation marks that surround the word. - * - * Generated from protobuf field string word = 3; - */ - protected $word = ''; - /** - * A confidence estimate between 0.0 and 1.0 of the fidelity of this - * word. A default value of 0.0 indicates that the value is unset. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $start_offset - * Time offset of the start of this word relative to the beginning of - * the total conversation. - * @type \Google\Protobuf\Duration $end_offset - * Time offset of the end of this word relative to the beginning of the - * total conversation. - * @type string $word - * The word itself. Includes punctuation marks that surround the word. - * @type float $confidence - * A confidence estimate between 0.0 and 1.0 of the fidelity of this - * word. A default value of 0.0 indicates that the value is unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Time offset of the start of this word relative to the beginning of - * the total conversation. - * - * Generated from protobuf field .google.protobuf.Duration start_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getStartOffset() - { - return $this->start_offset; - } - - public function hasStartOffset() - { - return isset($this->start_offset); - } - - public function clearStartOffset() - { - unset($this->start_offset); - } - - /** - * Time offset of the start of this word relative to the beginning of - * the total conversation. - * - * Generated from protobuf field .google.protobuf.Duration start_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_offset = $var; - - return $this; - } - - /** - * Time offset of the end of this word relative to the beginning of the - * total conversation. - * - * Generated from protobuf field .google.protobuf.Duration end_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getEndOffset() - { - return $this->end_offset; - } - - public function hasEndOffset() - { - return isset($this->end_offset); - } - - public function clearEndOffset() - { - unset($this->end_offset); - } - - /** - * Time offset of the end of this word relative to the beginning of the - * total conversation. - * - * Generated from protobuf field .google.protobuf.Duration end_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_offset = $var; - - return $this; - } - - /** - * The word itself. Includes punctuation marks that surround the word. - * - * Generated from protobuf field string word = 3; - * @return string - */ - public function getWord() - { - return $this->word; - } - - /** - * The word itself. Includes punctuation marks that surround the word. - * - * Generated from protobuf field string word = 3; - * @param string $var - * @return $this - */ - public function setWord($var) - { - GPBUtil::checkString($var, True); - $this->word = $var; - - return $this; - } - - /** - * A confidence estimate between 0.0 and 1.0 of the fidelity of this - * word. A default value of 0.0 indicates that the value is unset. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * A confidence estimate between 0.0 and 1.0 of the fidelity of this - * word. A default value of 0.0 indicates that the value is unset. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WordInfo::class, \Google\Cloud\ContactCenterInsights\V1\Conversation_Transcript_TranscriptSegment_WordInfo::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationDataSource.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationDataSource.php deleted file mode 100644 index 13fa956a91a1..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationDataSource.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.contactcenterinsights.v1.ConversationDataSource - */ -class ConversationDataSource extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\GcsSource $gcs_source - * A Cloud Storage location specification for the audio and transcript. - * @type \Google\Cloud\ContactCenterInsights\V1\DialogflowSource $dialogflow_source - * The source when the conversation comes from Dialogflow. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A Cloud Storage location specification for the audio and transcript. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.GcsSource gcs_source = 1; - * @return \Google\Cloud\ContactCenterInsights\V1\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * A Cloud Storage location specification for the audio and transcript. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.GcsSource gcs_source = 1; - * @param \Google\Cloud\ContactCenterInsights\V1\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\GcsSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The source when the conversation comes from Dialogflow. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DialogflowSource dialogflow_source = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\DialogflowSource|null - */ - public function getDialogflowSource() - { - return $this->readOneof(3); - } - - public function hasDialogflowSource() - { - return $this->hasOneof(3); - } - - /** - * The source when the conversation comes from Dialogflow. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DialogflowSource dialogflow_source = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\DialogflowSource $var - * @return $this - */ - public function setDialogflowSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\DialogflowSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationLevelSentiment.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationLevelSentiment.php deleted file mode 100644 index c716a63ac554..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationLevelSentiment.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.contactcenterinsights.v1.ConversationLevelSentiment - */ -class ConversationLevelSentiment extends \Google\Protobuf\Internal\Message -{ - /** - * The channel of the audio that the data applies to. - * - * Generated from protobuf field int32 channel_tag = 1; - */ - protected $channel_tag = 0; - /** - * Data specifying sentiment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 2; - */ - protected $sentiment_data = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $channel_tag - * The channel of the audio that the data applies to. - * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment_data - * Data specifying sentiment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The channel of the audio that the data applies to. - * - * Generated from protobuf field int32 channel_tag = 1; - * @return int - */ - public function getChannelTag() - { - return $this->channel_tag; - } - - /** - * The channel of the audio that the data applies to. - * - * Generated from protobuf field int32 channel_tag = 1; - * @param int $var - * @return $this - */ - public function setChannelTag($var) - { - GPBUtil::checkInt32($var); - $this->channel_tag = $var; - - return $this; - } - - /** - * Data specifying sentiment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 2; - * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null - */ - public function getSentimentData() - { - return $this->sentiment_data; - } - - public function hasSentimentData() - { - return isset($this->sentiment_data); - } - - public function clearSentimentData() - { - unset($this->sentiment_data); - } - - /** - * Data specifying sentiment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 2; - * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var - * @return $this - */ - public function setSentimentData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); - $this->sentiment_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant.php deleted file mode 100644 index 88a7157efd55..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.contactcenterinsights.v1.ConversationParticipant - */ -class ConversationParticipant extends \Google\Protobuf\Internal\Message -{ - /** - * Deprecated. Use `dialogflow_participant_name` instead. - * The name of the Dialogflow participant. Format: - * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * - * Generated from protobuf field string dialogflow_participant = 1 [deprecated = true]; - * @deprecated - */ - protected $dialogflow_participant = ''; - /** - * Obfuscated user ID from Dialogflow. - * - * Generated from protobuf field string obfuscated_external_user_id = 3; - */ - protected $obfuscated_external_user_id = ''; - /** - * The role of the participant. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role = 2; - */ - protected $role = 0; - protected $participant; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dialogflow_participant_name - * The name of the participant provided by Dialogflow. Format: - * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * @type string $user_id - * A user-specified ID representing the participant. - * @type string $dialogflow_participant - * Deprecated. Use `dialogflow_participant_name` instead. - * The name of the Dialogflow participant. Format: - * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * @type string $obfuscated_external_user_id - * Obfuscated user ID from Dialogflow. - * @type int $role - * The role of the participant. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the participant provided by Dialogflow. Format: - * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * - * Generated from protobuf field string dialogflow_participant_name = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getDialogflowParticipantName() - { - return $this->readOneof(5); - } - - public function hasDialogflowParticipantName() - { - return $this->hasOneof(5); - } - - /** - * The name of the participant provided by Dialogflow. Format: - * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * - * Generated from protobuf field string dialogflow_participant_name = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDialogflowParticipantName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A user-specified ID representing the participant. - * - * Generated from protobuf field string user_id = 6; - * @return string - */ - public function getUserId() - { - return $this->readOneof(6); - } - - public function hasUserId() - { - return $this->hasOneof(6); - } - - /** - * A user-specified ID representing the participant. - * - * Generated from protobuf field string user_id = 6; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Deprecated. Use `dialogflow_participant_name` instead. - * The name of the Dialogflow participant. Format: - * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * - * Generated from protobuf field string dialogflow_participant = 1 [deprecated = true]; - * @return string - * @deprecated - */ - public function getDialogflowParticipant() - { - @trigger_error('dialogflow_participant is deprecated.', E_USER_DEPRECATED); - return $this->dialogflow_participant; - } - - /** - * Deprecated. Use `dialogflow_participant_name` instead. - * The name of the Dialogflow participant. Format: - * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * - * Generated from protobuf field string dialogflow_participant = 1 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setDialogflowParticipant($var) - { - @trigger_error('dialogflow_participant is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->dialogflow_participant = $var; - - return $this; - } - - /** - * Obfuscated user ID from Dialogflow. - * - * Generated from protobuf field string obfuscated_external_user_id = 3; - * @return string - */ - public function getObfuscatedExternalUserId() - { - return $this->obfuscated_external_user_id; - } - - /** - * Obfuscated user ID from Dialogflow. - * - * Generated from protobuf field string obfuscated_external_user_id = 3; - * @param string $var - * @return $this - */ - public function setObfuscatedExternalUserId($var) - { - GPBUtil::checkString($var, True); - $this->obfuscated_external_user_id = $var; - - return $this; - } - - /** - * The role of the participant. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role = 2; - * @return int - */ - public function getRole() - { - return $this->role; - } - - /** - * The role of the participant. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role = 2; - * @param int $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant\Role::class); - $this->role = $var; - - return $this; - } - - /** - * @return string - */ - public function getParticipant() - { - return $this->whichOneof("participant"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant/Role.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant/Role.php deleted file mode 100644 index e90baab44257..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationParticipant/Role.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.contactcenterinsights.v1.ConversationParticipant.Role - */ -class Role -{ - /** - * Participant's role is not set. - * - * Generated from protobuf enum ROLE_UNSPECIFIED = 0; - */ - const ROLE_UNSPECIFIED = 0; - /** - * Participant is a human agent. - * - * Generated from protobuf enum HUMAN_AGENT = 1; - */ - const HUMAN_AGENT = 1; - /** - * Participant is an automated agent. - * - * Generated from protobuf enum AUTOMATED_AGENT = 2; - */ - const AUTOMATED_AGENT = 2; - /** - * Participant is an end user who conversed with the contact center. - * - * Generated from protobuf enum END_USER = 3; - */ - const END_USER = 3; - /** - * Participant is either a human or automated agent. - * - * Generated from protobuf enum ANY_AGENT = 4; - */ - const ANY_AGENT = 4; - - private static $valueToName = [ - self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', - self::HUMAN_AGENT => 'HUMAN_AGENT', - self::AUTOMATED_AGENT => 'AUTOMATED_AGENT', - self::END_USER => 'END_USER', - self::ANY_AGENT => 'ANY_AGENT', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Role::class, \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant_Role::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationSummarizationSuggestionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationSummarizationSuggestionData.php deleted file mode 100644 index d4f5e94ae1eb..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationSummarizationSuggestionData.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData - */ -class ConversationSummarizationSuggestionData extends \Google\Protobuf\Internal\Message -{ - /** - * The summarization content that is concatenated into one string. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * The summarization content that is divided into sections. The key is the - * section's name and the value is the section's content. There is no - * specific format for the key or value. - * - * Generated from protobuf field map text_sections = 5; - */ - private $text_sections; - /** - * The confidence score of the summarization. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * A map that contains metadata about the summarization and the document - * from which it originates. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string answer_record = 4; - */ - protected $answer_record = ''; - /** - * The name of the model that generates this summary. - * Format: - * projects/{project}/locations/{location}/conversationModels/{conversation_model} - * - * Generated from protobuf field string conversation_model = 6; - */ - protected $conversation_model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The summarization content that is concatenated into one string. - * @type array|\Google\Protobuf\Internal\MapField $text_sections - * The summarization content that is divided into sections. The key is the - * section's name and the value is the section's content. There is no - * specific format for the key or value. - * @type float $confidence - * The confidence score of the summarization. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * A map that contains metadata about the summarization and the document - * from which it originates. - * @type string $answer_record - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * @type string $conversation_model - * The name of the model that generates this summary. - * Format: - * projects/{project}/locations/{location}/conversationModels/{conversation_model} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The summarization content that is concatenated into one string. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The summarization content that is concatenated into one string. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * The summarization content that is divided into sections. The key is the - * section's name and the value is the section's content. There is no - * specific format for the key or value. - * - * Generated from protobuf field map text_sections = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTextSections() - { - return $this->text_sections; - } - - /** - * The summarization content that is divided into sections. The key is the - * section's name and the value is the section's content. There is no - * specific format for the key or value. - * - * Generated from protobuf field map text_sections = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTextSections($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->text_sections = $arr; - - return $this; - } - - /** - * The confidence score of the summarization. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The confidence score of the summarization. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * A map that contains metadata about the summarization and the document - * from which it originates. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * A map that contains metadata about the summarization and the document - * from which it originates. - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string answer_record = 4; - * @return string - */ - public function getAnswerRecord() - { - return $this->answer_record; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string answer_record = 4; - * @param string $var - * @return $this - */ - public function setAnswerRecord($var) - { - GPBUtil::checkString($var, True); - $this->answer_record = $var; - - return $this; - } - - /** - * The name of the model that generates this summary. - * Format: - * projects/{project}/locations/{location}/conversationModels/{conversation_model} - * - * Generated from protobuf field string conversation_model = 6; - * @return string - */ - public function getConversationModel() - { - return $this->conversation_model; - } - - /** - * The name of the model that generates this summary. - * Format: - * projects/{project}/locations/{location}/conversationModels/{conversation_model} - * - * Generated from protobuf field string conversation_model = 6; - * @param string $var - * @return $this - */ - public function setConversationModel($var) - { - GPBUtil::checkString($var, True); - $this->conversation_model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationView.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationView.php deleted file mode 100644 index de0d08f51b29..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ConversationView.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.contactcenterinsights.v1.ConversationView - */ -class ConversationView -{ - /** - * The conversation view is not specified. - * * Defaults to `FULL` in `GetConversationRequest`. - * * Defaults to `BASIC` in `ListConversationsRequest`. - * - * Generated from protobuf enum CONVERSATION_VIEW_UNSPECIFIED = 0; - */ - const CONVERSATION_VIEW_UNSPECIFIED = 0; - /** - * Populates all fields in the conversation. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - /** - * Populates all fields in the conversation except the transcript. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - - private static $valueToName = [ - self::CONVERSATION_VIEW_UNSPECIFIED => 'CONVERSATION_VIEW_UNSPECIFIED', - self::FULL => 'FULL', - self::BASIC => 'BASIC', - ]; - - 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisOperationMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisOperationMetadata.php deleted file mode 100644 index 7afe57a43f92..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisOperationMetadata.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata - */ -class CreateAnalysisOperationMetadata 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 Conversation that this Analysis Operation belongs to. - * - * Generated from protobuf field string conversation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $conversation = ''; - /** - * Output only. The annotator selector used for the analysis (if any). - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $annotator_selector = null; - - /** - * 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 string $conversation - * Output only. The Conversation that this Analysis Operation belongs to. - * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $annotator_selector - * Output only. The annotator selector used for the analysis (if any). - * } - */ - 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 Conversation that this Analysis Operation belongs to. - * - * Generated from protobuf field string conversation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getConversation() - { - return $this->conversation; - } - - /** - * Output only. The Conversation that this Analysis Operation belongs to. - * - * Generated from protobuf field string conversation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setConversation($var) - { - GPBUtil::checkString($var, True); - $this->conversation = $var; - - return $this; - } - - /** - * Output only. The annotator selector used for the analysis (if any). - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector|null - */ - public function getAnnotatorSelector() - { - return $this->annotator_selector; - } - - public function hasAnnotatorSelector() - { - return isset($this->annotator_selector); - } - - public function clearAnnotatorSelector() - { - unset($this->annotator_selector); - } - - /** - * Output only. The annotator selector used for the analysis (if any). - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $var - * @return $this - */ - public function setAnnotatorSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector::class); - $this->annotator_selector = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisRequest.php deleted file mode 100644 index 08fb29f0ae68..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateAnalysisRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.contactcenterinsights.v1.CreateAnalysisRequest - */ -class CreateAnalysisRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the analysis. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The analysis to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $analysis = null; - - /** - * @param string $parent Required. The parent resource of the analysis. Please see - * {@see ContactCenterInsightsClient::conversationName()} for help formatting this field. - * @param \Google\Cloud\ContactCenterInsights\V1\Analysis $analysis Required. The analysis to create. - * - * @return \Google\Cloud\ContactCenterInsights\V1\CreateAnalysisRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\Analysis $analysis): self - { - return (new self()) - ->setParent($parent) - ->setAnalysis($analysis); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the analysis. - * @type \Google\Cloud\ContactCenterInsights\V1\Analysis $analysis - * Required. The analysis to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the analysis. - * - * 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 analysis. - * - * 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; - } - - /** - * Required. The analysis to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\Analysis|null - */ - public function getAnalysis() - { - return $this->analysis; - } - - public function hasAnalysis() - { - return isset($this->analysis); - } - - public function clearAnalysis() - { - unset($this->analysis); - } - - /** - * Required. The analysis to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\Analysis $var - * @return $this - */ - public function setAnalysis($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Analysis::class); - $this->analysis = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateConversationRequest.php deleted file mode 100644 index b0ee61eaae6c..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateConversationRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.contactcenterinsights.v1.CreateConversationRequest - */ -class CreateConversationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the conversation. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The conversation resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation = null; - /** - * A unique ID for the new conversation. This ID will become the final - * component of the conversation's resource name. If no ID is specified, a - * server-generated ID will be used. - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * - * Generated from protobuf field string conversation_id = 3; - */ - protected $conversation_id = ''; - - /** - * @param string $parent Required. The parent resource of the conversation. Please see - * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation Required. The conversation resource to create. - * @param string $conversationId A unique ID for the new conversation. This ID will become the final - * component of the conversation's resource name. If no ID is specified, a - * server-generated ID will be used. - * - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * - * @return \Google\Cloud\ContactCenterInsights\V1\CreateConversationRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation, string $conversationId): self - { - return (new self()) - ->setParent($parent) - ->setConversation($conversation) - ->setConversationId($conversationId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the conversation. - * @type \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation - * Required. The conversation resource to create. - * @type string $conversation_id - * A unique ID for the new conversation. This ID will become the final - * component of the conversation's resource name. If no ID is specified, a - * server-generated ID will be used. - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the conversation. - * - * 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 conversation. - * - * 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; - } - - /** - * Required. The conversation resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\Conversation|null - */ - public function getConversation() - { - return $this->conversation; - } - - public function hasConversation() - { - return isset($this->conversation); - } - - public function clearConversation() - { - unset($this->conversation); - } - - /** - * Required. The conversation resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\Conversation $var - * @return $this - */ - public function setConversation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation::class); - $this->conversation = $var; - - return $this; - } - - /** - * A unique ID for the new conversation. This ID will become the final - * component of the conversation's resource name. If no ID is specified, a - * server-generated ID will be used. - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * - * Generated from protobuf field string conversation_id = 3; - * @return string - */ - public function getConversationId() - { - return $this->conversation_id; - } - - /** - * A unique ID for the new conversation. This ID will become the final - * component of the conversation's resource name. If no ID is specified, a - * server-generated ID will be used. - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * - * Generated from protobuf field string conversation_id = 3; - * @param string $var - * @return $this - */ - public function setConversationId($var) - { - GPBUtil::checkString($var, True); - $this->conversation_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelMetadata.php deleted file mode 100644 index 17845309a6c8..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata - */ -class CreateIssueModelMetadata 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; - /** - * The original request for creation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CreateIssueModelRequest request = 3; - */ - protected $request = null; - - /** - * 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\CreateIssueModelRequest $request - * The original request for creation. - * } - */ - 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; - } - - /** - * The original request for creation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CreateIssueModelRequest request = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\CreateIssueModelRequest|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * The original request for creation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.CreateIssueModelRequest request = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\CreateIssueModelRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\CreateIssueModelRequest::class); - $this->request = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelRequest.php deleted file mode 100644 index 8b1409a079c1..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateIssueModelRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.contactcenterinsights.v1.CreateIssueModelRequest - */ -class CreateIssueModelRequest 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 = ''; - /** - * Required. The issue model to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $issue_model = null; - - /** - * @param string $parent Required. The parent resource of the issue model. Please see - * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel $issueModel Required. The issue model to create. - * - * @return \Google\Cloud\ContactCenterInsights\V1\CreateIssueModelRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\IssueModel $issueModel): self - { - return (new self()) - ->setParent($parent) - ->setIssueModel($issueModel); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the issue model. - * @type \Google\Cloud\ContactCenterInsights\V1\IssueModel $issue_model - * Required. The issue model to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * 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; - } - - /** - * Required. The issue model to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\IssueModel|null - */ - public function getIssueModel() - { - return $this->issue_model; - } - - public function hasIssueModel() - { - return isset($this->issue_model); - } - - public function clearIssueModel() - { - unset($this->issue_model); - } - - /** - * Required. The issue model to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel $var - * @return $this - */ - public function setIssueModel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel::class); - $this->issue_model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreatePhraseMatcherRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreatePhraseMatcherRequest.php deleted file mode 100644 index e92bfabbf423..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreatePhraseMatcherRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest - */ -class CreatePhraseMatcherRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the phrase matcher. Required. The location - * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The phrase matcher resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $phrase_matcher = null; - - /** - * @param string $parent Required. The parent resource of the phrase matcher. Required. The location - * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` - * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phraseMatcher Required. The phrase matcher resource to create. - * - * @return \Google\Cloud\ContactCenterInsights\V1\CreatePhraseMatcherRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phraseMatcher): self - { - return (new self()) - ->setParent($parent) - ->setPhraseMatcher($phraseMatcher); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the phrase matcher. Required. The location - * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` - * @type \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phrase_matcher - * Required. The phrase matcher resource to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the phrase matcher. Required. The location - * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` - * - * 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 phrase matcher. Required. The location - * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` - * - * 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; - } - - /** - * Required. The phrase matcher resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher|null - */ - public function getPhraseMatcher() - { - return $this->phrase_matcher; - } - - public function hasPhraseMatcher() - { - return isset($this->phrase_matcher); - } - - public function clearPhraseMatcher() - { - unset($this->phrase_matcher); - } - - /** - * Required. The phrase matcher resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $var - * @return $this - */ - public function setPhraseMatcher($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher::class); - $this->phrase_matcher = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateViewRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateViewRequest.php deleted file mode 100644 index f87e03ecb161..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/CreateViewRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.contactcenterinsights.v1.CreateViewRequest - */ -class CreateViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the view. Required. The location to create - * a view for. - * Format: `projects//locations/` or - * `projects//locations/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The view resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view = null; - - /** - * @param string $parent Required. The parent resource of the view. Required. The location to create - * a view for. - * Format: `projects//locations/` or - * `projects//locations/` - * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\ContactCenterInsights\V1\View $view Required. The view resource to create. - * - * @return \Google\Cloud\ContactCenterInsights\V1\CreateViewRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ContactCenterInsights\V1\View $view): self - { - return (new self()) - ->setParent($parent) - ->setView($view); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the view. Required. The location to create - * a view for. - * Format: `projects//locations/` or - * `projects//locations/` - * @type \Google\Cloud\ContactCenterInsights\V1\View $view - * Required. The view resource to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the view. Required. The location to create - * a view for. - * Format: `projects//locations/` or - * `projects//locations/` - * - * 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 view. Required. The location to create - * a view for. - * Format: `projects//locations/` or - * `projects//locations/` - * - * 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; - } - - /** - * Required. The view resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\View|null - */ - public function getView() - { - return $this->view; - } - - public function hasView() - { - return isset($this->view); - } - - public function clearView() - { - unset($this->view); - } - - /** - * Required. The view resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\View $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\View::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteAnalysisRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteAnalysisRequest.php deleted file mode 100644 index b8265d5a574d..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteAnalysisRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest - */ -class DeleteAnalysisRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the analysis to delete. - * - * 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 analysis to delete. Please see - * {@see ContactCenterInsightsClient::analysisName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\DeleteAnalysisRequest - * - * @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 analysis to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the analysis to delete. - * - * 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 analysis to delete. - * - * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteConversationRequest.php deleted file mode 100644 index 78a161a7339e..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteConversationRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeleteConversationRequest - */ -class DeleteConversationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the conversation to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the conversation to delete. Please see - * {@see ContactCenterInsightsClient::conversationName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\DeleteConversationRequest - * - * @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 conversation to delete. - * @type bool $force - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the conversation to delete. - * - * 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 conversation to delete. - * - * 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; - } - - /** - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelMetadata.php deleted file mode 100644 index 87dafed4f5f2..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata - */ -class DeleteIssueModelMetadata 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; - /** - * The original request for deletion. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest request = 3; - */ - protected $request = null; - - /** - * 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\DeleteIssueModelRequest $request - * The original request for deletion. - * } - */ - 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; - } - - /** - * The original request for deletion. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest request = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelRequest|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * The original request for deletion. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest request = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelRequest::class); - $this->request = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelRequest.php deleted file mode 100644 index 7c7da6389c8d..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueModelRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest - */ -class DeleteIssueModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the issue model to delete. - * - * 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 issue model to delete. Please see - * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelRequest - * - * @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 issue model to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the issue model to delete. - * - * 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 issue model to delete. - * - * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueRequest.php deleted file mode 100644 index 8096f2bda03b..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteIssueRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeleteIssueRequest - */ -class DeleteIssueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the issue to delete. - * - * 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 issue to delete. Please see - * {@see ContactCenterInsightsClient::issueName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\DeleteIssueRequest - * - * @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 issue to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the issue to delete. - * - * 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 issue to delete. - * - * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeletePhraseMatcherRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeletePhraseMatcherRequest.php deleted file mode 100644 index b3ea8b0caeb4..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeletePhraseMatcherRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest - */ -class DeletePhraseMatcherRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the phrase matcher to delete. - * - * 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 phrase matcher to delete. Please see - * {@see ContactCenterInsightsClient::phraseMatcherName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\DeletePhraseMatcherRequest - * - * @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 phrase matcher to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the phrase matcher to delete. - * - * 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 phrase matcher to delete. - * - * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteViewRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteViewRequest.php deleted file mode 100644 index 2980595cc4e5..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeleteViewRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeleteViewRequest - */ -class DeleteViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the view to delete. - * - * 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 view to delete. Please see - * {@see ContactCenterInsightsClient::viewName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\DeleteViewRequest - * - * @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 view to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the view to delete. - * - * 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 view to delete. - * - * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelMetadata.php deleted file mode 100644 index b9fc941ac602..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata - */ -class DeployIssueModelMetadata 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; - /** - * The original request for deployment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeployIssueModelRequest request = 3; - */ - protected $request = null; - - /** - * 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\DeployIssueModelRequest $request - * The original request for deployment. - * } - */ - 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; - } - - /** - * The original request for deployment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeployIssueModelRequest request = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * The original request for deployment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DeployIssueModelRequest request = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest::class); - $this->request = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelRequest.php deleted file mode 100644 index 05417f098460..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeployIssueModelRequest - */ -class DeployIssueModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The issue model to deploy. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The issue model to deploy. Please see - * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\DeployIssueModelRequest - * - * @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 issue model to deploy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The issue model to deploy. - * - * 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 deploy. - * - * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelResponse.php deleted file mode 100644 index 59ac7be188d0..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DeployIssueModelResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.contactcenterinsights.v1.DeployIssueModelResponse - */ -class DeployIssueModelResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowIntent.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowIntent.php deleted file mode 100644 index 43c3bee200f3..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowIntent.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.contactcenterinsights.v1.DialogflowIntent - */ -class DialogflowIntent extends \Google\Protobuf\Internal\Message -{ - /** - * The human-readable name of the intent. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The human-readable name of the intent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The human-readable name of the intent. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human-readable name of the intent. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowInteractionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowInteractionData.php deleted file mode 100644 index c651d75b244f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowInteractionData.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.contactcenterinsights.v1.DialogflowInteractionData - */ -class DialogflowInteractionData extends \Google\Protobuf\Internal\Message -{ - /** - * The Dialogflow intent resource path. Format: - * projects/{project}/agent/{agent}/intents/{intent} - * - * Generated from protobuf field string dialogflow_intent_id = 1; - */ - protected $dialogflow_intent_id = ''; - /** - * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dialogflow_intent_id - * The Dialogflow intent resource path. Format: - * projects/{project}/agent/{agent}/intents/{intent} - * @type float $confidence - * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The Dialogflow intent resource path. Format: - * projects/{project}/agent/{agent}/intents/{intent} - * - * Generated from protobuf field string dialogflow_intent_id = 1; - * @return string - */ - public function getDialogflowIntentId() - { - return $this->dialogflow_intent_id; - } - - /** - * The Dialogflow intent resource path. Format: - * projects/{project}/agent/{agent}/intents/{intent} - * - * Generated from protobuf field string dialogflow_intent_id = 1; - * @param string $var - * @return $this - */ - public function setDialogflowIntentId($var) - { - GPBUtil::checkString($var, True); - $this->dialogflow_intent_id = $var; - - return $this; - } - - /** - * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowSource.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowSource.php deleted file mode 100644 index 34caa82bc523..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/DialogflowSource.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.contactcenterinsights.v1.DialogflowSource - */ -class DialogflowSource extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the Dialogflow conversation that this conversation - * resource is derived from. Format: - * projects/{project}/locations/{location}/conversations/{conversation} - * - * Generated from protobuf field string dialogflow_conversation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dialogflow_conversation = ''; - /** - * Cloud Storage URI that points to a file that contains the conversation - * audio. - * - * Generated from protobuf field string audio_uri = 3; - */ - protected $audio_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dialogflow_conversation - * Output only. The name of the Dialogflow conversation that this conversation - * resource is derived from. Format: - * projects/{project}/locations/{location}/conversations/{conversation} - * @type string $audio_uri - * Cloud Storage URI that points to a file that contains the conversation - * audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the Dialogflow conversation that this conversation - * resource is derived from. Format: - * projects/{project}/locations/{location}/conversations/{conversation} - * - * Generated from protobuf field string dialogflow_conversation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDialogflowConversation() - { - return $this->dialogflow_conversation; - } - - /** - * Output only. The name of the Dialogflow conversation that this conversation - * resource is derived from. Format: - * projects/{project}/locations/{location}/conversations/{conversation} - * - * Generated from protobuf field string dialogflow_conversation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDialogflowConversation($var) - { - GPBUtil::checkString($var, True); - $this->dialogflow_conversation = $var; - - return $this; - } - - /** - * Cloud Storage URI that points to a file that contains the conversation - * audio. - * - * Generated from protobuf field string audio_uri = 3; - * @return string - */ - public function getAudioUri() - { - return $this->audio_uri; - } - - /** - * Cloud Storage URI that points to a file that contains the conversation - * audio. - * - * Generated from protobuf field string audio_uri = 3; - * @param string $var - * @return $this - */ - public function setAudioUri($var) - { - GPBUtil::checkString($var, True); - $this->audio_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity.php deleted file mode 100644 index 0d8782c3a647..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.contactcenterinsights.v1.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * The representative name for the entity. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Entity.Type type = 2; - */ - protected $type = 0; - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - */ - protected $salience = 0.0; - /** - * The aggregate sentiment expressed for this entity in the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 5; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The representative name for the entity. - * @type int $type - * The entity type. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * @type float $salience - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment - * The aggregate sentiment expressed for this entity in the conversation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The representative name for the entity. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The representative name for the entity. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Entity.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Entity.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\Entity\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @return float - */ - public function getSalience() - { - return $this->salience; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @param float $var - * @return $this - */ - public function setSalience($var) - { - GPBUtil::checkFloat($var); - $this->salience = $var; - - return $this; - } - - /** - * The aggregate sentiment expressed for this entity in the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 5; - * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * The aggregate sentiment expressed for this entity in the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 5; - * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity/Type.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity/Type.php deleted file mode 100644 index c5720f6505ae..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Entity/Type.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.contactcenterinsights.v1.Entity.Type - */ -class Type -{ - /** - * Unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Person. - * - * Generated from protobuf enum PERSON = 1; - */ - const PERSON = 1; - /** - * Location. - * - * Generated from protobuf enum LOCATION = 2; - */ - const LOCATION = 2; - /** - * Organization. - * - * Generated from protobuf enum ORGANIZATION = 3; - */ - const ORGANIZATION = 3; - /** - * Event. - * - * Generated from protobuf enum EVENT = 4; - */ - const EVENT = 4; - /** - * Artwork. - * - * Generated from protobuf enum WORK_OF_ART = 5; - */ - const WORK_OF_ART = 5; - /** - * Consumer product. - * - * Generated from protobuf enum CONSUMER_GOOD = 6; - */ - const CONSUMER_GOOD = 6; - /** - * Other types of entities. - * - * Generated from protobuf enum OTHER = 7; - */ - const OTHER = 7; - /** - * Phone number. - * The metadata lists the phone number (formatted according to local - * convention), plus whichever additional elements appear in the text: - * * `number` - The actual number, broken down into sections according to - * local convention. - * * `national_prefix` - Country code, if detected. - * * `area_code` - Region or area code, if detected. - * * `extension` - Phone extension (to be dialed after connection), if - * detected. - * - * Generated from protobuf enum PHONE_NUMBER = 9; - */ - const PHONE_NUMBER = 9; - /** - * Address. - * The metadata identifies the street number and locality plus whichever - * additional elements appear in the text: - * * `street_number` - Street number. - * * `locality` - City or town. - * * `street_name` - Street/route name, if detected. - * * `postal_code` - Postal code, if detected. - * * `country` - Country, if detected. - * * `broad_region` - Administrative area, such as the state, if detected. - * * `narrow_region` - Smaller administrative area, such as county, if - * detected. - * * `sublocality` - Used in Asian addresses to demark a district within a - * city, if detected. - * - * Generated from protobuf enum ADDRESS = 10; - */ - const ADDRESS = 10; - /** - * Date. - * The metadata identifies the components of the date: - * * `year` - Four digit year, if detected. - * * `month` - Two digit month number, if detected. - * * `day` - Two digit day number, if detected. - * - * Generated from protobuf enum DATE = 11; - */ - const DATE = 11; - /** - * Number. - * The metadata is the number itself. - * - * Generated from protobuf enum NUMBER = 12; - */ - const NUMBER = 12; - /** - * Price. - * The metadata identifies the `value` and `currency`. - * - * Generated from protobuf enum PRICE = 13; - */ - const PRICE = 13; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PERSON => 'PERSON', - self::LOCATION => 'LOCATION', - self::ORGANIZATION => 'ORGANIZATION', - self::EVENT => 'EVENT', - self::WORK_OF_ART => 'WORK_OF_ART', - self::CONSUMER_GOOD => 'CONSUMER_GOOD', - self::OTHER => 'OTHER', - self::PHONE_NUMBER => 'PHONE_NUMBER', - self::ADDRESS => 'ADDRESS', - self::DATE => 'DATE', - self::NUMBER => 'NUMBER', - self::PRICE => 'PRICE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\ContactCenterInsights\V1\Entity_Type::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData.php deleted file mode 100644 index eba6ca9bc46f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.contactcenterinsights.v1.EntityMentionData - */ -class EntityMentionData extends \Google\Protobuf\Internal\Message -{ - /** - * The key of this entity in conversation entities. - * Can be used to retrieve the exact `Entity` this mention is attached to. - * - * Generated from protobuf field string entity_unique_id = 1; - */ - protected $entity_unique_id = ''; - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType type = 2; - */ - protected $type = 0; - /** - * Sentiment expressed for this mention of the entity. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 3; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity_unique_id - * The key of this entity in conversation entities. - * Can be used to retrieve the exact `Entity` this mention is attached to. - * @type int $type - * The type of the entity mention. - * @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment - * Sentiment expressed for this mention of the entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The key of this entity in conversation entities. - * Can be used to retrieve the exact `Entity` this mention is attached to. - * - * Generated from protobuf field string entity_unique_id = 1; - * @return string - */ - public function getEntityUniqueId() - { - return $this->entity_unique_id; - } - - /** - * The key of this entity in conversation entities. - * Can be used to retrieve the exact `Entity` this mention is attached to. - * - * Generated from protobuf field string entity_unique_id = 1; - * @param string $var - * @return $this - */ - public function setEntityUniqueId($var) - { - GPBUtil::checkString($var, True); - $this->entity_unique_id = $var; - - return $this; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\EntityMentionData\MentionType::class); - $this->type = $var; - - return $this; - } - - /** - * Sentiment expressed for this mention of the entity. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * Sentiment expressed for this mention of the entity. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SentimentData sentiment = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData/MentionType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData/MentionType.php deleted file mode 100644 index 307fbc01afa5..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/EntityMentionData/MentionType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType - */ -class MentionType -{ - /** - * Unspecified. - * - * Generated from protobuf enum MENTION_TYPE_UNSPECIFIED = 0; - */ - const MENTION_TYPE_UNSPECIFIED = 0; - /** - * Proper noun. - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Common noun (or noun compound). - * - * Generated from protobuf enum COMMON = 2; - */ - const COMMON = 2; - - private static $valueToName = [ - self::MENTION_TYPE_UNSPECIFIED => 'MENTION_TYPE_UNSPECIFIED', - self::PROPER => 'PROPER', - self::COMMON => 'COMMON', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MentionType::class, \Google\Cloud\ContactCenterInsights\V1\EntityMentionData_MentionType::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExactMatchConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExactMatchConfig.php deleted file mode 100644 index f9f8af221b17..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExactMatchConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.contactcenterinsights.v1.ExactMatchConfig - */ -class ExactMatchConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether to consider case sensitivity when performing an exact match. - * - * Generated from protobuf field bool case_sensitive = 1; - */ - protected $case_sensitive = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $case_sensitive - * Whether to consider case sensitivity when performing an exact match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Whether to consider case sensitivity when performing an exact match. - * - * Generated from protobuf field bool case_sensitive = 1; - * @return bool - */ - public function getCaseSensitive() - { - return $this->case_sensitive; - } - - /** - * Whether to consider case sensitivity when performing an exact match. - * - * Generated from protobuf field bool case_sensitive = 1; - * @param bool $var - * @return $this - */ - public function setCaseSensitive($var) - { - GPBUtil::checkBool($var); - $this->case_sensitive = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataMetadata.php deleted file mode 100644 index f4808758212b..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataMetadata.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata - */ -class ExportInsightsDataMetadata 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; - /** - * The original request for export. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest request = 3; - */ - protected $request = null; - /** - * Partial errors during export 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\ExportInsightsDataRequest $request - * The original request for export. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors - * Partial errors during export 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; - } - - /** - * The original request for export. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest request = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * The original request for export. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest request = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest::class); - $this->request = $var; - - return $this; - } - - /** - * Partial errors during export 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 export 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest.php deleted file mode 100644 index 6e4f506ab972..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest - */ -class ExportInsightsDataRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource to export data from. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * A filter to reduce results to a specific subset. Useful for exporting - * conversations with specific properties. - * - * Generated from protobuf field string filter = 3; - */ - protected $filter = ''; - /** - * A fully qualified KMS key name for BigQuery tables protected by CMEK. - * Format: - * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} - * - * Generated from protobuf field string kms_key = 4; - */ - protected $kms_key = ''; - /** - * Options for what to do if the destination table already exists. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition write_disposition = 5; - */ - protected $write_disposition = 0; - protected $destination; - - /** - * @param string $parent Required. The parent resource to export data from. Please see - * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest - * - * @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\ExportInsightsDataRequest\BigQueryDestination $big_query_destination - * Specified if sink is a BigQuery table. - * @type string $parent - * Required. The parent resource to export data from. - * @type string $filter - * A filter to reduce results to a specific subset. Useful for exporting - * conversations with specific properties. - * @type string $kms_key - * A fully qualified KMS key name for BigQuery tables protected by CMEK. - * Format: - * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} - * @type int $write_disposition - * Options for what to do if the destination table already exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Specified if sink is a BigQuery table. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination big_query_destination = 2; - * @return \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\BigQueryDestination|null - */ - public function getBigQueryDestination() - { - return $this->readOneof(2); - } - - public function hasBigQueryDestination() - { - return $this->hasOneof(2); - } - - /** - * Specified if sink is a BigQuery table. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination big_query_destination = 2; - * @param \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\BigQueryDestination $var - * @return $this - */ - public function setBigQueryDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\BigQueryDestination::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The parent resource to export data from. - * - * 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 to export data from. - * - * 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; - } - - /** - * A filter to reduce results to a specific subset. Useful for exporting - * conversations with specific properties. - * - * Generated from protobuf field string filter = 3; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter to reduce results to a specific subset. Useful for exporting - * conversations with specific properties. - * - * Generated from protobuf field string filter = 3; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A fully qualified KMS key name for BigQuery tables protected by CMEK. - * Format: - * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} - * - * Generated from protobuf field string kms_key = 4; - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * A fully qualified KMS key name for BigQuery tables protected by CMEK. - * Format: - * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} - * - * Generated from protobuf field string kms_key = 4; - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - - /** - * Options for what to do if the destination table already exists. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition write_disposition = 5; - * @return int - */ - public function getWriteDisposition() - { - return $this->write_disposition; - } - - /** - * Options for what to do if the destination table already exists. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition write_disposition = 5; - * @param int $var - * @return $this - */ - public function setWriteDisposition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\WriteDisposition::class); - $this->write_disposition = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/BigQueryDestination.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/BigQueryDestination.php deleted file mode 100644 index 329de57ac90f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/BigQueryDestination.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination - */ -class BigQueryDestination extends \Google\Protobuf\Internal\Message -{ - /** - * A project ID or number. If specified, then export will attempt to - * write data to this project instead of the resource project. Otherwise, - * the resource project will be used. - * - * Generated from protobuf field string project_id = 3; - */ - protected $project_id = ''; - /** - * Required. The name of the BigQuery dataset that the snapshot result - * should be exported to. If this dataset does not exist, the export call - * returns an INVALID_ARGUMENT error. - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset = ''; - /** - * The BigQuery table name to which the insights data should be written. - * If this table does not exist, the export call returns an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string table = 2; - */ - protected $table = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * A project ID or number. If specified, then export will attempt to - * write data to this project instead of the resource project. Otherwise, - * the resource project will be used. - * @type string $dataset - * Required. The name of the BigQuery dataset that the snapshot result - * should be exported to. If this dataset does not exist, the export call - * returns an INVALID_ARGUMENT error. - * @type string $table - * The BigQuery table name to which the insights data should be written. - * If this table does not exist, the export call returns an INVALID_ARGUMENT - * error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * A project ID or number. If specified, then export will attempt to - * write data to this project instead of the resource project. Otherwise, - * the resource project will be used. - * - * Generated from protobuf field string project_id = 3; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * A project ID or number. If specified, then export will attempt to - * write data to this project instead of the resource project. Otherwise, - * the resource project will be used. - * - * Generated from protobuf field string project_id = 3; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The name of the BigQuery dataset that the snapshot result - * should be exported to. If this dataset does not exist, the export call - * returns an INVALID_ARGUMENT error. - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * Required. The name of the BigQuery dataset that the snapshot result - * should be exported to. If this dataset does not exist, the export call - * returns an INVALID_ARGUMENT error. - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - - /** - * The BigQuery table name to which the insights data should be written. - * If this table does not exist, the export call returns an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string table = 2; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * The BigQuery table name to which the insights data should be written. - * If this table does not exist, the export call returns an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string table = 2; - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->table = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryDestination::class, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest_BigQueryDestination::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/WriteDisposition.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/WriteDisposition.php deleted file mode 100644 index 66d34f848fc5..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataRequest/WriteDisposition.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition - */ -class WriteDisposition -{ - /** - * Write disposition is not specified. Defaults to WRITE_TRUNCATE. - * - * Generated from protobuf enum WRITE_DISPOSITION_UNSPECIFIED = 0; - */ - const WRITE_DISPOSITION_UNSPECIFIED = 0; - /** - * If the table already exists, BigQuery will overwrite the table data and - * use the schema from the load. - * - * Generated from protobuf enum WRITE_TRUNCATE = 1; - */ - const WRITE_TRUNCATE = 1; - /** - * If the table already exists, BigQuery will append data to the table. - * - * Generated from protobuf enum WRITE_APPEND = 2; - */ - const WRITE_APPEND = 2; - - private static $valueToName = [ - self::WRITE_DISPOSITION_UNSPECIFIED => 'WRITE_DISPOSITION_UNSPECIFIED', - self::WRITE_TRUNCATE => 'WRITE_TRUNCATE', - self::WRITE_APPEND => 'WRITE_APPEND', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WriteDisposition::class, \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest_WriteDisposition::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataResponse.php deleted file mode 100644 index 32c0c790acf4..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ExportInsightsDataResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse - */ -class ExportInsightsDataResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/FaqAnswerData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/FaqAnswerData.php deleted file mode 100644 index e6d8e8c35931..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/FaqAnswerData.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.contactcenterinsights.v1.FaqAnswerData - */ -class FaqAnswerData extends \Google\Protobuf\Internal\Message -{ - /** - * The piece of text from the `source` knowledge base document. - * - * Generated from protobuf field string answer = 1; - */ - protected $answer = ''; - /** - * The system's confidence score that this answer is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field float confidence_score = 2; - */ - protected $confidence_score = 0.0; - /** - * The corresponding FAQ question. - * - * Generated from protobuf field string question = 3; - */ - protected $question = ''; - /** - * Map that contains metadata about the FAQ answer and the document that - * it originates from. - * - * Generated from protobuf field map metadata = 4; - */ - private $metadata; - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 5; - */ - protected $query_record = ''; - /** - * The knowledge document that this answer was extracted from. - * Format: - * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. - * - * Generated from protobuf field string source = 6; - */ - protected $source = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $answer - * The piece of text from the `source` knowledge base document. - * @type float $confidence_score - * The system's confidence score that this answer is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * @type string $question - * The corresponding FAQ question. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Map that contains metadata about the FAQ answer and the document that - * it originates from. - * @type string $query_record - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * @type string $source - * The knowledge document that this answer was extracted from. - * Format: - * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The piece of text from the `source` knowledge base document. - * - * Generated from protobuf field string answer = 1; - * @return string - */ - public function getAnswer() - { - return $this->answer; - } - - /** - * The piece of text from the `source` knowledge base document. - * - * Generated from protobuf field string answer = 1; - * @param string $var - * @return $this - */ - public function setAnswer($var) - { - GPBUtil::checkString($var, True); - $this->answer = $var; - - return $this; - } - - /** - * The system's confidence score that this answer is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field float confidence_score = 2; - * @return float - */ - public function getConfidenceScore() - { - return $this->confidence_score; - } - - /** - * The system's confidence score that this answer is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field float confidence_score = 2; - * @param float $var - * @return $this - */ - public function setConfidenceScore($var) - { - GPBUtil::checkFloat($var); - $this->confidence_score = $var; - - return $this; - } - - /** - * The corresponding FAQ question. - * - * Generated from protobuf field string question = 3; - * @return string - */ - public function getQuestion() - { - return $this->question; - } - - /** - * The corresponding FAQ question. - * - * Generated from protobuf field string question = 3; - * @param string $var - * @return $this - */ - public function setQuestion($var) - { - GPBUtil::checkString($var, True); - $this->question = $var; - - return $this; - } - - /** - * Map that contains metadata about the FAQ answer and the document that - * it originates from. - * - * Generated from protobuf field map metadata = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Map that contains metadata about the FAQ answer and the document that - * it originates from. - * - * Generated from protobuf field map metadata = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 5; - * @return string - */ - public function getQueryRecord() - { - return $this->query_record; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 5; - * @param string $var - * @return $this - */ - public function setQueryRecord($var) - { - GPBUtil::checkString($var, True); - $this->query_record = $var; - - return $this; - } - - /** - * The knowledge document that this answer was extracted from. - * Format: - * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. - * - * Generated from protobuf field string source = 6; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * The knowledge document that this answer was extracted from. - * Format: - * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. - * - * Generated from protobuf field string source = 6; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GcsSource.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GcsSource.php deleted file mode 100644 index 2125a846c4af..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GcsSource.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.contactcenterinsights.v1.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Storage URI that points to a file that contains the conversation - * audio. - * - * Generated from protobuf field string audio_uri = 1; - */ - protected $audio_uri = ''; - /** - * Immutable. Cloud Storage URI that points to a file that contains the - * conversation transcript. - * - * Generated from protobuf field string transcript_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $transcript_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $audio_uri - * Cloud Storage URI that points to a file that contains the conversation - * audio. - * @type string $transcript_uri - * Immutable. Cloud Storage URI that points to a file that contains the - * conversation transcript. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage URI that points to a file that contains the conversation - * audio. - * - * Generated from protobuf field string audio_uri = 1; - * @return string - */ - public function getAudioUri() - { - return $this->audio_uri; - } - - /** - * Cloud Storage URI that points to a file that contains the conversation - * audio. - * - * Generated from protobuf field string audio_uri = 1; - * @param string $var - * @return $this - */ - public function setAudioUri($var) - { - GPBUtil::checkString($var, True); - $this->audio_uri = $var; - - return $this; - } - - /** - * Immutable. Cloud Storage URI that points to a file that contains the - * conversation transcript. - * - * Generated from protobuf field string transcript_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getTranscriptUri() - { - return $this->transcript_uri; - } - - /** - * Immutable. Cloud Storage URI that points to a file that contains the - * conversation transcript. - * - * Generated from protobuf field string transcript_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setTranscriptUri($var) - { - GPBUtil::checkString($var, True); - $this->transcript_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetAnalysisRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetAnalysisRequest.php deleted file mode 100644 index a46e863a67e9..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetAnalysisRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.GetAnalysisRequest - */ -class GetAnalysisRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the analysis 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 analysis to get. Please see - * {@see ContactCenterInsightsClient::analysisName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\GetAnalysisRequest - * - * @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 analysis to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the analysis 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 analysis 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetConversationRequest.php deleted file mode 100644 index 7c69e507e417..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetConversationRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.contactcenterinsights.v1.GetConversationRequest - */ -class GetConversationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the conversation to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The level of details of the conversation. Default is `FULL`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 2; - */ - protected $view = 0; - - /** - * @param string $name Required. The name of the conversation to get. Please see - * {@see ContactCenterInsightsClient::conversationName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\GetConversationRequest - * - * @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 conversation to get. - * @type int $view - * The level of details of the conversation. Default is `FULL`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the conversation 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 conversation 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; - } - - /** - * The level of details of the conversation. Default is `FULL`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The level of details of the conversation. Default is `FULL`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ConversationView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueModelRequest.php deleted file mode 100644 index 0de9b87c59ea..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueModelRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.GetIssueModelRequest - */ -class GetIssueModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the issue model 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 issue model to get. Please see - * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\GetIssueModelRequest - * - * @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 issue model to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the issue model 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 issue model 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueRequest.php deleted file mode 100644 index 6ce5364cc99a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetIssueRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.GetIssueRequest - */ -class GetIssueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the issue 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 issue to get. Please see - * {@see ContactCenterInsightsClient::issueName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\GetIssueRequest - * - * @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 issue to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the issue 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 issue 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetPhraseMatcherRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetPhraseMatcherRequest.php deleted file mode 100644 index cfdbf04b0d0f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetPhraseMatcherRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest - */ -class GetPhraseMatcherRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the phrase matcher 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 phrase matcher to get. Please see - * {@see ContactCenterInsightsClient::phraseMatcherName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\GetPhraseMatcherRequest - * - * @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 phrase matcher to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the phrase matcher 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 phrase matcher 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetSettingsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetSettingsRequest.php deleted file mode 100644 index 91add76d1818..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetSettingsRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.GetSettingsRequest - */ -class GetSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the settings 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 settings resource to get. Please see - * {@see ContactCenterInsightsClient::settingsName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\GetSettingsRequest - * - * @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 settings resource to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the settings 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 settings 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetViewRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetViewRequest.php deleted file mode 100644 index 0f38bc1c31e2..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/GetViewRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.GetViewRequest - */ -class GetViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the view 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 view to get. Please see - * {@see ContactCenterInsightsClient::viewName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\GetViewRequest - * - * @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 view to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the view 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 view 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/HoldData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/HoldData.php deleted file mode 100644 index bd7f70e930ef..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/HoldData.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.contactcenterinsights.v1.HoldData - */ -class HoldData 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\Resources::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata.php deleted file mode 100644 index 5923845b70e2..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.contactcenterinsights.v1.IngestConversationsMetadata - */ -class IngestConversationsMetadata 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 ingest. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $request = null; - /** - * Output only. Partial errors during ingest operation that might cause the - * operation output to be incomplete. - * - * Generated from protobuf field repeated .google.rpc.Status partial_errors = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $partial_errors; - /** - * Output only. Statistics for IngestConversations operation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStats ingest_conversations_stats = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ingest_conversations_stats = null; - - /** - * 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\IngestConversationsRequest $request - * Output only. The original request for ingest. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors - * Output only. Partial errors during ingest operation that might cause the - * operation output to be incomplete. - * @type \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata\IngestConversationsStats $ingest_conversations_stats - * Output only. Statistics for IngestConversations operation. - * } - */ - 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 ingest. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest|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 ingest. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest::class); - $this->request = $var; - - return $this; - } - - /** - * Output only. Partial errors during ingest operation that might cause the - * operation output to be incomplete. - * - * Generated from protobuf field repeated .google.rpc.Status partial_errors = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartialErrors() - { - return $this->partial_errors; - } - - /** - * Output only. Partial errors during ingest operation that might cause the - * operation output to be incomplete. - * - * Generated from protobuf field repeated .google.rpc.Status partial_errors = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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; - } - - /** - * Output only. Statistics for IngestConversations operation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStats ingest_conversations_stats = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata\IngestConversationsStats|null - */ - public function getIngestConversationsStats() - { - return $this->ingest_conversations_stats; - } - - public function hasIngestConversationsStats() - { - return isset($this->ingest_conversations_stats); - } - - public function clearIngestConversationsStats() - { - unset($this->ingest_conversations_stats); - } - - /** - * Output only. Statistics for IngestConversations operation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStats ingest_conversations_stats = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata\IngestConversationsStats $var - * @return $this - */ - public function setIngestConversationsStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata\IngestConversationsStats::class); - $this->ingest_conversations_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata/IngestConversationsStats.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata/IngestConversationsStats.php deleted file mode 100644 index eb1243032ccd..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsMetadata/IngestConversationsStats.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStats - */ -class IngestConversationsStats extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The number of objects processed during the ingest operation. - * - * Generated from protobuf field int32 processed_object_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $processed_object_count = 0; - /** - * Output only. The number of objects skipped because another conversation - * with the same transcript uri had already been ingested. - * - * Generated from protobuf field int32 duplicates_skipped_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $duplicates_skipped_count = 0; - /** - * Output only. The number of new conversations added during this ingest - * operation. - * - * Generated from protobuf field int32 successful_ingest_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $successful_ingest_count = 0; - /** - * Output only. The number of objects which were unable to be ingested due - * to errors. The errors are populated in the partial_errors field. - * - * Generated from protobuf field int32 failed_ingest_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failed_ingest_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $processed_object_count - * Output only. The number of objects processed during the ingest operation. - * @type int $duplicates_skipped_count - * Output only. The number of objects skipped because another conversation - * with the same transcript uri had already been ingested. - * @type int $successful_ingest_count - * Output only. The number of new conversations added during this ingest - * operation. - * @type int $failed_ingest_count - * Output only. The number of objects which were unable to be ingested due - * to errors. The errors are populated in the partial_errors field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The number of objects processed during the ingest operation. - * - * Generated from protobuf field int32 processed_object_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProcessedObjectCount() - { - return $this->processed_object_count; - } - - /** - * Output only. The number of objects processed during the ingest operation. - * - * Generated from protobuf field int32 processed_object_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProcessedObjectCount($var) - { - GPBUtil::checkInt32($var); - $this->processed_object_count = $var; - - return $this; - } - - /** - * Output only. The number of objects skipped because another conversation - * with the same transcript uri had already been ingested. - * - * Generated from protobuf field int32 duplicates_skipped_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDuplicatesSkippedCount() - { - return $this->duplicates_skipped_count; - } - - /** - * Output only. The number of objects skipped because another conversation - * with the same transcript uri had already been ingested. - * - * Generated from protobuf field int32 duplicates_skipped_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDuplicatesSkippedCount($var) - { - GPBUtil::checkInt32($var); - $this->duplicates_skipped_count = $var; - - return $this; - } - - /** - * Output only. The number of new conversations added during this ingest - * operation. - * - * Generated from protobuf field int32 successful_ingest_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSuccessfulIngestCount() - { - return $this->successful_ingest_count; - } - - /** - * Output only. The number of new conversations added during this ingest - * operation. - * - * Generated from protobuf field int32 successful_ingest_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSuccessfulIngestCount($var) - { - GPBUtil::checkInt32($var); - $this->successful_ingest_count = $var; - - return $this; - } - - /** - * Output only. The number of objects which were unable to be ingested due - * to errors. The errors are populated in the partial_errors field. - * - * Generated from protobuf field int32 failed_ingest_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFailedIngestCount() - { - return $this->failed_ingest_count; - } - - /** - * Output only. The number of objects which were unable to be ingested due - * to errors. The errors are populated in the partial_errors field. - * - * Generated from protobuf field int32 failed_ingest_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFailedIngestCount($var) - { - GPBUtil::checkInt32($var); - $this->failed_ingest_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IngestConversationsStats::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata_IngestConversationsStats::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest.php deleted file mode 100644 index 96c359e2ee87..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest.php +++ /dev/null @@ -1,308 +0,0 @@ -google.cloud.contactcenterinsights.v1.IngestConversationsRequest - */ -class IngestConversationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource for new conversations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Configuration that applies to all conversations. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig conversation_config = 4; - */ - protected $conversation_config = null; - /** - * Optional. DLP settings for transcript redaction. Optional, will default to - * the config specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $redaction_config = null; - /** - * Optional. Default Speech-to-Text configuration. Optional, will default to - * the config specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $speech_config = null; - protected $source; - protected $object_config; - - /** - * @param string $parent Required. The parent resource for new conversations. Please see - * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest - * - * @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\IngestConversationsRequest\GcsSource $gcs_source - * A cloud storage bucket source. Note that any previously ingested objects - * from the source will be skipped to avoid duplication. - * @type \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\TranscriptObjectConfig $transcript_object_config - * Configuration for when `source` contains conversation transcripts. - * @type string $parent - * Required. The parent resource for new conversations. - * @type \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\ConversationConfig $conversation_config - * Configuration that applies to all conversations. - * @type \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $redaction_config - * Optional. DLP settings for transcript redaction. Optional, will default to - * the config specified in Settings. - * @type \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $speech_config - * Optional. Default Speech-to-Text configuration. Optional, will default to - * the config specified in Settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * A cloud storage bucket source. Note that any previously ingested objects - * from the source will be skipped to avoid duplication. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource gcs_source = 2; - * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(2); - } - - public function hasGcsSource() - { - return $this->hasOneof(2); - } - - /** - * A cloud storage bucket source. Note that any previously ingested objects - * from the source will be skipped to avoid duplication. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource gcs_source = 2; - * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\GcsSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Configuration for when `source` contains conversation transcripts. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig transcript_object_config = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\TranscriptObjectConfig|null - */ - public function getTranscriptObjectConfig() - { - return $this->readOneof(3); - } - - public function hasTranscriptObjectConfig() - { - return $this->hasOneof(3); - } - - /** - * Configuration for when `source` contains conversation transcripts. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig transcript_object_config = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\TranscriptObjectConfig $var - * @return $this - */ - public function setTranscriptObjectConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\TranscriptObjectConfig::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. The parent resource for new conversations. - * - * 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 for new conversations. - * - * 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; - } - - /** - * Configuration that applies to all conversations. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig conversation_config = 4; - * @return \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\ConversationConfig|null - */ - public function getConversationConfig() - { - return $this->conversation_config; - } - - public function hasConversationConfig() - { - return isset($this->conversation_config); - } - - public function clearConversationConfig() - { - unset($this->conversation_config); - } - - /** - * Configuration that applies to all conversations. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig conversation_config = 4; - * @param \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\ConversationConfig $var - * @return $this - */ - public function setConversationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\ConversationConfig::class); - $this->conversation_config = $var; - - return $this; - } - - /** - * Optional. DLP settings for transcript redaction. Optional, will default to - * the config specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ContactCenterInsights\V1\RedactionConfig|null - */ - public function getRedactionConfig() - { - return $this->redaction_config; - } - - public function hasRedactionConfig() - { - return isset($this->redaction_config); - } - - public function clearRedactionConfig() - { - unset($this->redaction_config); - } - - /** - * Optional. DLP settings for transcript redaction. Optional, will default to - * the config specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $var - * @return $this - */ - public function setRedactionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\RedactionConfig::class); - $this->redaction_config = $var; - - return $this; - } - - /** - * Optional. Default Speech-to-Text configuration. Optional, will default to - * the config specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ContactCenterInsights\V1\SpeechConfig|null - */ - public function getSpeechConfig() - { - return $this->speech_config; - } - - public function hasSpeechConfig() - { - return isset($this->speech_config); - } - - public function clearSpeechConfig() - { - unset($this->speech_config); - } - - /** - * Optional. Default Speech-to-Text configuration. Optional, will default to - * the config specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $var - * @return $this - */ - public function setSpeechConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SpeechConfig::class); - $this->speech_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - - /** - * @return string - */ - public function getObjectConfig() - { - return $this->whichOneof("object_config"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/ConversationConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/ConversationConfig.php deleted file mode 100644 index e1a95b0a3ce8..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/ConversationConfig.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig - */ -class ConversationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * An opaque, user-specified string representing the human agent who handled - * the conversations. - * - * Generated from protobuf field string agent_id = 1; - */ - protected $agent_id = ''; - /** - * 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 - * analyzed. - * - * Generated from protobuf field int32 agent_channel = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $agent_channel = 0; - /** - * 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 - * analyzed. - * - * Generated from protobuf field int32 customer_channel = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $customer_channel = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $agent_id - * An opaque, user-specified string representing the human agent who handled - * the conversations. - * @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 - * analyzed. - * @type int $customer_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 - * analyzed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * An opaque, user-specified string representing the human agent who handled - * the conversations. - * - * Generated from protobuf field string agent_id = 1; - * @return string - */ - public function getAgentId() - { - return $this->agent_id; - } - - /** - * An opaque, user-specified string representing the human agent who handled - * the conversations. - * - * Generated from protobuf field string agent_id = 1; - * @param string $var - * @return $this - */ - public function setAgentId($var) - { - GPBUtil::checkString($var, True); - $this->agent_id = $var; - - return $this; - } - - /** - * 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 - * analyzed. - * - * Generated from protobuf field int32 agent_channel = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAgentChannel() - { - return $this->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 - * analyzed. - * - * Generated from protobuf field int32 agent_channel = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAgentChannel($var) - { - GPBUtil::checkInt32($var); - $this->agent_channel = $var; - - return $this; - } - - /** - * 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 - * analyzed. - * - * Generated from protobuf field int32 customer_channel = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCustomerChannel() - { - return $this->customer_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 - * analyzed. - * - * Generated from protobuf field int32 customer_channel = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCustomerChannel($var) - { - GPBUtil::checkInt32($var); - $this->customer_channel = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConversationConfig::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest_ConversationConfig::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource.php deleted file mode 100644 index dda6efd7acf2..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Cloud Storage bucket containing source objects. - * - * Generated from protobuf field string bucket_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket_uri = ''; - /** - * Optional. Specifies the type of the objects in `bucket_uri`. - * - * 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; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket_uri - * Required. The Cloud Storage bucket containing source objects. - * @type int $bucket_object_type - * Optional. Specifies the type of the objects in `bucket_uri`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Cloud Storage bucket containing source objects. - * - * Generated from protobuf field string bucket_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucketUri() - { - return $this->bucket_uri; - } - - /** - * Required. The Cloud Storage bucket containing source objects. - * - * Generated from protobuf field string bucket_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucketUri($var) - { - GPBUtil::checkString($var, True); - $this->bucket_uri = $var; - - return $this; - } - - /** - * Optional. Specifies the type of the objects in `bucket_uri`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType bucket_object_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getBucketObjectType() - { - return $this->bucket_object_type; - } - - /** - * Optional. Specifies the type of the objects in `bucket_uri`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType bucket_object_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setBucketObjectType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest\GcsSource\BucketObjectType::class); - $this->bucket_object_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GcsSource::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest_GcsSource::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource/BucketObjectType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource/BucketObjectType.php deleted file mode 100644 index 826704c5a327..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/GcsSource/BucketObjectType.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType - */ -class BucketObjectType -{ - /** - * The object type is unspecified and will default to `TRANSCRIPT`. - * - * Generated from protobuf enum BUCKET_OBJECT_TYPE_UNSPECIFIED = 0; - */ - const BUCKET_OBJECT_TYPE_UNSPECIFIED = 0; - /** - * The object is a transcript. - * - * Generated from protobuf enum TRANSCRIPT = 1; - */ - const TRANSCRIPT = 1; - /** - * The object is an audio file. - * - * Generated from protobuf enum AUDIO = 2; - */ - const AUDIO = 2; - - private static $valueToName = [ - self::BUCKET_OBJECT_TYPE_UNSPECIFIED => 'BUCKET_OBJECT_TYPE_UNSPECIFIED', - self::TRANSCRIPT => 'TRANSCRIPT', - self::AUDIO => 'AUDIO', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BucketObjectType::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest_GcsSource_BucketObjectType::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/TranscriptObjectConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/TranscriptObjectConfig.php deleted file mode 100644 index 928cc9f5e174..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsRequest/TranscriptObjectConfig.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig - */ -class TranscriptObjectConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The medium transcript objects represent. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $medium = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $medium - * Required. The medium transcript objects represent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The medium transcript objects represent. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMedium() - { - return $this->medium; - } - - /** - * Required. The medium transcript objects represent. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMedium($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Medium::class); - $this->medium = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TranscriptObjectConfig::class, \Google\Cloud\ContactCenterInsights\V1\IngestConversationsRequest_TranscriptObjectConfig::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsResponse.php deleted file mode 100644 index 97d2e9727617..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IngestConversationsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.contactcenterinsights.v1.IngestConversationsResponse - */ -class IngestConversationsResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Intent.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Intent.php deleted file mode 100644 index 74f40304f91e..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Intent.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.contactcenterinsights.v1.Intent - */ -class Intent extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the intent. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The human-readable name of the intent. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The unique identifier of the intent. - * @type string $display_name - * The human-readable name of the intent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the intent. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The unique identifier of the intent. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The human-readable name of the intent. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human-readable name of the intent. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IntentMatchData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IntentMatchData.php deleted file mode 100644 index 7997dc89a081..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IntentMatchData.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.contactcenterinsights.v1.IntentMatchData - */ -class IntentMatchData extends \Google\Protobuf\Internal\Message -{ - /** - * The id of the matched intent. - * Can be used to retrieve the corresponding intent information. - * - * Generated from protobuf field string intent_unique_id = 1; - */ - protected $intent_unique_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $intent_unique_id - * The id of the matched intent. - * Can be used to retrieve the corresponding intent information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The id of the matched intent. - * Can be used to retrieve the corresponding intent information. - * - * Generated from protobuf field string intent_unique_id = 1; - * @return string - */ - public function getIntentUniqueId() - { - return $this->intent_unique_id; - } - - /** - * The id of the matched intent. - * Can be used to retrieve the corresponding intent information. - * - * Generated from protobuf field string intent_unique_id = 1; - * @param string $var - * @return $this - */ - public function setIntentUniqueId($var) - { - GPBUtil::checkString($var, True); - $this->intent_unique_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/InterruptionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/InterruptionData.php deleted file mode 100644 index c6692b654dbc..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/InterruptionData.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.contactcenterinsights.v1.InterruptionData - */ -class InterruptionData 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\Resources::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Issue.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Issue.php deleted file mode 100644 index 7c46c7d9df38..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Issue.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.contactcenterinsights.v1.Issue - */ -class Issue extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the issue. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * The representative name for the issue. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Output only. The time at which this issue was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The most recent time that this issue was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Resource names of the sample representative utterances that - * match to this issue. - * - * Generated from protobuf field repeated string sample_utterances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $sample_utterances; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of the issue. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * @type string $display_name - * The representative name for the issue. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this issue was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The most recent time that this issue was updated. - * @type array|\Google\Protobuf\Internal\RepeatedField $sample_utterances - * Output only. Resource names of the sample representative utterances that - * match to this issue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of the issue. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * - * 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 issue. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * - * 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; - } - - /** - * The representative name for the issue. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The representative name for the issue. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The time at which this issue was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which this issue was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 most recent time that this issue was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The most recent time that this issue was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Resource names of the sample representative utterances that - * match to this issue. - * - * Generated from protobuf field repeated string sample_utterances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSampleUtterances() - { - return $this->sample_utterances; - } - - /** - * Output only. Resource names of the sample representative utterances that - * match to this issue. - * - * Generated from protobuf field repeated string sample_utterances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSampleUtterances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sample_utterances = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueAssignment.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueAssignment.php deleted file mode 100644 index bfe826f1fadc..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueAssignment.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.contactcenterinsights.v1.IssueAssignment - */ -class IssueAssignment extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the assigned issue. - * - * Generated from protobuf field string issue = 1; - */ - protected $issue = ''; - /** - * Score indicating the likelihood of the issue assignment. - * currently bounded on [0,1]. - * - * Generated from protobuf field double score = 2; - */ - protected $score = 0.0; - /** - * Immutable. Display name of the assigned issue. This field is set at time of - * analyis and immutable since then. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issue - * Resource name of the assigned issue. - * @type float $score - * Score indicating the likelihood of the issue assignment. - * currently bounded on [0,1]. - * @type string $display_name - * Immutable. Display name of the assigned issue. This field is set at time of - * analyis and immutable since then. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the assigned issue. - * - * Generated from protobuf field string issue = 1; - * @return string - */ - public function getIssue() - { - return $this->issue; - } - - /** - * Resource name of the assigned issue. - * - * Generated from protobuf field string issue = 1; - * @param string $var - * @return $this - */ - public function setIssue($var) - { - GPBUtil::checkString($var, True); - $this->issue = $var; - - return $this; - } - - /** - * Score indicating the likelihood of the issue assignment. - * currently bounded on [0,1]. - * - * Generated from protobuf field double score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Score indicating the likelihood of the issue assignment. - * currently bounded on [0,1]. - * - * Generated from protobuf field double score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkDouble($var); - $this->score = $var; - - return $this; - } - - /** - * Immutable. Display name of the assigned issue. This field is set at time of - * analyis and immutable since then. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Immutable. Display name of the assigned issue. This field is set at time of - * analyis and immutable since then. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueMatchData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueMatchData.php deleted file mode 100644 index a0efc3fe72dd..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueMatchData.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.contactcenterinsights.v1.IssueMatchData - */ -class IssueMatchData extends \Google\Protobuf\Internal\Message -{ - /** - * Information about the issue's assignment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueAssignment issue_assignment = 1; - */ - protected $issue_assignment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\IssueAssignment $issue_assignment - * Information about the issue's assignment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Information about the issue's assignment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueAssignment issue_assignment = 1; - * @return \Google\Cloud\ContactCenterInsights\V1\IssueAssignment|null - */ - public function getIssueAssignment() - { - return $this->issue_assignment; - } - - public function hasIssueAssignment() - { - return isset($this->issue_assignment); - } - - public function clearIssueAssignment() - { - unset($this->issue_assignment); - } - - /** - * Information about the issue's assignment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueAssignment issue_assignment = 1; - * @param \Google\Cloud\ContactCenterInsights\V1\IssueAssignment $var - * @return $this - */ - public function setIssueAssignment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueAssignment::class); - $this->issue_assignment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel.php deleted file mode 100644 index 5f48567214a1..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel.php +++ /dev/null @@ -1,425 +0,0 @@ -google.cloud.contactcenterinsights.v1.IssueModel - */ -class IssueModel extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the issue model. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * The representative name for the issue model. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Output only. The time at which this issue model was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The most recent time at which the issue model was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Number of issues in this issue model. - * - * Generated from protobuf field int64 issue_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $issue_count = 0; - /** - * Output only. State of the model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Configs for the input data that used to create the issue model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig input_data_config = 6; - */ - protected $input_data_config = null; - /** - * Output only. Immutable. The issue model's label statistics on its training - * data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats training_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $training_stats = null; - /** - * Type of the model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.ModelType model_type = 9; - */ - protected $model_type = 0; - /** - * Language of the model. - * - * Generated from protobuf field string language_code = 10; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of the issue model. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model} - * @type string $display_name - * The representative name for the issue model. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this issue model was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The most recent time at which the issue model was updated. - * @type int|string $issue_count - * Output only. Number of issues in this issue model. - * @type int $state - * Output only. State of the model. - * @type \Google\Cloud\ContactCenterInsights\V1\IssueModel\InputDataConfig $input_data_config - * Configs for the input data that used to create the issue model. - * @type \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats $training_stats - * Output only. Immutable. The issue model's label statistics on its training - * data. - * @type int $model_type - * Type of the model. - * @type string $language_code - * Language of the model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of the issue model. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model} - * - * 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 issue model. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model} - * - * 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; - } - - /** - * The representative name for the issue model. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The representative name for the issue model. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The time at which this issue model was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which this issue model was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 most recent time at which the issue model was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The most recent time at which the issue model was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Number of issues in this issue model. - * - * Generated from protobuf field int64 issue_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getIssueCount() - { - return $this->issue_count; - } - - /** - * Output only. Number of issues in this issue model. - * - * Generated from protobuf field int64 issue_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setIssueCount($var) - { - GPBUtil::checkInt64($var); - $this->issue_count = $var; - - return $this; - } - - /** - * Output only. State of the model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel\State::class); - $this->state = $var; - - return $this; - } - - /** - * Configs for the input data that used to create the issue model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig input_data_config = 6; - * @return \Google\Cloud\ContactCenterInsights\V1\IssueModel\InputDataConfig|null - */ - public function getInputDataConfig() - { - return $this->input_data_config; - } - - public function hasInputDataConfig() - { - return isset($this->input_data_config); - } - - public function clearInputDataConfig() - { - unset($this->input_data_config); - } - - /** - * Configs for the input data that used to create the issue model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig input_data_config = 6; - * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel\InputDataConfig $var - * @return $this - */ - public function setInputDataConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel\InputDataConfig::class); - $this->input_data_config = $var; - - return $this; - } - - /** - * Output only. Immutable. The issue model's label statistics on its training - * data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats training_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats|null - */ - public function getTrainingStats() - { - return $this->training_stats; - } - - public function hasTrainingStats() - { - return isset($this->training_stats); - } - - public function clearTrainingStats() - { - unset($this->training_stats); - } - - /** - * Output only. Immutable. The issue model's label statistics on its training - * data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModelLabelStats training_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats $var - * @return $this - */ - public function setTrainingStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats::class); - $this->training_stats = $var; - - return $this; - } - - /** - * Type of the model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.ModelType model_type = 9; - * @return int - */ - public function getModelType() - { - return $this->model_type; - } - - /** - * Type of the model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel.ModelType model_type = 9; - * @param int $var - * @return $this - */ - public function setModelType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel\ModelType::class); - $this->model_type = $var; - - return $this; - } - - /** - * Language of the model. - * - * Generated from protobuf field string language_code = 10; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Language of the model. - * - * Generated from protobuf field string language_code = 10; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/InputDataConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/InputDataConfig.php deleted file mode 100644 index 4a40b7cb1ee0..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/InputDataConfig.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - */ -class InputDataConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Medium of conversations used in training data. This field is being - * deprecated. To specify the medium to be used in training a new issue - * model, set the `medium` field on `filter`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [deprecated = true]; - * @deprecated - */ - protected $medium = 0; - /** - * Output only. Number of conversations used in training. Output only. - * - * Generated from protobuf field int64 training_conversations_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $training_conversations_count = 0; - /** - * A filter to reduce the conversations used for training the model to a - * specific subset. - * - * Generated from protobuf field string filter = 3; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $medium - * Medium of conversations used in training data. This field is being - * deprecated. To specify the medium to be used in training a new issue - * model, set the `medium` field on `filter`. - * @type int|string $training_conversations_count - * Output only. Number of conversations used in training. Output only. - * @type string $filter - * A filter to reduce the conversations used for training the model to a - * specific subset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Medium of conversations used in training data. This field is being - * deprecated. To specify the medium to be used in training a new issue - * model, set the `medium` field on `filter`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [deprecated = true]; - * @return int - * @deprecated - */ - public function getMedium() - { - @trigger_error('medium is deprecated.', E_USER_DEPRECATED); - return $this->medium; - } - - /** - * Medium of conversations used in training data. This field is being - * deprecated. To specify the medium to be used in training a new issue - * model, set the `medium` field on `filter`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setMedium($var) - { - @trigger_error('medium is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\Conversation\Medium::class); - $this->medium = $var; - - return $this; - } - - /** - * Output only. Number of conversations used in training. Output only. - * - * Generated from protobuf field int64 training_conversations_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getTrainingConversationsCount() - { - return $this->training_conversations_count; - } - - /** - * Output only. Number of conversations used in training. Output only. - * - * Generated from protobuf field int64 training_conversations_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setTrainingConversationsCount($var) - { - GPBUtil::checkInt64($var); - $this->training_conversations_count = $var; - - return $this; - } - - /** - * A filter to reduce the conversations used for training the model to a - * specific subset. - * - * Generated from protobuf field string filter = 3; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter to reduce the conversations used for training the model to a - * specific subset. - * - * Generated from protobuf field string filter = 3; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InputDataConfig::class, \Google\Cloud\ContactCenterInsights\V1\IssueModel_InputDataConfig::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/ModelType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/ModelType.php deleted file mode 100644 index f92a0416a08b..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/ModelType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.contactcenterinsights.v1.IssueModel.ModelType - */ -class ModelType -{ - /** - * Unspecified model type. - * - * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; - */ - const MODEL_TYPE_UNSPECIFIED = 0; - /** - * Type V1. - * - * Generated from protobuf enum TYPE_V1 = 1; - */ - const TYPE_V1 = 1; - /** - * Type V2. - * - * Generated from protobuf enum TYPE_V2 = 2; - */ - const TYPE_V2 = 2; - - private static $valueToName = [ - self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', - self::TYPE_V1 => 'TYPE_V1', - self::TYPE_V2 => 'TYPE_V2', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ModelType::class, \Google\Cloud\ContactCenterInsights\V1\IssueModel_ModelType::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/State.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/State.php deleted file mode 100644 index 9092c5c9a341..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModel/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.contactcenterinsights.v1.IssueModel.State - */ -class State -{ - /** - * Unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Model is not deployed but is ready to deploy. - * - * Generated from protobuf enum UNDEPLOYED = 1; - */ - const UNDEPLOYED = 1; - /** - * Model is being deployed. - * - * Generated from protobuf enum DEPLOYING = 2; - */ - const DEPLOYING = 2; - /** - * Model is deployed and is ready to be used. A model can only be used in - * analysis if it's in this state. - * - * Generated from protobuf enum DEPLOYED = 3; - */ - const DEPLOYED = 3; - /** - * Model is being undeployed. - * - * Generated from protobuf enum UNDEPLOYING = 4; - */ - const UNDEPLOYING = 4; - /** - * Model is being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::UNDEPLOYED => 'UNDEPLOYED', - self::DEPLOYING => 'DEPLOYING', - self::DEPLOYED => 'DEPLOYED', - self::UNDEPLOYING => 'UNDEPLOYING', - self::DELETING => 'DELETING', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\ContactCenterInsights\V1\IssueModel_State::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats.php deleted file mode 100644 index 13e20a42460f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.contactcenterinsights.v1.IssueModelLabelStats - */ -class IssueModelLabelStats extends \Google\Protobuf\Internal\Message -{ - /** - * Number of conversations the issue model has analyzed at this point in time. - * - * Generated from protobuf field int64 analyzed_conversations_count = 1; - */ - protected $analyzed_conversations_count = 0; - /** - * Number of analyzed conversations for which no issue was applicable at this - * point in time. - * - * Generated from protobuf field int64 unclassified_conversations_count = 2; - */ - protected $unclassified_conversations_count = 0; - /** - * Statistics on each issue. Key is the issue's resource name. - * - * Generated from protobuf field map issue_stats = 3; - */ - private $issue_stats; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $analyzed_conversations_count - * Number of conversations the issue model has analyzed at this point in time. - * @type int|string $unclassified_conversations_count - * Number of analyzed conversations for which no issue was applicable at this - * point in time. - * @type array|\Google\Protobuf\Internal\MapField $issue_stats - * Statistics on each issue. Key is the issue's resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Number of conversations the issue model has analyzed at this point in time. - * - * Generated from protobuf field int64 analyzed_conversations_count = 1; - * @return int|string - */ - public function getAnalyzedConversationsCount() - { - return $this->analyzed_conversations_count; - } - - /** - * Number of conversations the issue model has analyzed at this point in time. - * - * Generated from protobuf field int64 analyzed_conversations_count = 1; - * @param int|string $var - * @return $this - */ - public function setAnalyzedConversationsCount($var) - { - GPBUtil::checkInt64($var); - $this->analyzed_conversations_count = $var; - - return $this; - } - - /** - * Number of analyzed conversations for which no issue was applicable at this - * point in time. - * - * Generated from protobuf field int64 unclassified_conversations_count = 2; - * @return int|string - */ - public function getUnclassifiedConversationsCount() - { - return $this->unclassified_conversations_count; - } - - /** - * Number of analyzed conversations for which no issue was applicable at this - * point in time. - * - * Generated from protobuf field int64 unclassified_conversations_count = 2; - * @param int|string $var - * @return $this - */ - public function setUnclassifiedConversationsCount($var) - { - GPBUtil::checkInt64($var); - $this->unclassified_conversations_count = $var; - - return $this; - } - - /** - * Statistics on each issue. Key is the issue's resource name. - * - * Generated from protobuf field map issue_stats = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getIssueStats() - { - return $this->issue_stats; - } - - /** - * Statistics on each issue. Key is the issue's resource name. - * - * Generated from protobuf field map issue_stats = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setIssueStats($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats\IssueStats::class); - $this->issue_stats = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats/IssueStats.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats/IssueStats.php deleted file mode 100644 index b6e19bb189f4..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelLabelStats/IssueStats.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - */ -class IssueStats extends \Google\Protobuf\Internal\Message -{ - /** - * Issue resource. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * - * Generated from protobuf field string issue = 1; - */ - protected $issue = ''; - /** - * Number of conversations attached to the issue at this point in time. - * - * Generated from protobuf field int64 labeled_conversations_count = 2; - */ - protected $labeled_conversations_count = 0; - /** - * Display name of the issue. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issue - * Issue resource. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * @type int|string $labeled_conversations_count - * Number of conversations attached to the issue at this point in time. - * @type string $display_name - * Display name of the issue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Issue resource. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * - * Generated from protobuf field string issue = 1; - * @return string - */ - public function getIssue() - { - return $this->issue; - } - - /** - * Issue resource. - * Format: - * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * - * Generated from protobuf field string issue = 1; - * @param string $var - * @return $this - */ - public function setIssue($var) - { - GPBUtil::checkString($var, True); - $this->issue = $var; - - return $this; - } - - /** - * Number of conversations attached to the issue at this point in time. - * - * Generated from protobuf field int64 labeled_conversations_count = 2; - * @return int|string - */ - public function getLabeledConversationsCount() - { - return $this->labeled_conversations_count; - } - - /** - * Number of conversations attached to the issue at this point in time. - * - * Generated from protobuf field int64 labeled_conversations_count = 2; - * @param int|string $var - * @return $this - */ - public function setLabeledConversationsCount($var) - { - GPBUtil::checkInt64($var); - $this->labeled_conversations_count = $var; - - return $this; - } - - /** - * Display name of the issue. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name of the issue. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IssueStats::class, \Google\Cloud\ContactCenterInsights\V1\IssueModelLabelStats_IssueStats::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelResult.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelResult.php deleted file mode 100644 index 80a0ea58e065..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/IssueModelResult.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.contactcenterinsights.v1.IssueModelResult - */ -class IssueModelResult extends \Google\Protobuf\Internal\Message -{ - /** - * Issue model that generates the result. - * Format: projects/{project}/locations/{location}/issueModels/{issue_model} - * - * Generated from protobuf field string issue_model = 1 [(.google.api.resource_reference) = { - */ - protected $issue_model = ''; - /** - * All the matched issues. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueAssignment issues = 2; - */ - private $issues; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issue_model - * Issue model that generates the result. - * Format: projects/{project}/locations/{location}/issueModels/{issue_model} - * @type array<\Google\Cloud\ContactCenterInsights\V1\IssueAssignment>|\Google\Protobuf\Internal\RepeatedField $issues - * All the matched issues. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Issue model that generates the result. - * Format: projects/{project}/locations/{location}/issueModels/{issue_model} - * - * Generated from protobuf field string issue_model = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getIssueModel() - { - return $this->issue_model; - } - - /** - * Issue model that generates the result. - * Format: projects/{project}/locations/{location}/issueModels/{issue_model} - * - * Generated from protobuf field string issue_model = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIssueModel($var) - { - GPBUtil::checkString($var, True); - $this->issue_model = $var; - - return $this; - } - - /** - * All the matched issues. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueAssignment issues = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIssues() - { - return $this->issues; - } - - /** - * All the matched issues. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueAssignment issues = 2; - * @param array<\Google\Cloud\ContactCenterInsights\V1\IssueAssignment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIssues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\IssueAssignment::class); - $this->issues = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesRequest.php deleted file mode 100644 index 0ca0f63bbf9a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesRequest.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListAnalysesRequest - */ -class ListAnalysesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the analyses. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of analyses to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListAnalysesResponse`; indicates - * that this is a continuation of a prior `ListAnalyses` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent resource of the analyses. Please see - * {@see ContactCenterInsightsClient::conversationName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\ListAnalysesRequest - * - * @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 string $parent - * Required. The parent resource of the analyses. - * @type int $page_size - * The maximum number of analyses to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @type string $page_token - * The value returned by the last `ListAnalysesResponse`; indicates - * that this is a continuation of a prior `ListAnalyses` call and - * the system should return the next page of data. - * @type string $filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the analyses. - * - * 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 analyses. - * - * 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; - } - - /** - * The maximum number of analyses to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of analyses to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListAnalysesResponse`; indicates - * that this is a continuation of a prior `ListAnalyses` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListAnalysesResponse`; indicates - * that this is a continuation of a prior `ListAnalyses` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesResponse.php deleted file mode 100644 index c1a8d2ea3c7c..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListAnalysesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListAnalysesResponse - */ -class ListAnalysesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The analyses that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Analysis analyses = 1; - */ - private $analyses; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ContactCenterInsights\V1\Analysis>|\Google\Protobuf\Internal\RepeatedField $analyses - * The analyses that match the request. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The analyses that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Analysis analyses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnalyses() - { - return $this->analyses; - } - - /** - * The analyses that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Analysis analyses = 1; - * @param array<\Google\Cloud\ContactCenterInsights\V1\Analysis>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnalyses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Analysis::class); - $this->analyses = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsRequest.php deleted file mode 100644 index cfe31fa3fb41..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListConversationsRequest - */ -class ListConversationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the conversation. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - 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 - * unspecified, a default page size of 100 will be chosen. Note that a call - * might return fewer results than the requested page size. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListConversationsResponse`. This value - * indicates that this is a continuation of a prior `ListConversations` call - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * The level of details of the conversation. Default is `BASIC`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 5; - */ - protected $view = 0; - - /** - * @param string $parent Required. The parent resource of the conversation. Please see - * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\ListConversationsRequest - * - * @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 string $parent - * 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 - * 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 - * The value returned by the last `ListConversationsResponse`. This value - * indicates that this is a continuation of a prior `ListConversations` call - * and that the system should return the next page of data. - * @type string $filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * @type int $view - * The level of details of the conversation. Default is `BASIC`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the conversation. - * - * 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 conversation. - * - * 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; - } - - /** - * 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 - * unspecified, a default page size of 100 will be chosen. Note that a call - * might return fewer results than the requested page size. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->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 - * unspecified, a default page size of 100 will be chosen. Note that a call - * might return fewer results than the requested page size. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListConversationsResponse`. This value - * indicates that this is a continuation of a prior `ListConversations` call - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListConversationsResponse`. This value - * indicates that this is a continuation of a prior `ListConversations` call - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The level of details of the conversation. Default is `BASIC`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 5; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The level of details of the conversation. Default is `BASIC`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationView view = 5; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ConversationView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsResponse.php deleted file mode 100644 index d43bf9bd86f7..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListConversationsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListConversationsResponse - */ -class ListConversationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The conversations that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation conversations = 1; - */ - private $conversations; - /** - * A token which can be sent as `page_token` to retrieve the next page. If - * this field is set, it means there is another page available. If it is not - * set, it means no other pages are available. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ContactCenterInsights\V1\Conversation>|\Google\Protobuf\Internal\RepeatedField $conversations - * The conversations that match the request. - * @type string $next_page_token - * A token which can be sent as `page_token` to retrieve the next page. If - * this field is set, it means there is another page available. If it is not - * set, it means no other pages are available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The conversations that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation conversations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConversations() - { - return $this->conversations; - } - - /** - * The conversations that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Conversation conversations = 1; - * @param array<\Google\Cloud\ContactCenterInsights\V1\Conversation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConversations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Conversation::class); - $this->conversations = $arr; - - return $this; - } - - /** - * A token which can be sent as `page_token` to retrieve the next page. If - * this field is set, it means there is another page available. If it is not - * set, it means no other pages are available. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which can be sent as `page_token` to retrieve the next page. If - * this field is set, it means there is another page available. If it is not - * set, it means no other pages are available. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsRequest.php deleted file mode 100644 index 797cc70091fb..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListIssueModelsRequest - */ -class ListIssueModelsRequest 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 = ''; - - /** - * @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\ListIssueModelsRequest - * - * @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 string $parent - * Required. The parent resource of the issue model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * 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; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsResponse.php deleted file mode 100644 index fd1955c2afaf..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssueModelsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListIssueModelsResponse - */ -class ListIssueModelsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The issue models that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueModel issue_models = 1; - */ - private $issue_models; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ContactCenterInsights\V1\IssueModel>|\Google\Protobuf\Internal\RepeatedField $issue_models - * The issue models that match the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The issue models that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueModel issue_models = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIssueModels() - { - return $this->issue_models; - } - - /** - * The issue models that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.IssueModel issue_models = 1; - * @param array<\Google\Cloud\ContactCenterInsights\V1\IssueModel>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIssueModels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\IssueModel::class); - $this->issue_models = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesRequest.php deleted file mode 100644 index 9c33a0640c2a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListIssuesRequest - */ -class ListIssuesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the issue. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @param string $parent Required. The parent resource of the issue. Please see - * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\ListIssuesRequest - * - * @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 string $parent - * Required. The parent resource of the issue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the issue. - * - * 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. - * - * 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; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesResponse.php deleted file mode 100644 index 3bb883650053..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListIssuesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListIssuesResponse - */ -class ListIssuesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The issues that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Issue issues = 1; - */ - private $issues; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ContactCenterInsights\V1\Issue>|\Google\Protobuf\Internal\RepeatedField $issues - * The issues that match the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The issues that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Issue issues = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIssues() - { - return $this->issues; - } - - /** - * The issues that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.Issue issues = 1; - * @param array<\Google\Cloud\ContactCenterInsights\V1\Issue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIssues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\Issue::class); - $this->issues = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersRequest.php deleted file mode 100644 index 531bf84f176f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersRequest.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest - */ -class ListPhraseMatchersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the phrase matcher. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of phrase matchers to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListPhraseMatchersResponse`. This value - * indicates that this is a continuation of a prior `ListPhraseMatchers` call - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter to reduce results to a specific subset. Useful for querying - * phrase matchers with specific properties. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent resource of the phrase matcher. Please see - * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\ListPhraseMatchersRequest - * - * @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 string $parent - * Required. The parent resource of the phrase matcher. - * @type int $page_size - * The maximum number of phrase matchers to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @type string $page_token - * The value returned by the last `ListPhraseMatchersResponse`. This value - * indicates that this is a continuation of a prior `ListPhraseMatchers` call - * and that the system should return the next page of data. - * @type string $filter - * A filter to reduce results to a specific subset. Useful for querying - * phrase matchers with specific properties. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the phrase matcher. - * - * 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 phrase matcher. - * - * 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; - } - - /** - * The maximum number of phrase matchers to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of phrase matchers to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListPhraseMatchersResponse`. This value - * indicates that this is a continuation of a prior `ListPhraseMatchers` call - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListPhraseMatchersResponse`. This value - * indicates that this is a continuation of a prior `ListPhraseMatchers` call - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter to reduce results to a specific subset. Useful for querying - * phrase matchers with specific properties. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter to reduce results to a specific subset. Useful for querying - * phrase matchers with specific properties. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersResponse.php deleted file mode 100644 index a757fadd7624..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListPhraseMatchersResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse - */ -class ListPhraseMatchersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The phrase matchers that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matchers = 1; - */ - private $phrase_matchers; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatcher>|\Google\Protobuf\Internal\RepeatedField $phrase_matchers - * The phrase matchers that match the request. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The phrase matchers that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matchers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPhraseMatchers() - { - return $this->phrase_matchers; - } - - /** - * The phrase matchers that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matchers = 1; - * @param array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatcher>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPhraseMatchers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher::class); - $this->phrase_matchers = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsRequest.php deleted file mode 100644 index 6beedf23a10a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListViewsRequest - */ -class ListViewsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the views. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of views to return in the response. If this - * value is zero, the service will select a default size. A call may return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListViewsResponse`; indicates - * that this is a continuation of a prior `ListViews` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource of the views. Please see - * {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\ListViewsRequest - * - * @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 string $parent - * Required. The parent resource of the views. - * @type int $page_size - * The maximum number of views to return in the response. If this - * value is zero, the service will select a default size. A call may return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @type string $page_token - * The value returned by the last `ListViewsResponse`; indicates - * that this is a continuation of a prior `ListViews` call and - * the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the views. - * - * 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 views. - * - * 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; - } - - /** - * The maximum number of views to return in the response. If this - * value is zero, the service will select a default size. A call may return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of views to return in the response. If this - * value is zero, the service will select a default size. A call may return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListViewsResponse`; indicates - * that this is a continuation of a prior `ListViews` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListViewsResponse`; indicates - * that this is a continuation of a prior `ListViews` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsResponse.php deleted file mode 100644 index 18ad9605fc2b..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/ListViewsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.contactcenterinsights.v1.ListViewsResponse - */ -class ListViewsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The views that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.View views = 1; - */ - private $views; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ContactCenterInsights\V1\View>|\Google\Protobuf\Internal\RepeatedField $views - * The views that match the request. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * The views that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.View views = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getViews() - { - return $this->views; - } - - /** - * The views that match the request. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.View views = 1; - * @param array<\Google\Cloud\ContactCenterInsights\V1\View>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setViews($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\View::class); - $this->views = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchData.php deleted file mode 100644 index 976b4005d028..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchData.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.contactcenterinsights.v1.PhraseMatchData - */ -class PhraseMatchData extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier (the resource name) of the phrase matcher. - * - * Generated from protobuf field string phrase_matcher = 1; - */ - protected $phrase_matcher = ''; - /** - * The human-readable name of the phrase matcher. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $phrase_matcher - * The unique identifier (the resource name) of the phrase matcher. - * @type string $display_name - * The human-readable name of the phrase matcher. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier (the resource name) of the phrase matcher. - * - * Generated from protobuf field string phrase_matcher = 1; - * @return string - */ - public function getPhraseMatcher() - { - return $this->phrase_matcher; - } - - /** - * The unique identifier (the resource name) of the phrase matcher. - * - * Generated from protobuf field string phrase_matcher = 1; - * @param string $var - * @return $this - */ - public function setPhraseMatcher($var) - { - GPBUtil::checkString($var, True); - $this->phrase_matcher = $var; - - return $this; - } - - /** - * The human-readable name of the phrase matcher. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human-readable name of the phrase matcher. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRule.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRule.php deleted file mode 100644 index 7c378d92751c..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRule.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.contactcenterinsights.v1.PhraseMatchRule - */ -class PhraseMatchRule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The phrase to be matched. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Specifies whether the phrase must be missing from the transcript segment or - * present in the transcript segment. - * - * Generated from protobuf field bool negated = 2; - */ - protected $negated = false; - /** - * Provides additional information about the rule that specifies how to apply - * the rule. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig config = 3; - */ - protected $config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * Required. The phrase to be matched. - * @type bool $negated - * Specifies whether the phrase must be missing from the transcript segment or - * present in the transcript segment. - * @type \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleConfig $config - * Provides additional information about the rule that specifies how to apply - * the rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The phrase to be matched. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. The phrase to be matched. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Specifies whether the phrase must be missing from the transcript segment or - * present in the transcript segment. - * - * Generated from protobuf field bool negated = 2; - * @return bool - */ - public function getNegated() - { - return $this->negated; - } - - /** - * Specifies whether the phrase must be missing from the transcript segment or - * present in the transcript segment. - * - * Generated from protobuf field bool negated = 2; - * @param bool $var - * @return $this - */ - public function setNegated($var) - { - GPBUtil::checkBool($var); - $this->negated = $var; - - return $this; - } - - /** - * Provides additional information about the rule that specifies how to apply - * the rule. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig config = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Provides additional information about the rule that specifies how to apply - * the rule. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig config = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleConfig::class); - $this->config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleConfig.php deleted file mode 100644 index bc1b1f53a206..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - */ -class PhraseMatchRuleConfig extends \Google\Protobuf\Internal\Message -{ - protected $config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\ExactMatchConfig $exact_match_config - * The configuration for the exact match rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The configuration for the exact match rule. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExactMatchConfig exact_match_config = 1; - * @return \Google\Cloud\ContactCenterInsights\V1\ExactMatchConfig|null - */ - public function getExactMatchConfig() - { - return $this->readOneof(1); - } - - public function hasExactMatchConfig() - { - return $this->hasOneof(1); - } - - /** - * The configuration for the exact match rule. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ExactMatchConfig exact_match_config = 1; - * @param \Google\Cloud\ContactCenterInsights\V1\ExactMatchConfig $var - * @return $this - */ - public function setExactMatchConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ExactMatchConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup.php deleted file mode 100644 index 3349ff2378e3..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - */ -class PhraseMatchRuleGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of this phrase match rule group. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * A list of phrase match rules that are included in this group. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRule phrase_match_rules = 2; - */ - private $phrase_match_rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. The type of this phrase match rule group. - * @type array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatchRule>|\Google\Protobuf\Internal\RepeatedField $phrase_match_rules - * A list of phrase match rules that are included in this group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of this phrase match rule group. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of this phrase match rule group. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup\PhraseMatchRuleGroupType::class); - $this->type = $var; - - return $this; - } - - /** - * A list of phrase match rules that are included in this group. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRule phrase_match_rules = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPhraseMatchRules() - { - return $this->phrase_match_rules; - } - - /** - * A list of phrase match rules that are included in this group. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRule phrase_match_rules = 2; - * @param array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatchRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPhraseMatchRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRule::class); - $this->phrase_match_rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup/PhraseMatchRuleGroupType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup/PhraseMatchRuleGroupType.php deleted file mode 100644 index 109fdfea30d9..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatchRuleGroup/PhraseMatchRuleGroupType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType - */ -class PhraseMatchRuleGroupType -{ - /** - * Unspecified. - * - * Generated from protobuf enum PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0; - */ - const PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0; - /** - * Must meet all phrase match rules or there is no match. - * - * Generated from protobuf enum ALL_OF = 1; - */ - const ALL_OF = 1; - /** - * If any of the phrase match rules are met, there is a match. - * - * Generated from protobuf enum ANY_OF = 2; - */ - const ANY_OF = 2; - - private static $valueToName = [ - self::PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED => 'PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED', - self::ALL_OF => 'ALL_OF', - self::ANY_OF => 'ANY_OF', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PhraseMatchRuleGroupType::class, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup_PhraseMatchRuleGroupType::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher.php deleted file mode 100644 index 44a2e86faddd..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher.php +++ /dev/null @@ -1,477 +0,0 @@ -google.cloud.contactcenterinsights.v1.PhraseMatcher - */ -class PhraseMatcher extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the phrase matcher. - * Format: - * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Immutable. The revision ID of the phrase matcher. - * A new revision is committed whenever the matcher is changed, except when it - * is activated or deactivated. A server generated random ID will be used. - * Example: locations/global/phraseMatchers/my-first-matcher@1234567 - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_id = ''; - /** - * The customized version tag to use for the phrase matcher. If not specified, - * it will default to `revision_id`. - * - * Generated from protobuf field string version_tag = 3; - */ - protected $version_tag = ''; - /** - * Output only. The timestamp of when the revision was created. It is also the - * create time when a new matcher is added. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_create_time = null; - /** - * The human-readable name of the phrase matcher. - * - * Generated from protobuf field string display_name = 5; - */ - protected $display_name = ''; - /** - * Required. The type of this phrase matcher. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType type = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Applies the phrase matcher only when it is active. - * - * Generated from protobuf field bool active = 7; - */ - protected $active = false; - /** - * A list of phase match rule groups that are included in this matcher. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup phrase_match_rule_groups = 8; - */ - private $phrase_match_rule_groups; - /** - * Output only. The most recent time at which the activation status was - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp activation_update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $activation_update_time = null; - /** - * The role whose utterances the phrase matcher should be matched - * against. If the role is ROLE_UNSPECIFIED it will be matched against any - * utterances in the transcript. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role_match = 10; - */ - protected $role_match = 0; - /** - * Output only. The most recent time at which the phrase matcher was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the phrase matcher. - * Format: - * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * @type string $revision_id - * Output only. Immutable. The revision ID of the phrase matcher. - * A new revision is committed whenever the matcher is changed, except when it - * is activated or deactivated. A server generated random ID will be used. - * Example: locations/global/phraseMatchers/my-first-matcher@1234567 - * @type string $version_tag - * The customized version tag to use for the phrase matcher. If not specified, - * it will default to `revision_id`. - * @type \Google\Protobuf\Timestamp $revision_create_time - * Output only. The timestamp of when the revision was created. It is also the - * create time when a new matcher is added. - * @type string $display_name - * The human-readable name of the phrase matcher. - * @type int $type - * Required. The type of this phrase matcher. - * @type bool $active - * Applies the phrase matcher only when it is active. - * @type array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup>|\Google\Protobuf\Internal\RepeatedField $phrase_match_rule_groups - * A list of phase match rule groups that are included in this matcher. - * @type \Google\Protobuf\Timestamp $activation_update_time - * Output only. The most recent time at which the activation status was - * updated. - * @type int $role_match - * The role whose utterances the phrase matcher should be matched - * against. If the role is ROLE_UNSPECIFIED it will be matched against any - * utterances in the transcript. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The most recent time at which the phrase matcher was updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the phrase matcher. - * Format: - * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the phrase matcher. - * Format: - * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Immutable. The revision ID of the phrase matcher. - * A new revision is committed whenever the matcher is changed, except when it - * is activated or deactivated. A server generated random ID will be used. - * Example: locations/global/phraseMatchers/my-first-matcher@1234567 - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Output only. Immutable. The revision ID of the phrase matcher. - * A new revision is committed whenever the matcher is changed, except when it - * is activated or deactivated. A server generated random ID will be used. - * Example: locations/global/phraseMatchers/my-first-matcher@1234567 - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - - /** - * The customized version tag to use for the phrase matcher. If not specified, - * it will default to `revision_id`. - * - * Generated from protobuf field string version_tag = 3; - * @return string - */ - public function getVersionTag() - { - return $this->version_tag; - } - - /** - * The customized version tag to use for the phrase matcher. If not specified, - * it will default to `revision_id`. - * - * Generated from protobuf field string version_tag = 3; - * @param string $var - * @return $this - */ - public function setVersionTag($var) - { - GPBUtil::checkString($var, True); - $this->version_tag = $var; - - return $this; - } - - /** - * Output only. The timestamp of when the revision was created. It is also the - * create time when a new matcher is added. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRevisionCreateTime() - { - return $this->revision_create_time; - } - - public function hasRevisionCreateTime() - { - return isset($this->revision_create_time); - } - - public function clearRevisionCreateTime() - { - unset($this->revision_create_time); - } - - /** - * Output only. The timestamp of when the revision was created. It is also the - * create time when a new matcher is added. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRevisionCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->revision_create_time = $var; - - return $this; - } - - /** - * The human-readable name of the phrase matcher. - * - * Generated from protobuf field string display_name = 5; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human-readable name of the phrase matcher. - * - * Generated from protobuf field string display_name = 5; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. The type of this phrase matcher. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType type = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of this phrase matcher. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType type = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher\PhraseMatcherType::class); - $this->type = $var; - - return $this; - } - - /** - * Applies the phrase matcher only when it is active. - * - * Generated from protobuf field bool active = 7; - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * Applies the phrase matcher only when it is active. - * - * Generated from protobuf field bool active = 7; - * @param bool $var - * @return $this - */ - public function setActive($var) - { - GPBUtil::checkBool($var); - $this->active = $var; - - return $this; - } - - /** - * A list of phase match rule groups that are included in this matcher. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup phrase_match_rule_groups = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPhraseMatchRuleGroups() - { - return $this->phrase_match_rule_groups; - } - - /** - * A list of phase match rule groups that are included in this matcher. - * - * Generated from protobuf field repeated .google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup phrase_match_rule_groups = 8; - * @param array<\Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPhraseMatchRuleGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContactCenterInsights\V1\PhraseMatchRuleGroup::class); - $this->phrase_match_rule_groups = $arr; - - return $this; - } - - /** - * Output only. The most recent time at which the activation status was - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp activation_update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getActivationUpdateTime() - { - return $this->activation_update_time; - } - - public function hasActivationUpdateTime() - { - return isset($this->activation_update_time); - } - - public function clearActivationUpdateTime() - { - unset($this->activation_update_time); - } - - /** - * Output only. The most recent time at which the activation status was - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp activation_update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setActivationUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->activation_update_time = $var; - - return $this; - } - - /** - * The role whose utterances the phrase matcher should be matched - * against. If the role is ROLE_UNSPECIFIED it will be matched against any - * utterances in the transcript. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role_match = 10; - * @return int - */ - public function getRoleMatch() - { - return $this->role_match; - } - - /** - * The role whose utterances the phrase matcher should be matched - * against. If the role is ROLE_UNSPECIFIED it will be matched against any - * utterances in the transcript. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationParticipant.Role role_match = 10; - * @param int $var - * @return $this - */ - public function setRoleMatch($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\ConversationParticipant\Role::class); - $this->role_match = $var; - - return $this; - } - - /** - * Output only. The most recent time at which the phrase matcher was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The most recent time at which the phrase matcher was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher/PhraseMatcherType.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher/PhraseMatcherType.php deleted file mode 100644 index ba37adcff295..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/PhraseMatcher/PhraseMatcherType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType - */ -class PhraseMatcherType -{ - /** - * Unspecified. - * - * Generated from protobuf enum PHRASE_MATCHER_TYPE_UNSPECIFIED = 0; - */ - const PHRASE_MATCHER_TYPE_UNSPECIFIED = 0; - /** - * Must meet all phrase match rule groups or there is no match. - * - * Generated from protobuf enum ALL_OF = 1; - */ - const ALL_OF = 1; - /** - * If any of the phrase match rule groups are met, there is a match. - * - * Generated from protobuf enum ANY_OF = 2; - */ - const ANY_OF = 2; - - private static $valueToName = [ - self::PHRASE_MATCHER_TYPE_UNSPECIFIED => 'PHRASE_MATCHER_TYPE_UNSPECIFIED', - self::ALL_OF => 'ALL_OF', - self::ANY_OF => 'ANY_OF', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PhraseMatcherType::class, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher_PhraseMatcherType::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RedactionConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RedactionConfig.php deleted file mode 100644 index ebcf981ef8e4..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RedactionConfig.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.contactcenterinsights.v1.RedactionConfig - */ -class RedactionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The fully-qualified DLP deidentify template resource name. - * Format: - * `projects/{project}/deidentifyTemplates/{template}` - * - * Generated from protobuf field string deidentify_template = 1; - */ - protected $deidentify_template = ''; - /** - * The fully-qualified DLP inspect template resource name. - * Format: - * `projects/{project}/locations/{location}/inspectTemplates/{template}` - * - * Generated from protobuf field string inspect_template = 2; - */ - protected $inspect_template = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $deidentify_template - * The fully-qualified DLP deidentify template resource name. - * Format: - * `projects/{project}/deidentifyTemplates/{template}` - * @type string $inspect_template - * The fully-qualified DLP inspect template resource name. - * Format: - * `projects/{project}/locations/{location}/inspectTemplates/{template}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The fully-qualified DLP deidentify template resource name. - * Format: - * `projects/{project}/deidentifyTemplates/{template}` - * - * Generated from protobuf field string deidentify_template = 1; - * @return string - */ - public function getDeidentifyTemplate() - { - return $this->deidentify_template; - } - - /** - * The fully-qualified DLP deidentify template resource name. - * Format: - * `projects/{project}/deidentifyTemplates/{template}` - * - * Generated from protobuf field string deidentify_template = 1; - * @param string $var - * @return $this - */ - public function setDeidentifyTemplate($var) - { - GPBUtil::checkString($var, True); - $this->deidentify_template = $var; - - return $this; - } - - /** - * The fully-qualified DLP inspect template resource name. - * Format: - * `projects/{project}/locations/{location}/inspectTemplates/{template}` - * - * Generated from protobuf field string inspect_template = 2; - * @return string - */ - public function getInspectTemplate() - { - return $this->inspect_template; - } - - /** - * The fully-qualified DLP inspect template resource name. - * Format: - * `projects/{project}/locations/{location}/inspectTemplates/{template}` - * - * Generated from protobuf field string inspect_template = 2; - * @param string $var - * @return $this - */ - public function setInspectTemplate($var) - { - GPBUtil::checkString($var, True); - $this->inspect_template = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RuntimeAnnotation.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RuntimeAnnotation.php deleted file mode 100644 index 6d27085452d2..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/RuntimeAnnotation.php +++ /dev/null @@ -1,458 +0,0 @@ -google.cloud.contactcenterinsights.v1.RuntimeAnnotation - */ -class RuntimeAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the annotation. - * Format: - * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} - * - * Generated from protobuf field string annotation_id = 1; - */ - protected $annotation_id = ''; - /** - * The time at which this annotation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * The boundary in the conversation where the annotation starts, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary start_boundary = 3; - */ - protected $start_boundary = null; - /** - * The boundary in the conversation where the annotation ends, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary end_boundary = 4; - */ - protected $end_boundary = null; - /** - * The feedback that the customer has about the answer in `data`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback answer_feedback = 5; - */ - protected $answer_feedback = null; - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\ArticleSuggestionData $article_suggestion - * Agent Assist Article Suggestion data. - * @type \Google\Cloud\ContactCenterInsights\V1\FaqAnswerData $faq_answer - * Agent Assist FAQ answer data. - * @type \Google\Cloud\ContactCenterInsights\V1\SmartReplyData $smart_reply - * Agent Assist Smart Reply data. - * @type \Google\Cloud\ContactCenterInsights\V1\SmartComposeSuggestionData $smart_compose_suggestion - * Agent Assist Smart Compose suggestion data. - * @type \Google\Cloud\ContactCenterInsights\V1\DialogflowInteractionData $dialogflow_interaction - * Dialogflow interaction data. - * @type \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData $conversation_summarization_suggestion - * Conversation summarization suggestion data. - * @type string $annotation_id - * The unique identifier of the annotation. - * Format: - * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} - * @type \Google\Protobuf\Timestamp $create_time - * The time at which this annotation was created. - * @type \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $start_boundary - * The boundary in the conversation where the annotation starts, inclusive. - * @type \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $end_boundary - * 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`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Agent Assist Article Suggestion data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ArticleSuggestionData article_suggestion = 6; - * @return \Google\Cloud\ContactCenterInsights\V1\ArticleSuggestionData|null - */ - public function getArticleSuggestion() - { - return $this->readOneof(6); - } - - public function hasArticleSuggestion() - { - return $this->hasOneof(6); - } - - /** - * Agent Assist Article Suggestion data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ArticleSuggestionData article_suggestion = 6; - * @param \Google\Cloud\ContactCenterInsights\V1\ArticleSuggestionData $var - * @return $this - */ - public function setArticleSuggestion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ArticleSuggestionData::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Agent Assist FAQ answer data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.FaqAnswerData faq_answer = 7; - * @return \Google\Cloud\ContactCenterInsights\V1\FaqAnswerData|null - */ - public function getFaqAnswer() - { - return $this->readOneof(7); - } - - public function hasFaqAnswer() - { - return $this->hasOneof(7); - } - - /** - * Agent Assist FAQ answer data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.FaqAnswerData faq_answer = 7; - * @param \Google\Cloud\ContactCenterInsights\V1\FaqAnswerData $var - * @return $this - */ - public function setFaqAnswer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\FaqAnswerData::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Agent Assist Smart Reply data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SmartReplyData smart_reply = 8; - * @return \Google\Cloud\ContactCenterInsights\V1\SmartReplyData|null - */ - public function getSmartReply() - { - return $this->readOneof(8); - } - - public function hasSmartReply() - { - return $this->hasOneof(8); - } - - /** - * Agent Assist Smart Reply data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SmartReplyData smart_reply = 8; - * @param \Google\Cloud\ContactCenterInsights\V1\SmartReplyData $var - * @return $this - */ - public function setSmartReply($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SmartReplyData::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Agent Assist Smart Compose suggestion data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData smart_compose_suggestion = 9; - * @return \Google\Cloud\ContactCenterInsights\V1\SmartComposeSuggestionData|null - */ - public function getSmartComposeSuggestion() - { - return $this->readOneof(9); - } - - public function hasSmartComposeSuggestion() - { - return $this->hasOneof(9); - } - - /** - * Agent Assist Smart Compose suggestion data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData smart_compose_suggestion = 9; - * @param \Google\Cloud\ContactCenterInsights\V1\SmartComposeSuggestionData $var - * @return $this - */ - public function setSmartComposeSuggestion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SmartComposeSuggestionData::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Dialogflow interaction data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DialogflowInteractionData dialogflow_interaction = 10; - * @return \Google\Cloud\ContactCenterInsights\V1\DialogflowInteractionData|null - */ - public function getDialogflowInteraction() - { - return $this->readOneof(10); - } - - public function hasDialogflowInteraction() - { - return $this->hasOneof(10); - } - - /** - * Dialogflow interaction data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.DialogflowInteractionData dialogflow_interaction = 10; - * @param \Google\Cloud\ContactCenterInsights\V1\DialogflowInteractionData $var - * @return $this - */ - public function setDialogflowInteraction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\DialogflowInteractionData::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Conversation summarization suggestion data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData conversation_summarization_suggestion = 12; - * @return \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData|null - */ - public function getConversationSummarizationSuggestion() - { - return $this->readOneof(12); - } - - public function hasConversationSummarizationSuggestion() - { - return $this->hasOneof(12); - } - - /** - * Conversation summarization suggestion data. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData conversation_summarization_suggestion = 12; - * @param \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData $var - * @return $this - */ - public function setConversationSummarizationSuggestion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ConversationSummarizationSuggestionData::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * The unique identifier of the annotation. - * Format: - * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} - * - * Generated from protobuf field string annotation_id = 1; - * @return string - */ - public function getAnnotationId() - { - return $this->annotation_id; - } - - /** - * The unique identifier of the annotation. - * Format: - * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} - * - * Generated from protobuf field string annotation_id = 1; - * @param string $var - * @return $this - */ - public function setAnnotationId($var) - { - GPBUtil::checkString($var, True); - $this->annotation_id = $var; - - return $this; - } - - /** - * The time at which this annotation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @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 at which this annotation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @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 boundary in the conversation where the annotation starts, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary start_boundary = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary|null - */ - public function getStartBoundary() - { - return $this->start_boundary; - } - - public function hasStartBoundary() - { - return isset($this->start_boundary); - } - - public function clearStartBoundary() - { - unset($this->start_boundary); - } - - /** - * The boundary in the conversation where the annotation starts, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary start_boundary = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $var - * @return $this - */ - public function setStartBoundary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary::class); - $this->start_boundary = $var; - - return $this; - } - - /** - * The boundary in the conversation where the annotation ends, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary end_boundary = 4; - * @return \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary|null - */ - public function getEndBoundary() - { - return $this->end_boundary; - } - - public function hasEndBoundary() - { - return isset($this->end_boundary); - } - - public function clearEndBoundary() - { - unset($this->end_boundary); - } - - /** - * The boundary in the conversation where the annotation ends, inclusive. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotationBoundary end_boundary = 4; - * @param \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary $var - * @return $this - */ - public function setEndBoundary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotationBoundary::class); - $this->end_boundary = $var; - - return $this; - } - - /** - * The feedback that the customer has about the answer in `data`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback answer_feedback = 5; - * @return \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback|null - */ - public function getAnswerFeedback() - { - return $this->answer_feedback; - } - - public function hasAnswerFeedback() - { - return isset($this->answer_feedback); - } - - public function clearAnswerFeedback() - { - unset($this->answer_feedback); - } - - /** - * The feedback that the customer has about the answer in `data`. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnswerFeedback answer_feedback = 5; - * @param \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback $var - * @return $this - */ - public function setAnswerFeedback($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnswerFeedback::class); - $this->answer_feedback = $var; - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SentimentData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SentimentData.php deleted file mode 100644 index ce03d00b710a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SentimentData.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.contactcenterinsights.v1.SentimentData - */ -class SentimentData extends \Google\Protobuf\Internal\Message -{ - /** - * A non-negative number from 0 to infinity which represents the abolute - * magnitude of sentiment regardless of score. - * - * Generated from protobuf field float magnitude = 1; - */ - protected $magnitude = 0.0; - /** - * The sentiment score between -1.0 (negative) and 1.0 (positive). - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $magnitude - * A non-negative number from 0 to infinity which represents the abolute - * magnitude of sentiment regardless of score. - * @type float $score - * The sentiment score between -1.0 (negative) and 1.0 (positive). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A non-negative number from 0 to infinity which represents the abolute - * magnitude of sentiment regardless of score. - * - * Generated from protobuf field float magnitude = 1; - * @return float - */ - public function getMagnitude() - { - return $this->magnitude; - } - - /** - * A non-negative number from 0 to infinity which represents the abolute - * magnitude of sentiment regardless of score. - * - * Generated from protobuf field float magnitude = 1; - * @param float $var - * @return $this - */ - public function setMagnitude($var) - { - GPBUtil::checkFloat($var); - $this->magnitude = $var; - - return $this; - } - - /** - * The sentiment score between -1.0 (negative) and 1.0 (positive). - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * The sentiment score between -1.0 (negative) and 1.0 (positive). - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings.php deleted file mode 100644 index 4c92a6b67f20..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings.php +++ /dev/null @@ -1,479 +0,0 @@ -google.cloud.contactcenterinsights.v1.Settings - */ -class Settings extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the settings resource. - * Format: - * projects/{project}/locations/{location}/settings - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. The time at which the settings was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which the settings were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * A language code to be applied to each transcript segment unless the segment - * already specifies a language code. Language code defaults to "en-US" if it - * is neither specified on the segment nor here. - * - * Generated from protobuf field string language_code = 4; - */ - protected $language_code = ''; - /** - * The default TTL for newly-created conversations. If a conversation has a - * specified expiration, that value will be used instead. Changing this - * value will not change the expiration of existing conversations. - * Conversations with no expire time persist until they are deleted. - * - * Generated from protobuf field .google.protobuf.Duration conversation_ttl = 5; - */ - protected $conversation_ttl = null; - /** - * A map that maps a notification trigger to a Pub/Sub topic. Each time a - * specified trigger occurs, Insights will notify the corresponding Pub/Sub - * topic. - * Keys are notification triggers. Supported keys are: - * * "all-triggers": Notify each time any of the supported triggers occurs. - * * "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. - * * "update-conversation": Notify each time a conversation is updated via - * UpdateConversation. - * Values are Pub/Sub topics. The format of each Pub/Sub topic is: - * projects/{project}/topics/{topic} - * - * Generated from protobuf field map pubsub_notification_settings = 6; - */ - private $pubsub_notification_settings; - /** - * Default analysis settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7; - */ - protected $analysis_config = null; - /** - * Default DLP redaction resources to be applied while ingesting - * conversations. - * - * 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. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $speech_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of the settings resource. - * Format: - * projects/{project}/locations/{location}/settings - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the settings was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the settings were last updated. - * @type string $language_code - * A language code to be applied to each transcript segment unless the segment - * already specifies a language code. Language code defaults to "en-US" if it - * is neither specified on the segment nor here. - * @type \Google\Protobuf\Duration $conversation_ttl - * The default TTL for newly-created conversations. If a conversation has a - * specified expiration, that value will be used instead. Changing this - * value will not change the expiration of existing conversations. - * Conversations with no expire time persist until they are deleted. - * @type array|\Google\Protobuf\Internal\MapField $pubsub_notification_settings - * A map that maps a notification trigger to a Pub/Sub topic. Each time a - * specified trigger occurs, Insights will notify the corresponding Pub/Sub - * topic. - * Keys are notification triggers. Supported keys are: - * * "all-triggers": Notify each time any of the supported triggers occurs. - * * "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. - * * "update-conversation": Notify each time a conversation is updated via - * UpdateConversation. - * 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. - * @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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of the settings resource. - * Format: - * projects/{project}/locations/{location}/settings - * - * 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 settings resource. - * Format: - * projects/{project}/locations/{location}/settings - * - * 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; - } - - /** - * Output only. The time at which the settings was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 at which the settings was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 at which the settings were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which the settings were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * A language code to be applied to each transcript segment unless the segment - * already specifies a language code. Language code defaults to "en-US" if it - * is neither specified on the segment nor here. - * - * Generated from protobuf field string language_code = 4; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * A language code to be applied to each transcript segment unless the segment - * already specifies a language code. Language code defaults to "en-US" if it - * is neither specified on the segment nor here. - * - * Generated from protobuf field string language_code = 4; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The default TTL for newly-created conversations. If a conversation has a - * specified expiration, that value will be used instead. Changing this - * value will not change the expiration of existing conversations. - * Conversations with no expire time persist until they are deleted. - * - * Generated from protobuf field .google.protobuf.Duration conversation_ttl = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getConversationTtl() - { - return $this->conversation_ttl; - } - - public function hasConversationTtl() - { - return isset($this->conversation_ttl); - } - - public function clearConversationTtl() - { - unset($this->conversation_ttl); - } - - /** - * The default TTL for newly-created conversations. If a conversation has a - * specified expiration, that value will be used instead. Changing this - * value will not change the expiration of existing conversations. - * Conversations with no expire time persist until they are deleted. - * - * Generated from protobuf field .google.protobuf.Duration conversation_ttl = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setConversationTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->conversation_ttl = $var; - - return $this; - } - - /** - * A map that maps a notification trigger to a Pub/Sub topic. Each time a - * specified trigger occurs, Insights will notify the corresponding Pub/Sub - * topic. - * Keys are notification triggers. Supported keys are: - * * "all-triggers": Notify each time any of the supported triggers occurs. - * * "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. - * * "update-conversation": Notify each time a conversation is updated via - * UpdateConversation. - * Values are Pub/Sub topics. The format of each Pub/Sub topic is: - * projects/{project}/topics/{topic} - * - * Generated from protobuf field map pubsub_notification_settings = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getPubsubNotificationSettings() - { - return $this->pubsub_notification_settings; - } - - /** - * A map that maps a notification trigger to a Pub/Sub topic. Each time a - * specified trigger occurs, Insights will notify the corresponding Pub/Sub - * topic. - * Keys are notification triggers. Supported keys are: - * * "all-triggers": Notify each time any of the supported triggers occurs. - * * "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. - * * "update-conversation": Notify each time a conversation is updated via - * UpdateConversation. - * Values are Pub/Sub topics. The format of each Pub/Sub topic is: - * projects/{project}/topics/{topic} - * - * Generated from protobuf field map pubsub_notification_settings = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setPubsubNotificationSettings($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->pubsub_notification_settings = $arr; - - return $this; - } - - /** - * Default analysis settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7; - * @return \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig|null - */ - public function getAnalysisConfig() - { - return $this->analysis_config; - } - - public function hasAnalysisConfig() - { - return isset($this->analysis_config); - } - - public function clearAnalysisConfig() - { - unset($this->analysis_config); - } - - /** - * Default analysis settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7; - * @param \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig $var - * @return $this - */ - public function setAnalysisConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig::class); - $this->analysis_config = $var; - - return $this; - } - - /** - * Default DLP redaction resources to be applied while ingesting - * conversations. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 10; - * @return \Google\Cloud\ContactCenterInsights\V1\RedactionConfig|null - */ - public function getRedactionConfig() - { - return $this->redaction_config; - } - - public function hasRedactionConfig() - { - return isset($this->redaction_config); - } - - public function clearRedactionConfig() - { - unset($this->redaction_config); - } - - /** - * Default DLP redaction resources to be applied while ingesting - * conversations. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 10; - * @param \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $var - * @return $this - */ - public function setRedactionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\RedactionConfig::class); - $this->redaction_config = $var; - - return $this; - } - - /** - * Optional. Default Speech-to-Text resources to be used while ingesting audio - * files. Optional, CCAI Insights will create a default if not provided. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ContactCenterInsights\V1\SpeechConfig|null - */ - public function getSpeechConfig() - { - return $this->speech_config; - } - - public function hasSpeechConfig() - { - return isset($this->speech_config); - } - - public function clearSpeechConfig() - { - unset($this->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. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $var - * @return $this - */ - public function setSpeechConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SpeechConfig::class); - $this->speech_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings/AnalysisConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings/AnalysisConfig.php deleted file mode 100644 index 6bf6f5bf7a26..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/Settings/AnalysisConfig.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - */ -class AnalysisConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Percentage of conversations created using Dialogflow runtime integration - * to analyze automatically, between [0, 100]. - * - * Generated from protobuf field double runtime_integration_analysis_percentage = 1; - */ - protected $runtime_integration_analysis_percentage = 0.0; - /** - * Percentage of conversations created using the UploadConversation endpoint - * to analyze automatically, between [0, 100]. - * - * Generated from protobuf field double upload_conversation_analysis_percentage = 6; - */ - protected $upload_conversation_analysis_percentage = 0.0; - /** - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 5; - */ - protected $annotator_selector = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $runtime_integration_analysis_percentage - * Percentage of conversations created using Dialogflow runtime integration - * to analyze automatically, between [0, 100]. - * @type float $upload_conversation_analysis_percentage - * Percentage of conversations created using the UploadConversation endpoint - * to analyze automatically, between [0, 100]. - * @type \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $annotator_selector - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Percentage of conversations created using Dialogflow runtime integration - * to analyze automatically, between [0, 100]. - * - * Generated from protobuf field double runtime_integration_analysis_percentage = 1; - * @return float - */ - public function getRuntimeIntegrationAnalysisPercentage() - { - return $this->runtime_integration_analysis_percentage; - } - - /** - * Percentage of conversations created using Dialogflow runtime integration - * to analyze automatically, between [0, 100]. - * - * Generated from protobuf field double runtime_integration_analysis_percentage = 1; - * @param float $var - * @return $this - */ - public function setRuntimeIntegrationAnalysisPercentage($var) - { - GPBUtil::checkDouble($var); - $this->runtime_integration_analysis_percentage = $var; - - return $this; - } - - /** - * Percentage of conversations created using the UploadConversation endpoint - * to analyze automatically, between [0, 100]. - * - * Generated from protobuf field double upload_conversation_analysis_percentage = 6; - * @return float - */ - public function getUploadConversationAnalysisPercentage() - { - return $this->upload_conversation_analysis_percentage; - } - - /** - * Percentage of conversations created using the UploadConversation endpoint - * to analyze automatically, between [0, 100]. - * - * Generated from protobuf field double upload_conversation_analysis_percentage = 6; - * @param float $var - * @return $this - */ - public function setUploadConversationAnalysisPercentage($var) - { - GPBUtil::checkDouble($var); - $this->upload_conversation_analysis_percentage = $var; - - return $this; - } - - /** - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 5; - * @return \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector|null - */ - public function getAnnotatorSelector() - { - return $this->annotator_selector; - } - - public function hasAnnotatorSelector() - { - return isset($this->annotator_selector); - } - - public function clearAnnotatorSelector() - { - unset($this->annotator_selector); - } - - /** - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 5; - * @param \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector $var - * @return $this - */ - public function setAnnotatorSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\AnnotatorSelector::class); - $this->annotator_selector = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnalysisConfig::class, \Google\Cloud\ContactCenterInsights\V1\Settings_AnalysisConfig::class); - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SilenceData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SilenceData.php deleted file mode 100644 index b2f045fe5662..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SilenceData.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.contactcenterinsights.v1.SilenceData - */ -class SilenceData 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\Resources::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartComposeSuggestionData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartComposeSuggestionData.php deleted file mode 100644 index abf22b896d3a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartComposeSuggestionData.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData - */ -class SmartComposeSuggestionData extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the suggestion. - * - * Generated from protobuf field string suggestion = 1; - */ - protected $suggestion = ''; - /** - * The system's confidence score that this suggestion is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field double confidence_score = 2; - */ - protected $confidence_score = 0.0; - /** - * Map that contains metadata about the Smart Compose suggestion and the - * document from which it originates. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 4; - */ - protected $query_record = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $suggestion - * The content of the suggestion. - * @type float $confidence_score - * The system's confidence score that this suggestion is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Map that contains metadata about the Smart Compose suggestion and the - * document from which it originates. - * @type string $query_record - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The content of the suggestion. - * - * Generated from protobuf field string suggestion = 1; - * @return string - */ - public function getSuggestion() - { - return $this->suggestion; - } - - /** - * The content of the suggestion. - * - * Generated from protobuf field string suggestion = 1; - * @param string $var - * @return $this - */ - public function setSuggestion($var) - { - GPBUtil::checkString($var, True); - $this->suggestion = $var; - - return $this; - } - - /** - * The system's confidence score that this suggestion is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field double confidence_score = 2; - * @return float - */ - public function getConfidenceScore() - { - return $this->confidence_score; - } - - /** - * The system's confidence score that this suggestion is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field double confidence_score = 2; - * @param float $var - * @return $this - */ - public function setConfidenceScore($var) - { - GPBUtil::checkDouble($var); - $this->confidence_score = $var; - - return $this; - } - - /** - * Map that contains metadata about the Smart Compose suggestion and the - * document from which it originates. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Map that contains metadata about the Smart Compose suggestion and the - * document from which it originates. - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 4; - * @return string - */ - public function getQueryRecord() - { - return $this->query_record; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 4; - * @param string $var - * @return $this - */ - public function setQueryRecord($var) - { - GPBUtil::checkString($var, True); - $this->query_record = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartReplyData.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartReplyData.php deleted file mode 100644 index 2da4d03c9e50..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SmartReplyData.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.contactcenterinsights.v1.SmartReplyData - */ -class SmartReplyData extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the reply. - * - * Generated from protobuf field string reply = 1; - */ - protected $reply = ''; - /** - * The system's confidence score that this reply is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field double confidence_score = 2; - */ - protected $confidence_score = 0.0; - /** - * Map that contains metadata about the Smart Reply and the document from - * which it originates. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 4; - */ - protected $query_record = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $reply - * The content of the reply. - * @type float $confidence_score - * The system's confidence score that this reply is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Map that contains metadata about the Smart Reply and the document from - * which it originates. - * @type string $query_record - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The content of the reply. - * - * Generated from protobuf field string reply = 1; - * @return string - */ - public function getReply() - { - return $this->reply; - } - - /** - * The content of the reply. - * - * Generated from protobuf field string reply = 1; - * @param string $var - * @return $this - */ - public function setReply($var) - { - GPBUtil::checkString($var, True); - $this->reply = $var; - - return $this; - } - - /** - * The system's confidence score that this reply is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field double confidence_score = 2; - * @return float - */ - public function getConfidenceScore() - { - return $this->confidence_score; - } - - /** - * The system's confidence score that this reply is a good match for this - * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely - * certain). - * - * Generated from protobuf field double confidence_score = 2; - * @param float $var - * @return $this - */ - public function setConfidenceScore($var) - { - GPBUtil::checkDouble($var); - $this->confidence_score = $var; - - return $this; - } - - /** - * Map that contains metadata about the Smart Reply and the document from - * which it originates. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Map that contains metadata about the Smart Reply and the document from - * which it originates. - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 4; - * @return string - */ - public function getQueryRecord() - { - return $this->query_record; - } - - /** - * The name of the answer record. - * Format: - * projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * Generated from protobuf field string query_record = 4; - * @param string $var - * @return $this - */ - public function setQueryRecord($var) - { - GPBUtil::checkString($var, True); - $this->query_record = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SpeechConfig.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SpeechConfig.php deleted file mode 100644 index 26829b4fdee5..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/SpeechConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.contactcenterinsights.v1.SpeechConfig - */ -class SpeechConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The fully-qualified Speech Recognizer resource name. - * Format: - * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` - * - * Generated from protobuf field string speech_recognizer = 1 [(.google.api.resource_reference) = { - */ - protected $speech_recognizer = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $speech_recognizer - * The fully-qualified Speech Recognizer resource name. - * Format: - * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The fully-qualified Speech Recognizer resource name. - * Format: - * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` - * - * Generated from protobuf field string speech_recognizer = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getSpeechRecognizer() - { - return $this->speech_recognizer; - } - - /** - * The fully-qualified Speech Recognizer resource name. - * Format: - * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` - * - * Generated from protobuf field string speech_recognizer = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSpeechRecognizer($var) - { - GPBUtil::checkString($var, True); - $this->speech_recognizer = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelMetadata.php deleted file mode 100644 index e6995db42e6e..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata - */ -class UndeployIssueModelMetadata 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; - /** - * The original request for undeployment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest request = 3; - */ - protected $request = null; - - /** - * 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\UndeployIssueModelRequest $request - * The original request for undeployment. - * } - */ - 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; - } - - /** - * The original request for undeployment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest request = 3; - * @return \Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelRequest|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * The original request for undeployment. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest request = 3; - * @param \Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelRequest::class); - $this->request = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelRequest.php deleted file mode 100644 index 7db5b4fe3288..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest - */ -class UndeployIssueModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The issue model to undeploy. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The issue model to undeploy. Please see - * {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field. - * - * @return \Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelRequest - * - * @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 issue model to undeploy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The issue model to undeploy. - * - * 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 undeploy. - * - * 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelResponse.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelResponse.php deleted file mode 100644 index 0478db7e5e18..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UndeployIssueModelResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse - */ -class UndeployIssueModelResponse 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/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateConversationRequest.php deleted file mode 100644 index 454731ba405c..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateConversationRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.contactcenterinsights.v1.UpdateConversationRequest - */ -class UpdateConversationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @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. - * - * @return \Google\Cloud\ContactCenterInsights\V1\UpdateConversationRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ContactCenterInsights\V1\Conversation $conversation, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setConversation($conversation) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\Conversation|null - */ - public function getConversation() - { - return $this->conversation; - } - - public function hasConversation() - { - return isset($this->conversation); - } - - public function clearConversation() - { - unset($this->conversation); - } - - /** - * Required. The new values for the conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\Conversation $var - * @return $this - */ - public function setConversation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation::class); - $this->conversation = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueModelRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueModelRequest.php deleted file mode 100644 index 2cc1f7c36565..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueModelRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest - */ -class UpdateIssueModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the issue model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $issue_model = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel $issueModel Required. The new values for the issue model. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\ContactCenterInsights\V1\UpdateIssueModelRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ContactCenterInsights\V1\IssueModel $issueModel, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIssueModel($issueModel) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\IssueModel $issue_model - * Required. The new values for the issue model. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the issue model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\IssueModel|null - */ - public function getIssueModel() - { - return $this->issue_model; - } - - public function hasIssueModel() - { - return isset($this->issue_model); - } - - public function clearIssueModel() - { - unset($this->issue_model); - } - - /** - * Required. The new values for the issue model. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.IssueModel issue_model = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\IssueModel $var - * @return $this - */ - public function setIssueModel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\IssueModel::class); - $this->issue_model = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueRequest.php deleted file mode 100644 index 0be9746fae85..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateIssueRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.contactcenterinsights.v1.UpdateIssueRequest - */ -class UpdateIssueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the issue. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $issue = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\ContactCenterInsights\V1\Issue $issue Required. The new values for the issue. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\ContactCenterInsights\V1\UpdateIssueRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ContactCenterInsights\V1\Issue $issue, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIssue($issue) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\Issue $issue - * Required. The new values for the issue. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the issue. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\Issue|null - */ - public function getIssue() - { - return $this->issue; - } - - public function hasIssue() - { - return isset($this->issue); - } - - public function clearIssue() - { - unset($this->issue); - } - - /** - * Required. The new values for the issue. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\Issue $var - * @return $this - */ - public function setIssue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Issue::class); - $this->issue = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdatePhraseMatcherRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdatePhraseMatcherRequest.php deleted file mode 100644 index f161bd6098d5..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdatePhraseMatcherRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest - */ -class UpdatePhraseMatcherRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the phrase matcher. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $phrase_matcher = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phraseMatcher Required. The new values for the phrase matcher. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\ContactCenterInsights\V1\UpdatePhraseMatcherRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phraseMatcher, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPhraseMatcher($phraseMatcher) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phrase_matcher - * Required. The new values for the phrase matcher. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the phrase matcher. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher|null - */ - public function getPhraseMatcher() - { - return $this->phrase_matcher; - } - - public function hasPhraseMatcher() - { - return isset($this->phrase_matcher); - } - - public function clearPhraseMatcher() - { - unset($this->phrase_matcher); - } - - /** - * Required. The new values for the phrase matcher. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $var - * @return $this - */ - public function setPhraseMatcher($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher::class); - $this->phrase_matcher = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateSettingsRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateSettingsRequest.php deleted file mode 100644 index 83a51d0c3938..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateSettingsRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.contactcenterinsights.v1.UpdateSettingsRequest - */ -class UpdateSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new settings values. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $settings = null; - /** - * Required. The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\ContactCenterInsights\V1\Settings $settings Required. The new settings values. - * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to be updated. - * - * @return \Google\Cloud\ContactCenterInsights\V1\UpdateSettingsRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ContactCenterInsights\V1\Settings $settings, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSettings($settings) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\Settings $settings - * Required. The new settings values. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new settings values. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\Settings|null - */ - public function getSettings() - { - return $this->settings; - } - - public function hasSettings() - { - return isset($this->settings); - } - - public function clearSettings() - { - unset($this->settings); - } - - /** - * Required. The new settings values. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\Settings $var - * @return $this - */ - public function setSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Settings::class); - $this->settings = $var; - - return $this; - } - - /** - * Required. The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateViewRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateViewRequest.php deleted file mode 100644 index c1adc1132a5f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UpdateViewRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.contactcenterinsights.v1.UpdateViewRequest - */ -class UpdateViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new view. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\ContactCenterInsights\V1\View $view Required. The new view. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\ContactCenterInsights\V1\UpdateViewRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ContactCenterInsights\V1\View $view, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setView($view) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ContactCenterInsights\V1\View $view - * Required. The new view. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new view. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\View|null - */ - public function getView() - { - return $this->view; - } - - public function hasView() - { - return isset($this->view); - } - - public function clearView() - { - unset($this->view); - } - - /** - * Required. The new view. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.View view = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\View $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\View::class); - $this->view = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationMetadata.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationMetadata.php deleted file mode 100644 index 3d20791c0681..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationMetadata.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.contactcenterinsights.v1.UploadConversationMetadata - */ -class UploadConversationMetadata 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. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UploadConversationRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $request = null; - /** - * Output only. The operation name for a successfully created analysis - * operation, if any. - * - * Generated from protobuf field string analysis_operation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $analysis_operation = ''; - /** - * Output only. The redaction config applied to the uploaded conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig applied_redaction_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $applied_redaction_config = null; - - /** - * 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\UploadConversationRequest $request - * Output only. The original request. - * @type string $analysis_operation - * Output only. The operation name for a successfully created analysis - * operation, if any. - * @type \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $applied_redaction_config - * Output only. The redaction config applied to the uploaded conversation. - * } - */ - 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. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UploadConversationRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ContactCenterInsights\V1\UploadConversationRequest|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. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.UploadConversationRequest request = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ContactCenterInsights\V1\UploadConversationRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\UploadConversationRequest::class); - $this->request = $var; - - return $this; - } - - /** - * Output only. The operation name for a successfully created analysis - * operation, if any. - * - * Generated from protobuf field string analysis_operation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAnalysisOperation() - { - return $this->analysis_operation; - } - - /** - * Output only. The operation name for a successfully created analysis - * operation, if any. - * - * Generated from protobuf field string analysis_operation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAnalysisOperation($var) - { - GPBUtil::checkString($var, True); - $this->analysis_operation = $var; - - return $this; - } - - /** - * Output only. The redaction config applied to the uploaded conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig applied_redaction_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ContactCenterInsights\V1\RedactionConfig|null - */ - public function getAppliedRedactionConfig() - { - return $this->applied_redaction_config; - } - - public function hasAppliedRedactionConfig() - { - return isset($this->applied_redaction_config); - } - - public function clearAppliedRedactionConfig() - { - unset($this->applied_redaction_config); - } - - /** - * Output only. The redaction config applied to the uploaded conversation. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig applied_redaction_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $var - * @return $this - */ - public function setAppliedRedactionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\RedactionConfig::class); - $this->applied_redaction_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationRequest.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationRequest.php deleted file mode 100644 index 443a3b1398eb..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/UploadConversationRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.contactcenterinsights.v1.UploadConversationRequest - */ -class UploadConversationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the conversation. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The conversation resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation = null; - /** - * Optional. A unique ID for the new conversation. This ID will become the - * final component of the conversation's resource name. If no ID is specified, - * a server-generated ID will be used. - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * - * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $conversation_id = ''; - /** - * Optional. DLP settings for transcript redaction. Will default to the config - * specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $redaction_config = null; - /** - * Optional. Speech-to-Text configuration. Will default to the config - * specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $speech_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the conversation. - * @type \Google\Cloud\ContactCenterInsights\V1\Conversation $conversation - * Required. The conversation resource to create. - * @type string $conversation_id - * Optional. A unique ID for the new conversation. This ID will become the - * final component of the conversation's resource name. If no ID is specified, - * a server-generated ID will be used. - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * @type \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $redaction_config - * Optional. DLP settings for transcript redaction. Will default to the config - * specified in Settings. - * @type \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $speech_config - * Optional. Speech-to-Text configuration. Will default to the config - * specified in Settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the conversation. - * - * 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 conversation. - * - * 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; - } - - /** - * Required. The conversation resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ContactCenterInsights\V1\Conversation|null - */ - public function getConversation() - { - return $this->conversation; - } - - public function hasConversation() - { - return isset($this->conversation); - } - - public function clearConversation() - { - unset($this->conversation); - } - - /** - * Required. The conversation resource to create. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ContactCenterInsights\V1\Conversation $var - * @return $this - */ - public function setConversation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Conversation::class); - $this->conversation = $var; - - return $this; - } - - /** - * Optional. A unique ID for the new conversation. This ID will become the - * final component of the conversation's resource name. If no ID is specified, - * a server-generated ID will be used. - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * - * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getConversationId() - { - return $this->conversation_id; - } - - /** - * Optional. A unique ID for the new conversation. This ID will become the - * final component of the conversation's resource name. If no ID is specified, - * a server-generated ID will be used. - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * - * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setConversationId($var) - { - GPBUtil::checkString($var, True); - $this->conversation_id = $var; - - return $this; - } - - /** - * Optional. DLP settings for transcript redaction. Will default to the config - * specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ContactCenterInsights\V1\RedactionConfig|null - */ - public function getRedactionConfig() - { - return $this->redaction_config; - } - - public function hasRedactionConfig() - { - return isset($this->redaction_config); - } - - public function clearRedactionConfig() - { - unset($this->redaction_config); - } - - /** - * Optional. DLP settings for transcript redaction. Will default to the config - * specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.RedactionConfig redaction_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ContactCenterInsights\V1\RedactionConfig $var - * @return $this - */ - public function setRedactionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\RedactionConfig::class); - $this->redaction_config = $var; - - return $this; - } - - /** - * Optional. Speech-to-Text configuration. Will default to the config - * specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ContactCenterInsights\V1\SpeechConfig|null - */ - public function getSpeechConfig() - { - return $this->speech_config; - } - - public function hasSpeechConfig() - { - return isset($this->speech_config); - } - - public function clearSpeechConfig() - { - unset($this->speech_config); - } - - /** - * Optional. Speech-to-Text configuration. Will default to the config - * specified in Settings. - * - * Generated from protobuf field .google.cloud.contactcenterinsights.v1.SpeechConfig speech_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ContactCenterInsights\V1\SpeechConfig $var - * @return $this - */ - public function setSpeechConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SpeechConfig::class); - $this->speech_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/View.php b/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/View.php deleted file mode 100644 index 286533d5ad37..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/proto/src/Google/Cloud/ContactCenterInsights/V1/View.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.contactcenterinsights.v1.View - */ -class View extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the view. - * Format: - * projects/{project}/locations/{location}/views/{view} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * The human-readable display name of the view. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Output only. The time at which this view was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The most recent time at which the view was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * String with specific view properties, must be non-empty. - * - * Generated from protobuf field string value = 5; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of the view. - * Format: - * projects/{project}/locations/{location}/views/{view} - * @type string $display_name - * The human-readable display name of the view. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this view was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The most recent time at which the view was updated. - * @type string $value - * String with specific view properties, must be non-empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of the view. - * Format: - * projects/{project}/locations/{location}/views/{view} - * - * 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 view. - * Format: - * projects/{project}/locations/{location}/views/{view} - * - * 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; - } - - /** - * The human-readable display name of the view. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human-readable display name of the view. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The time at which this view was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 at which this view was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.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 most recent time at which the view was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The most recent time at which the view was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * String with specific view properties, must be non-empty. - * - * Generated from protobuf field string value = 5; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * String with specific view properties, must be non-empty. - * - * Generated from protobuf field string value = 5; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php deleted file mode 100644 index 6690b28c662a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setFilter($filter) - ->setAnalysisPercentage($analysisPercentage); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->bulkAnalyzeConversations($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BulkAnalyzeConversationsResponse $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]'); - $filter = '[FILTER]'; - $analysisPercentage = 0.0; - - bulk_analyze_conversations_sample($formattedParent, $filter, $analysisPercentage); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php deleted file mode 100644 index 6e906a6f7abf..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->bulkDeleteConversations($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BulkDeleteConversationsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); - - bulk_delete_conversations_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php deleted file mode 100644 index bb94021bdbba..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php +++ /dev/null @@ -1,75 +0,0 @@ -setIssueModel($formattedIssueModel); - - // Call the API and handle any network failures. - try { - /** @var CalculateIssueModelStatsResponse $response */ - $response = $contactCenterInsightsClient->calculateIssueModelStats($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 -{ - $formattedIssueModel = ContactCenterInsightsClient::issueModelName( - '[PROJECT]', - '[LOCATION]', - '[ISSUE_MODEL]' - ); - - calculate_issue_model_stats_sample($formattedIssueModel); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_stats.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_stats.php deleted file mode 100644 index f995fedb1279..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/calculate_stats.php +++ /dev/null @@ -1,71 +0,0 @@ -setLocation($formattedLocation); - - // Call the API and handle any network failures. - try { - /** @var CalculateStatsResponse $response */ - $response = $contactCenterInsightsClient->calculateStats($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 -{ - $formattedLocation = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); - - calculate_stats_sample($formattedLocation); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_CalculateStats_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_analysis.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_analysis.php deleted file mode 100644 index b60e85cac938..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_analysis.php +++ /dev/null @@ -1,90 +0,0 @@ -setParent($formattedParent) - ->setAnalysis($analysis); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->createAnalysis($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Analysis $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::conversationName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION]' - ); - - create_analysis_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_conversation.php deleted file mode 100644 index d46c9f731d66..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_conversation.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent) - ->setConversation($conversation); - - // Call the API and handle any network failures. - try { - /** @var Conversation $response */ - $response = $contactCenterInsightsClient->createConversation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); - - create_conversation_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_issue_model.php deleted file mode 100644 index 52df0b52274a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_issue_model.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setIssueModel($issueModel); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->createIssueModel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var IssueModel $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]'); - - create_issue_model_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php deleted file mode 100644 index 832ef0278454..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations/` or `projects//locations/` - * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - * @param int $phraseMatcherType The type of this phrase matcher. - */ -function create_phrase_matcher_sample(string $formattedParent, int $phraseMatcherType): void -{ - // Create a client. - $contactCenterInsightsClient = new ContactCenterInsightsClient(); - - // Prepare the request message. - $phraseMatcher = (new PhraseMatcher()) - ->setType($phraseMatcherType); - $request = (new CreatePhraseMatcherRequest()) - ->setParent($formattedParent) - ->setPhraseMatcher($phraseMatcher); - - // Call the API and handle any network failures. - try { - /** @var PhraseMatcher $response */ - $response = $contactCenterInsightsClient->createPhraseMatcher($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - - create_phrase_matcher_sample($formattedParent, $phraseMatcherType); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreatePhraseMatcher_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_view.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_view.php deleted file mode 100644 index 63fb46395bc7..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/create_view.php +++ /dev/null @@ -1,76 +0,0 @@ -/locations/` or - * `projects//locations/` - * Please see {@see ContactCenterInsightsClient::locationName()} for help formatting this field. - */ -function create_view_sample(string $formattedParent): void -{ - // Create a client. - $contactCenterInsightsClient = new ContactCenterInsightsClient(); - - // Prepare the request message. - $view = new View(); - $request = (new CreateViewRequest()) - ->setParent($formattedParent) - ->setView($view); - - // Call the API and handle any network failures. - try { - /** @var View $response */ - $response = $contactCenterInsightsClient->createView($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); - - create_view_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_analysis.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_analysis.php deleted file mode 100644 index e8351966a415..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_analysis.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $contactCenterInsightsClient->deleteAnalysis($request); - printf('Call completed successfully.' . PHP_EOL); - } 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::analysisName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION]', - '[ANALYSIS]' - ); - - delete_analysis_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysis_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_conversation.php deleted file mode 100644 index 6cc0b0567122..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_conversation.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $contactCenterInsightsClient->deleteConversation($request); - printf('Call completed successfully.' . PHP_EOL); - } 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::conversationName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION]' - ); - - delete_conversation_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue.php deleted file mode 100644 index 9d99a2fd60dd..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $contactCenterInsightsClient->deleteIssue($request); - printf('Call completed successfully.' . PHP_EOL); - } 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::issueName( - '[PROJECT]', - '[LOCATION]', - '[ISSUE_MODEL]', - '[ISSUE]' - ); - - delete_issue_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue_model.php deleted file mode 100644 index 9ad6d1ce3309..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_issue_model.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->deleteIssueModel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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]' - ); - - delete_issue_model_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php deleted file mode 100644 index 5cd2536f00a8..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $contactCenterInsightsClient->deletePhraseMatcher($request); - printf('Call completed successfully.' . PHP_EOL); - } 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::phraseMatcherName( - '[PROJECT]', - '[LOCATION]', - '[PHRASE_MATCHER]' - ); - - delete_phrase_matcher_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeletePhraseMatcher_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_view.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_view.php deleted file mode 100644 index 274ddeabf34f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/delete_view.php +++ /dev/null @@ -1,69 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $contactCenterInsightsClient->deleteView($request); - printf('Call completed successfully.' . PHP_EOL); - } 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::viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - - delete_view_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/deploy_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/deploy_issue_model.php deleted file mode 100644 index d1ea724d467f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/deploy_issue_model.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->deployIssueModel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DeployIssueModelResponse $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]' - ); - - deploy_issue_model_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/export_insights_data.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/export_insights_data.php deleted file mode 100644 index 2522e777dff7..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/export_insights_data.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->exportInsightsData($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportInsightsDataResponse $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]'); - - export_insights_data_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_analysis.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_analysis.php deleted file mode 100644 index b78f24b6bd1b..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_analysis.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Analysis $response */ - $response = $contactCenterInsightsClient->getAnalysis($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::analysisName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION]', - '[ANALYSIS]' - ); - - get_analysis_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysis_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_conversation.php deleted file mode 100644 index 917c5b106dc5..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_conversation.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Conversation $response */ - $response = $contactCenterInsightsClient->getConversation($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::conversationName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION]' - ); - - get_conversation_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue.php deleted file mode 100644 index 827a0427389a..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Issue $response */ - $response = $contactCenterInsightsClient->getIssue($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::issueName( - '[PROJECT]', - '[LOCATION]', - '[ISSUE_MODEL]', - '[ISSUE]' - ); - - get_issue_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue_model.php deleted file mode 100644 index cf58a527197e..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_issue_model.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var IssueModel $response */ - $response = $contactCenterInsightsClient->getIssueModel($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::issueModelName( - '[PROJECT]', - '[LOCATION]', - '[ISSUE_MODEL]' - ); - - get_issue_model_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php deleted file mode 100644 index 990c38002eae..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PhraseMatcher $response */ - $response = $contactCenterInsightsClient->getPhraseMatcher($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::phraseMatcherName( - '[PROJECT]', - '[LOCATION]', - '[PHRASE_MATCHER]' - ); - - get_phrase_matcher_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_settings.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_settings.php deleted file mode 100644 index a142011799b0..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_settings.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Settings $response */ - $response = $contactCenterInsightsClient->getSettings($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::settingsName('[PROJECT]', '[LOCATION]'); - - get_settings_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetSettings_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_view.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_view.php deleted file mode 100644 index ae60b0ad8f63..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/get_view.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var View $response */ - $response = $contactCenterInsightsClient->getView($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::viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - - get_view_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetView_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/ingest_conversations.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/ingest_conversations.php deleted file mode 100644 index 9d71a25dfc94..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/ingest_conversations.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->ingestConversations($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var IngestConversationsResponse $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]'); - - ingest_conversations_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_analyses.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_analyses.php deleted file mode 100644 index cdb1e6f2d644..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_analyses.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $contactCenterInsightsClient->listAnalyses($request); - - /** @var Analysis $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ContactCenterInsightsClient::conversationName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION]' - ); - - list_analyses_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_conversations.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_conversations.php deleted file mode 100644 index 5665534facf9..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_conversations.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $contactCenterInsightsClient->listConversations($request); - - /** @var Conversation $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->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]'); - - list_conversations_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issue_models.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issue_models.php deleted file mode 100644 index 12084d5b56ed..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issue_models.php +++ /dev/null @@ -1,71 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListIssueModelsResponse $response */ - $response = $contactCenterInsightsClient->listIssueModels($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ContactCenterInsightsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_issue_models_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListIssueModels_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issues.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issues.php deleted file mode 100644 index de159edab9c2..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_issues.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListIssuesResponse $response */ - $response = $contactCenterInsightsClient->listIssues($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ContactCenterInsightsClient::issueModelName( - '[PROJECT]', - '[LOCATION]', - '[ISSUE_MODEL]' - ); - - list_issues_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListIssues_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php deleted file mode 100644 index 2b7b25cb5d51..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $contactCenterInsightsClient->listPhraseMatchers($request); - - /** @var PhraseMatcher $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->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]'); - - list_phrase_matchers_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_views.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_views.php deleted file mode 100644 index d521e8bfdc96..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/list_views.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $contactCenterInsightsClient->listViews($request); - - /** @var View $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->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]'); - - list_views_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php deleted file mode 100644 index 6cc320d110b2..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->undeployIssueModel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UndeployIssueModelResponse $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]' - ); - - undeploy_issue_model_sample($formattedName); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_conversation.php deleted file mode 100644 index c77275e00e38..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_conversation.php +++ /dev/null @@ -1,59 +0,0 @@ -setConversation($conversation); - - // Call the API and handle any network failures. - try { - /** @var Conversation $response */ - $response = $contactCenterInsightsClient->updateConversation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue.php deleted file mode 100644 index aa18755dcf5e..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue.php +++ /dev/null @@ -1,59 +0,0 @@ -setIssue($issue); - - // Call the API and handle any network failures. - try { - /** @var Issue $response */ - $response = $contactCenterInsightsClient->updateIssue($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssue_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue_model.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue_model.php deleted file mode 100644 index 89ea454ea827..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_issue_model.php +++ /dev/null @@ -1,59 +0,0 @@ -setIssueModel($issueModel); - - // Call the API and handle any network failures. - try { - /** @var IssueModel $response */ - $response = $contactCenterInsightsClient->updateIssueModel($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssueModel_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php deleted file mode 100644 index 543ffbc2a74d..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php +++ /dev/null @@ -1,73 +0,0 @@ -setType($phraseMatcherType); - $request = (new UpdatePhraseMatcherRequest()) - ->setPhraseMatcher($phraseMatcher); - - // Call the API and handle any network failures. - try { - /** @var PhraseMatcher $response */ - $response = $contactCenterInsightsClient->updatePhraseMatcher($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 -{ - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - - update_phrase_matcher_sample($phraseMatcherType); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdatePhraseMatcher_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_settings.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_settings.php deleted file mode 100644 index aaafe4bb653c..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_settings.php +++ /dev/null @@ -1,62 +0,0 @@ -setSettings($settings) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Settings $response */ - $response = $contactCenterInsightsClient->updateSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateSettings_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_view.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_view.php deleted file mode 100644 index a4cbd719634c..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/update_view.php +++ /dev/null @@ -1,59 +0,0 @@ -setView($view); - - // Call the API and handle any network failures. - try { - /** @var View $response */ - $response = $contactCenterInsightsClient->updateView($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/upload_conversation.php b/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/upload_conversation.php deleted file mode 100644 index 84921be71da8..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/samples/V1/ContactCenterInsightsClient/upload_conversation.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent) - ->setConversation($conversation); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $contactCenterInsightsClient->uploadConversation($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Conversation $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]'); - - upload_conversation_sample($formattedParent); -} -// [END contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_sync] diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/Client/ContactCenterInsightsClient.php b/owl-bot-staging/ContactCenterInsights/v1/src/V1/Client/ContactCenterInsightsClient.php deleted file mode 100644 index a07f8f8b0df2..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/src/V1/Client/ContactCenterInsightsClient.php +++ /dev/null @@ -1,1609 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/contact_center_insights_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/contact_center_insights_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/contact_center_insights_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/contact_center_insights_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a analysis - * resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * @param string $analysis - * - * @return string The formatted analysis resource. - */ - public static function analysisName(string $project, string $location, string $conversation, string $analysis): string - { - return self::getPathTemplate('analysis')->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - 'analysis' => $analysis, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a conversation - * resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * - * @return string The formatted conversation resource. - */ - public static function conversationName(string $project, string $location, string $conversation): string - { - return self::getPathTemplate('conversation')->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * conversation_profile resource. - * - * @param string $project - * @param string $location - * @param string $conversationProfile - * - * @return string The formatted conversation_profile resource. - */ - public static function conversationProfileName(string $project, string $location, string $conversationProfile): string - { - return self::getPathTemplate('conversationProfile')->render([ - 'project' => $project, - 'location' => $location, - 'conversation_profile' => $conversationProfile, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a issue - * resource. - * - * @param string $project - * @param string $location - * @param string $issueModel - * @param string $issue - * - * @return string The formatted issue resource. - */ - public static function issueName(string $project, string $location, string $issueModel, string $issue): string - { - return self::getPathTemplate('issue')->render([ - 'project' => $project, - 'location' => $location, - 'issue_model' => $issueModel, - 'issue' => $issue, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a issue_model - * resource. - * - * @param string $project - * @param string $location - * @param string $issueModel - * - * @return string The formatted issue_model resource. - */ - public static function issueModelName(string $project, string $location, string $issueModel): string - { - return self::getPathTemplate('issueModel')->render([ - 'project' => $project, - 'location' => $location, - 'issue_model' => $issueModel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a participant - * resource. - * - * @param string $project - * @param string $conversation - * @param string $participant - * - * @return string The formatted participant resource. - */ - public static function participantName(string $project, string $conversation, string $participant): string - { - return self::getPathTemplate('participant')->render([ - 'project' => $project, - 'conversation' => $conversation, - 'participant' => $participant, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * phrase_matcher resource. - * - * @param string $project - * @param string $location - * @param string $phraseMatcher - * - * @return string The formatted phrase_matcher resource. - */ - public static function phraseMatcherName(string $project, string $location, string $phraseMatcher): string - { - return self::getPathTemplate('phraseMatcher')->render([ - 'project' => $project, - 'location' => $location, - 'phrase_matcher' => $phraseMatcher, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_conversation_participant resource. - * - * @param string $project - * @param string $conversation - * @param string $participant - * - * @return string The formatted project_conversation_participant resource. - */ - public static function projectConversationParticipantName(string $project, string $conversation, string $participant): string - { - return self::getPathTemplate('projectConversationParticipant')->render([ - 'project' => $project, - 'conversation' => $conversation, - 'participant' => $participant, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_conversation_participant resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * @param string $participant - * - * @return string The formatted project_location_conversation_participant resource. - */ - public static function projectLocationConversationParticipantName(string $project, string $location, string $conversation, string $participant): string - { - return self::getPathTemplate('projectLocationConversationParticipant')->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - 'participant' => $participant, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a recognizer - * resource. - * - * @param string $project - * @param string $location - * @param string $recognizer - * - * @return string The formatted recognizer resource. - */ - public static function recognizerName(string $project, string $location, string $recognizer): string - { - return self::getPathTemplate('recognizer')->render([ - 'project' => $project, - 'location' => $location, - 'recognizer' => $recognizer, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a settings - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted settings resource. - */ - public static function settingsName(string $project, string $location): string - { - return self::getPathTemplate('settings')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a view - * resource. - * - * @param string $project - * @param string $location - * @param string $view - * - * @return string The formatted view resource. - */ - public static function viewName(string $project, string $location, string $view): string - { - return self::getPathTemplate('view')->render([ - 'project' => $project, - 'location' => $location, - 'view' => $view, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - analysis: projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} - * - conversation: projects/{project}/locations/{location}/conversations/{conversation} - * - conversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} - * - issue: projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * - issueModel: projects/{project}/locations/{location}/issueModels/{issue_model} - * - location: projects/{project}/locations/{location} - * - participant: projects/{project}/conversations/{conversation}/participants/{participant} - * - phraseMatcher: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * - projectConversationParticipant: projects/{project}/conversations/{conversation}/participants/{participant} - * - projectLocationConversationParticipant: projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * - recognizer: projects/{project}/locations/{location}/recognizers/{recognizer} - * - settings: projects/{project}/locations/{location}/settings - * - view: projects/{project}/locations/{location}/views/{view} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'contactcenterinsights.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Analyzes multiple conversations in a single request. - * - * The async variant is - * {@see ContactCenterInsightsClient::bulkAnalyzeConversationsAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/bulk_analyze_conversations.php - * - * @param BulkAnalyzeConversationsRequest $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 bulkAnalyzeConversations(BulkAnalyzeConversationsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BulkAnalyzeConversations', $request, $callOptions)->wait(); - } - - /** - * Deletes multiple conversations in a single request. - * - * The async variant is - * {@see ContactCenterInsightsClient::bulkDeleteConversationsAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/bulk_delete_conversations.php - * - * @param BulkDeleteConversationsRequest $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 bulkDeleteConversations(BulkDeleteConversationsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BulkDeleteConversations', $request, $callOptions)->wait(); - } - - /** - * Gets an issue model's statistics. - * - * The async variant is - * {@see ContactCenterInsightsClient::calculateIssueModelStatsAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/calculate_issue_model_stats.php - * - * @param CalculateIssueModelStatsRequest $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 CalculateIssueModelStatsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function calculateIssueModelStats(CalculateIssueModelStatsRequest $request, array $callOptions = []): CalculateIssueModelStatsResponse - { - return $this->startApiCall('CalculateIssueModelStats', $request, $callOptions)->wait(); - } - - /** - * Gets conversation statistics. - * - * The async variant is {@see ContactCenterInsightsClient::calculateStatsAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/calculate_stats.php - * - * @param CalculateStatsRequest $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 CalculateStatsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function calculateStats(CalculateStatsRequest $request, array $callOptions = []): CalculateStatsResponse - { - return $this->startApiCall('CalculateStats', $request, $callOptions)->wait(); - } - - /** - * Creates an analysis. The long running operation is done when the analysis - * has completed. - * - * The async variant is {@see ContactCenterInsightsClient::createAnalysisAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/create_analysis.php - * - * @param CreateAnalysisRequest $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 createAnalysis(CreateAnalysisRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAnalysis', $request, $callOptions)->wait(); - } - - /** - * Creates a conversation. - * - * The async variant is - * {@see ContactCenterInsightsClient::createConversationAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/create_conversation.php - * - * @param CreateConversationRequest $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 Conversation - * - * @throws ApiException Thrown if the API call fails. - */ - public function createConversation(CreateConversationRequest $request, array $callOptions = []): Conversation - { - return $this->startApiCall('CreateConversation', $request, $callOptions)->wait(); - } - - /** - * Creates an issue model. - * - * The async variant is {@see ContactCenterInsightsClient::createIssueModelAsync()} - * . - * - * @example samples/V1/ContactCenterInsightsClient/create_issue_model.php - * - * @param CreateIssueModelRequest $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 createIssueModel(CreateIssueModelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateIssueModel', $request, $callOptions)->wait(); - } - - /** - * Creates a phrase matcher. - * - * The async variant is - * {@see ContactCenterInsightsClient::createPhraseMatcherAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/create_phrase_matcher.php - * - * @param CreatePhraseMatcherRequest $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 PhraseMatcher - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPhraseMatcher(CreatePhraseMatcherRequest $request, array $callOptions = []): PhraseMatcher - { - return $this->startApiCall('CreatePhraseMatcher', $request, $callOptions)->wait(); - } - - /** - * Creates a view. - * - * The async variant is {@see ContactCenterInsightsClient::createViewAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/create_view.php - * - * @param CreateViewRequest $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 View - * - * @throws ApiException Thrown if the API call fails. - */ - public function createView(CreateViewRequest $request, array $callOptions = []): View - { - return $this->startApiCall('CreateView', $request, $callOptions)->wait(); - } - - /** - * Deletes an analysis. - * - * The async variant is {@see ContactCenterInsightsClient::deleteAnalysisAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/delete_analysis.php - * - * @param DeleteAnalysisRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAnalysis(DeleteAnalysisRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAnalysis', $request, $callOptions)->wait(); - } - - /** - * Deletes a conversation. - * - * The async variant is - * {@see ContactCenterInsightsClient::deleteConversationAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/delete_conversation.php - * - * @param DeleteConversationRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteConversation(DeleteConversationRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteConversation', $request, $callOptions)->wait(); - } - - /** - * Deletes an issue. - * - * The async variant is {@see ContactCenterInsightsClient::deleteIssueAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/delete_issue.php - * - * @param DeleteIssueRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteIssue(DeleteIssueRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteIssue', $request, $callOptions)->wait(); - } - - /** - * Deletes an issue model. - * - * The async variant is {@see ContactCenterInsightsClient::deleteIssueModelAsync()} - * . - * - * @example samples/V1/ContactCenterInsightsClient/delete_issue_model.php - * - * @param DeleteIssueModelRequest $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 deleteIssueModel(DeleteIssueModelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteIssueModel', $request, $callOptions)->wait(); - } - - /** - * Deletes a phrase matcher. - * - * The async variant is - * {@see ContactCenterInsightsClient::deletePhraseMatcherAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/delete_phrase_matcher.php - * - * @param DeletePhraseMatcherRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePhraseMatcher(DeletePhraseMatcherRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeletePhraseMatcher', $request, $callOptions)->wait(); - } - - /** - * Deletes a view. - * - * The async variant is {@see ContactCenterInsightsClient::deleteViewAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/delete_view.php - * - * @param DeleteViewRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteView(DeleteViewRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteView', $request, $callOptions)->wait(); - } - - /** - * Deploys an issue model. Returns an error if a model is already deployed. - * An issue model can only be used in analysis after it has been deployed. - * - * The async variant is {@see ContactCenterInsightsClient::deployIssueModelAsync()} - * . - * - * @example samples/V1/ContactCenterInsightsClient/deploy_issue_model.php - * - * @param DeployIssueModelRequest $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 deployIssueModel(DeployIssueModelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeployIssueModel', $request, $callOptions)->wait(); - } - - /** - * Export insights data to a destination defined in the request body. - * - * The async variant is - * {@see ContactCenterInsightsClient::exportInsightsDataAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/export_insights_data.php - * - * @param ExportInsightsDataRequest $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 exportInsightsData(ExportInsightsDataRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportInsightsData', $request, $callOptions)->wait(); - } - - /** - * Gets an analysis. - * - * The async variant is {@see ContactCenterInsightsClient::getAnalysisAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/get_analysis.php - * - * @param GetAnalysisRequest $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 Analysis - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAnalysis(GetAnalysisRequest $request, array $callOptions = []): Analysis - { - return $this->startApiCall('GetAnalysis', $request, $callOptions)->wait(); - } - - /** - * Gets a conversation. - * - * The async variant is {@see ContactCenterInsightsClient::getConversationAsync()} - * . - * - * @example samples/V1/ContactCenterInsightsClient/get_conversation.php - * - * @param GetConversationRequest $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 Conversation - * - * @throws ApiException Thrown if the API call fails. - */ - public function getConversation(GetConversationRequest $request, array $callOptions = []): Conversation - { - return $this->startApiCall('GetConversation', $request, $callOptions)->wait(); - } - - /** - * Gets an issue. - * - * The async variant is {@see ContactCenterInsightsClient::getIssueAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/get_issue.php - * - * @param GetIssueRequest $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 Issue - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIssue(GetIssueRequest $request, array $callOptions = []): Issue - { - return $this->startApiCall('GetIssue', $request, $callOptions)->wait(); - } - - /** - * Gets an issue model. - * - * The async variant is {@see ContactCenterInsightsClient::getIssueModelAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/get_issue_model.php - * - * @param GetIssueModelRequest $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 IssueModel - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIssueModel(GetIssueModelRequest $request, array $callOptions = []): IssueModel - { - return $this->startApiCall('GetIssueModel', $request, $callOptions)->wait(); - } - - /** - * Gets a phrase matcher. - * - * The async variant is {@see ContactCenterInsightsClient::getPhraseMatcherAsync()} - * . - * - * @example samples/V1/ContactCenterInsightsClient/get_phrase_matcher.php - * - * @param GetPhraseMatcherRequest $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 PhraseMatcher - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPhraseMatcher(GetPhraseMatcherRequest $request, array $callOptions = []): PhraseMatcher - { - return $this->startApiCall('GetPhraseMatcher', $request, $callOptions)->wait(); - } - - /** - * Gets project-level settings. - * - * The async variant is {@see ContactCenterInsightsClient::getSettingsAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/get_settings.php - * - * @param GetSettingsRequest $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 Settings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSettings(GetSettingsRequest $request, array $callOptions = []): Settings - { - return $this->startApiCall('GetSettings', $request, $callOptions)->wait(); - } - - /** - * Gets a view. - * - * The async variant is {@see ContactCenterInsightsClient::getViewAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/get_view.php - * - * @param GetViewRequest $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 View - * - * @throws ApiException Thrown if the API call fails. - */ - public function getView(GetViewRequest $request, array $callOptions = []): View - { - return $this->startApiCall('GetView', $request, $callOptions)->wait(); - } - - /** - * Imports conversations and processes them according to the user's - * configuration. - * - * The async variant is - * {@see ContactCenterInsightsClient::ingestConversationsAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/ingest_conversations.php - * - * @param IngestConversationsRequest $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 ingestConversations(IngestConversationsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('IngestConversations', $request, $callOptions)->wait(); - } - - /** - * Lists analyses. - * - * The async variant is {@see ContactCenterInsightsClient::listAnalysesAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/list_analyses.php - * - * @param ListAnalysesRequest $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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAnalyses(ListAnalysesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAnalyses', $request, $callOptions); - } - - /** - * Lists conversations. - * - * The async variant is - * {@see ContactCenterInsightsClient::listConversationsAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/list_conversations.php - * - * @param ListConversationsRequest $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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listConversations(ListConversationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListConversations', $request, $callOptions); - } - - /** - * Lists issue models. - * - * The async variant is {@see ContactCenterInsightsClient::listIssueModelsAsync()} - * . - * - * @example samples/V1/ContactCenterInsightsClient/list_issue_models.php - * - * @param ListIssueModelsRequest $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 ListIssueModelsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listIssueModels(ListIssueModelsRequest $request, array $callOptions = []): ListIssueModelsResponse - { - return $this->startApiCall('ListIssueModels', $request, $callOptions)->wait(); - } - - /** - * Lists issues. - * - * The async variant is {@see ContactCenterInsightsClient::listIssuesAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/list_issues.php - * - * @param ListIssuesRequest $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 ListIssuesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listIssues(ListIssuesRequest $request, array $callOptions = []): ListIssuesResponse - { - return $this->startApiCall('ListIssues', $request, $callOptions)->wait(); - } - - /** - * Lists phrase matchers. - * - * The async variant is - * {@see ContactCenterInsightsClient::listPhraseMatchersAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/list_phrase_matchers.php - * - * @param ListPhraseMatchersRequest $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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPhraseMatchers(ListPhraseMatchersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPhraseMatchers', $request, $callOptions); - } - - /** - * Lists views. - * - * The async variant is {@see ContactCenterInsightsClient::listViewsAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/list_views.php - * - * @param ListViewsRequest $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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listViews(ListViewsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListViews', $request, $callOptions); - } - - /** - * Undeploys an issue model. - * An issue model can not be used in analysis after it has been undeployed. - * - * The async variant is - * {@see ContactCenterInsightsClient::undeployIssueModelAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/undeploy_issue_model.php - * - * @param UndeployIssueModelRequest $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 undeployIssueModel(UndeployIssueModelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UndeployIssueModel', $request, $callOptions)->wait(); - } - - /** - * Updates a conversation. - * - * The async variant is - * {@see ContactCenterInsightsClient::updateConversationAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/update_conversation.php - * - * @param UpdateConversationRequest $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 Conversation - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateConversation(UpdateConversationRequest $request, array $callOptions = []): Conversation - { - return $this->startApiCall('UpdateConversation', $request, $callOptions)->wait(); - } - - /** - * Updates an issue. - * - * The async variant is {@see ContactCenterInsightsClient::updateIssueAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/update_issue.php - * - * @param UpdateIssueRequest $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 Issue - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateIssue(UpdateIssueRequest $request, array $callOptions = []): Issue - { - return $this->startApiCall('UpdateIssue', $request, $callOptions)->wait(); - } - - /** - * Updates an issue model. - * - * The async variant is {@see ContactCenterInsightsClient::updateIssueModelAsync()} - * . - * - * @example samples/V1/ContactCenterInsightsClient/update_issue_model.php - * - * @param UpdateIssueModelRequest $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 IssueModel - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateIssueModel(UpdateIssueModelRequest $request, array $callOptions = []): IssueModel - { - return $this->startApiCall('UpdateIssueModel', $request, $callOptions)->wait(); - } - - /** - * Updates a phrase matcher. - * - * The async variant is - * {@see ContactCenterInsightsClient::updatePhraseMatcherAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/update_phrase_matcher.php - * - * @param UpdatePhraseMatcherRequest $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 PhraseMatcher - * - * @throws ApiException Thrown if the API call fails. - */ - public function updatePhraseMatcher(UpdatePhraseMatcherRequest $request, array $callOptions = []): PhraseMatcher - { - return $this->startApiCall('UpdatePhraseMatcher', $request, $callOptions)->wait(); - } - - /** - * Updates project-level settings. - * - * The async variant is {@see ContactCenterInsightsClient::updateSettingsAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/update_settings.php - * - * @param UpdateSettingsRequest $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 Settings - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSettings(UpdateSettingsRequest $request, array $callOptions = []): Settings - { - return $this->startApiCall('UpdateSettings', $request, $callOptions)->wait(); - } - - /** - * Updates a view. - * - * The async variant is {@see ContactCenterInsightsClient::updateViewAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/update_view.php - * - * @param UpdateViewRequest $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 View - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateView(UpdateViewRequest $request, array $callOptions = []): View - { - return $this->startApiCall('UpdateView', $request, $callOptions)->wait(); - } - - /** - * Create a longrunning conversation upload operation. This method differs - * from CreateConversation by allowing audio transcription and optional DLP - * redaction. - * - * The async variant is - * {@see ContactCenterInsightsClient::uploadConversationAsync()} . - * - * @example samples/V1/ContactCenterInsightsClient/upload_conversation.php - * - * @param UploadConversationRequest $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 uploadConversation(UploadConversationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UploadConversation', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/ContactCenterInsightsClient.php b/owl-bot-staging/ContactCenterInsights/v1/src/V1/ContactCenterInsightsClient.php deleted file mode 100644 index 8c6b14f2b500..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/src/V1/ContactCenterInsightsClient.php +++ /dev/null @@ -1,34 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $filter = 'filter'; - * $analysisPercentage = 0.0; - * $operationResponse = $contactCenterInsightsClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'bulkAnalyzeConversations'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\ContactCenterInsights\V1\Client\ContactCenterInsightsClient}. - */ -class ContactCenterInsightsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.contactcenterinsights.v1.ContactCenterInsights'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'contactcenterinsights.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'contactcenterinsights.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $analysisNameTemplate; - - private static $conversationNameTemplate; - - private static $conversationProfileNameTemplate; - - private static $issueNameTemplate; - - private static $issueModelNameTemplate; - - private static $locationNameTemplate; - - private static $participantNameTemplate; - - private static $phraseMatcherNameTemplate; - - private static $projectConversationParticipantNameTemplate; - - private static $projectLocationConversationParticipantNameTemplate; - - private static $recognizerNameTemplate; - - private static $settingsNameTemplate; - - private static $viewNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/contact_center_insights_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/contact_center_insights_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/contact_center_insights_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/contact_center_insights_rest_client_config.php', - ], - ], - ]; - } - - private static function getAnalysisNameTemplate() - { - if (self::$analysisNameTemplate == null) { - self::$analysisNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}'); - } - - return self::$analysisNameTemplate; - } - - private static function getConversationNameTemplate() - { - if (self::$conversationNameTemplate == null) { - self::$conversationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}'); - } - - return self::$conversationNameTemplate; - } - - private static function getConversationProfileNameTemplate() - { - if (self::$conversationProfileNameTemplate == null) { - self::$conversationProfileNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}'); - } - - return self::$conversationProfileNameTemplate; - } - - private static function getIssueNameTemplate() - { - if (self::$issueNameTemplate == null) { - self::$issueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}'); - } - - return self::$issueNameTemplate; - } - - private static function getIssueModelNameTemplate() - { - if (self::$issueModelNameTemplate == null) { - self::$issueModelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/issueModels/{issue_model}'); - } - - return self::$issueModelNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getParticipantNameTemplate() - { - if (self::$participantNameTemplate == null) { - self::$participantNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/participants/{participant}'); - } - - return self::$participantNameTemplate; - } - - private static function getPhraseMatcherNameTemplate() - { - if (self::$phraseMatcherNameTemplate == null) { - self::$phraseMatcherNameTemplate = new PathTemplate('projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}'); - } - - return self::$phraseMatcherNameTemplate; - } - - private static function getProjectConversationParticipantNameTemplate() - { - if (self::$projectConversationParticipantNameTemplate == null) { - self::$projectConversationParticipantNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/participants/{participant}'); - } - - return self::$projectConversationParticipantNameTemplate; - } - - private static function getProjectLocationConversationParticipantNameTemplate() - { - if (self::$projectLocationConversationParticipantNameTemplate == null) { - self::$projectLocationConversationParticipantNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}'); - } - - return self::$projectLocationConversationParticipantNameTemplate; - } - - private static function getRecognizerNameTemplate() - { - if (self::$recognizerNameTemplate == null) { - self::$recognizerNameTemplate = new PathTemplate('projects/{project}/locations/{location}/recognizers/{recognizer}'); - } - - return self::$recognizerNameTemplate; - } - - private static function getSettingsNameTemplate() - { - if (self::$settingsNameTemplate == null) { - self::$settingsNameTemplate = new PathTemplate('projects/{project}/locations/{location}/settings'); - } - - return self::$settingsNameTemplate; - } - - private static function getViewNameTemplate() - { - if (self::$viewNameTemplate == null) { - self::$viewNameTemplate = new PathTemplate('projects/{project}/locations/{location}/views/{view}'); - } - - return self::$viewNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'analysis' => self::getAnalysisNameTemplate(), - 'conversation' => self::getConversationNameTemplate(), - 'conversationProfile' => self::getConversationProfileNameTemplate(), - 'issue' => self::getIssueNameTemplate(), - 'issueModel' => self::getIssueModelNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'participant' => self::getParticipantNameTemplate(), - 'phraseMatcher' => self::getPhraseMatcherNameTemplate(), - 'projectConversationParticipant' => self::getProjectConversationParticipantNameTemplate(), - 'projectLocationConversationParticipant' => self::getProjectLocationConversationParticipantNameTemplate(), - 'recognizer' => self::getRecognizerNameTemplate(), - 'settings' => self::getSettingsNameTemplate(), - 'view' => self::getViewNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a analysis - * resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * @param string $analysis - * - * @return string The formatted analysis resource. - */ - public static function analysisName($project, $location, $conversation, $analysis) - { - return self::getAnalysisNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - 'analysis' => $analysis, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a conversation - * resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * - * @return string The formatted conversation resource. - */ - public static function conversationName($project, $location, $conversation) - { - return self::getConversationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * conversation_profile resource. - * - * @param string $project - * @param string $location - * @param string $conversationProfile - * - * @return string The formatted conversation_profile resource. - */ - public static function conversationProfileName($project, $location, $conversationProfile) - { - return self::getConversationProfileNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation_profile' => $conversationProfile, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a issue - * resource. - * - * @param string $project - * @param string $location - * @param string $issueModel - * @param string $issue - * - * @return string The formatted issue resource. - */ - public static function issueName($project, $location, $issueModel, $issue) - { - return self::getIssueNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'issue_model' => $issueModel, - 'issue' => $issue, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a issue_model - * resource. - * - * @param string $project - * @param string $location - * @param string $issueModel - * - * @return string The formatted issue_model resource. - */ - public static function issueModelName($project, $location, $issueModel) - { - return self::getIssueModelNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'issue_model' => $issueModel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a participant - * resource. - * - * @param string $project - * @param string $conversation - * @param string $participant - * - * @return string The formatted participant resource. - */ - public static function participantName($project, $conversation, $participant) - { - return self::getParticipantNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - 'participant' => $participant, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * phrase_matcher resource. - * - * @param string $project - * @param string $location - * @param string $phraseMatcher - * - * @return string The formatted phrase_matcher resource. - */ - public static function phraseMatcherName($project, $location, $phraseMatcher) - { - return self::getPhraseMatcherNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'phrase_matcher' => $phraseMatcher, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_conversation_participant resource. - * - * @param string $project - * @param string $conversation - * @param string $participant - * - * @return string The formatted project_conversation_participant resource. - */ - public static function projectConversationParticipantName($project, $conversation, $participant) - { - return self::getProjectConversationParticipantNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - 'participant' => $participant, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_conversation_participant resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * @param string $participant - * - * @return string The formatted project_location_conversation_participant resource. - */ - public static function projectLocationConversationParticipantName($project, $location, $conversation, $participant) - { - return self::getProjectLocationConversationParticipantNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - 'participant' => $participant, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a recognizer - * resource. - * - * @param string $project - * @param string $location - * @param string $recognizer - * - * @return string The formatted recognizer resource. - */ - public static function recognizerName($project, $location, $recognizer) - { - return self::getRecognizerNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'recognizer' => $recognizer, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a settings - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted settings resource. - */ - public static function settingsName($project, $location) - { - return self::getSettingsNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a view - * resource. - * - * @param string $project - * @param string $location - * @param string $view - * - * @return string The formatted view resource. - */ - public static function viewName($project, $location, $view) - { - return self::getViewNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'view' => $view, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - analysis: projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} - * - conversation: projects/{project}/locations/{location}/conversations/{conversation} - * - conversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} - * - issue: projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} - * - issueModel: projects/{project}/locations/{location}/issueModels/{issue_model} - * - location: projects/{project}/locations/{location} - * - participant: projects/{project}/conversations/{conversation}/participants/{participant} - * - phraseMatcher: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} - * - projectConversationParticipant: projects/{project}/conversations/{conversation}/participants/{participant} - * - projectLocationConversationParticipant: projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * - recognizer: projects/{project}/locations/{location}/recognizers/{recognizer} - * - settings: projects/{project}/locations/{location}/settings - * - view: projects/{project}/locations/{location}/views/{view} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'contactcenterinsights.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Analyzes multiple conversations in a single request. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $filter = 'filter'; - * $analysisPercentage = 0.0; - * $operationResponse = $contactCenterInsightsClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'bulkAnalyzeConversations'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource to create analyses in. - * @param string $filter Required. Filter used to select the subset of conversations to analyze. - * @param float $analysisPercentage Required. Percentage of selected conversation to analyze, between - * [0, 100]. - * @param array $optionalArgs { - * Optional. - * - * @type AnnotatorSelector $annotatorSelector - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function bulkAnalyzeConversations($parent, $filter, $analysisPercentage, array $optionalArgs = []) - { - $request = new BulkAnalyzeConversationsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setFilter($filter); - $request->setAnalysisPercentage($analysisPercentage); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['annotatorSelector'])) { - $request->setAnnotatorSelector($optionalArgs['annotatorSelector']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BulkAnalyzeConversations', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes multiple conversations in a single request. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $operationResponse = $contactCenterInsightsClient->bulkDeleteConversations($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->bulkDeleteConversations($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'bulkDeleteConversations'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource to delete conversations from. - * Format: - * projects/{project}/locations/{location} - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Filter used to select the subset of conversations to delete. - * @type int $maxDeleteCount - * Maximum number of conversations to delete. - * @type bool $force - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function bulkDeleteConversations($parent, array $optionalArgs = []) - { - $request = new BulkDeleteConversationsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['maxDeleteCount'])) { - $request->setMaxDeleteCount($optionalArgs['maxDeleteCount']); - } - - if (isset($optionalArgs['force'])) { - $request->setForce($optionalArgs['force']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BulkDeleteConversations', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets an issue model's statistics. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedIssueModel = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - * $response = $contactCenterInsightsClient->calculateIssueModelStats($formattedIssueModel); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $issueModel Required. The resource name of the issue model to query against. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\CalculateIssueModelStatsResponse - * - * @throws ApiException if the remote call fails - */ - public function calculateIssueModelStats($issueModel, array $optionalArgs = []) - { - $request = new CalculateIssueModelStatsRequest(); - $requestParamHeaders = []; - $request->setIssueModel($issueModel); - $requestParamHeaders['issue_model'] = $issueModel; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CalculateIssueModelStats', CalculateIssueModelStatsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets conversation statistics. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedLocation = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $contactCenterInsightsClient->calculateStats($formattedLocation); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $location Required. The location of the conversations. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * A filter to reduce results to a specific subset. This field is useful for - * getting statistics about conversations with specific properties. - * @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 \Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse - * - * @throws ApiException if the remote call fails - */ - public function calculateStats($location, array $optionalArgs = []) - { - $request = new CalculateStatsRequest(); - $requestParamHeaders = []; - $request->setLocation($location); - $requestParamHeaders['location'] = $location; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CalculateStats', CalculateStatsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an analysis. The long running operation is done when the analysis - * has completed. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - * $analysis = new Analysis(); - * $operationResponse = $contactCenterInsightsClient->createAnalysis($formattedParent, $analysis); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->createAnalysis($formattedParent, $analysis); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'createAnalysis'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the analysis. - * @param Analysis $analysis Required. The analysis to create. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAnalysis($parent, $analysis, array $optionalArgs = []) - { - $request = new CreateAnalysisRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAnalysis($analysis); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAnalysis', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a conversation. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $conversation = new Conversation(); - * $response = $contactCenterInsightsClient->createConversation($formattedParent, $conversation); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the conversation. - * @param Conversation $conversation Required. The conversation resource to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $conversationId - * A unique ID for the new conversation. This ID will become the final - * component of the conversation's resource name. If no ID is specified, a - * server-generated ID will be used. - * - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * @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 \Google\Cloud\ContactCenterInsights\V1\Conversation - * - * @throws ApiException if the remote call fails - */ - public function createConversation($parent, $conversation, array $optionalArgs = []) - { - $request = new CreateConversationRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setConversation($conversation); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['conversationId'])) { - $request->setConversationId($optionalArgs['conversationId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateConversation', Conversation::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an issue model. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $issueModel = new IssueModel(); - * $operationResponse = $contactCenterInsightsClient->createIssueModel($formattedParent, $issueModel); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->createIssueModel($formattedParent, $issueModel); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'createIssueModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the issue model. - * @param IssueModel $issueModel Required. The issue model to create. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createIssueModel($parent, $issueModel, array $optionalArgs = []) - { - $request = new CreateIssueModelRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setIssueModel($issueModel); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateIssueModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a phrase matcher. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $phraseMatcher = new PhraseMatcher(); - * $response = $contactCenterInsightsClient->createPhraseMatcher($formattedParent, $phraseMatcher); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the phrase matcher. Required. The location - * to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` - * @param PhraseMatcher $phraseMatcher Required. The phrase matcher resource to create. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher - * - * @throws ApiException if the remote call fails - */ - public function createPhraseMatcher($parent, $phraseMatcher, array $optionalArgs = []) - { - $request = new CreatePhraseMatcherRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPhraseMatcher($phraseMatcher); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreatePhraseMatcher', PhraseMatcher::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a view. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $view = new View(); - * $response = $contactCenterInsightsClient->createView($formattedParent, $view); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the view. Required. The location to create - * a view for. - * Format: `projects//locations/` or - * `projects//locations/` - * @param View $view Required. The view resource to create. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\View - * - * @throws ApiException if the remote call fails - */ - public function createView($parent, $view, array $optionalArgs = []) - { - $request = new CreateViewRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setView($view); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateView', View::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an analysis. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - * $contactCenterInsightsClient->deleteAnalysis($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the analysis to delete. - * @param array $optionalArgs { - * 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. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteAnalysis($name, array $optionalArgs = []) - { - $request = new DeleteAnalysisRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAnalysis', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a conversation. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - * $contactCenterInsightsClient->deleteConversation($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the conversation to delete. - * @param array $optionalArgs { - * Optional. - * - * @type bool $force - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. - * @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. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteConversation($name, array $optionalArgs = []) - { - $request = new DeleteConversationRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['force'])) { - $request->setForce($optionalArgs['force']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteConversation', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an issue. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - * $contactCenterInsightsClient->deleteIssue($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the issue to delete. - * @param array $optionalArgs { - * 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. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteIssue($name, array $optionalArgs = []) - { - $request = new DeleteIssueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteIssue', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an issue model. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - * $operationResponse = $contactCenterInsightsClient->deleteIssueModel($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->deleteIssueModel($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'deleteIssueModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the issue model to delete. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteIssueModel($name, array $optionalArgs = []) - { - $request = new DeleteIssueModelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteIssueModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a phrase matcher. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - * $contactCenterInsightsClient->deletePhraseMatcher($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the phrase matcher to delete. - * @param array $optionalArgs { - * 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. - * } - * - * @throws ApiException if the remote call fails - */ - public function deletePhraseMatcher($name, array $optionalArgs = []) - { - $request = new DeletePhraseMatcherRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeletePhraseMatcher', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a view. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - * $contactCenterInsightsClient->deleteView($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the view to delete. - * @param array $optionalArgs { - * 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. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteView($name, array $optionalArgs = []) - { - $request = new DeleteViewRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteView', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deploys an issue model. Returns an error if a model is already deployed. - * An issue model can only be used in analysis after it has been deployed. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - * $operationResponse = $contactCenterInsightsClient->deployIssueModel($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->deployIssueModel($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'deployIssueModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The issue model to deploy. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deployIssueModel($name, array $optionalArgs = []) - { - $request = new DeployIssueModelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeployIssueModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Export insights data to a destination defined in the request body. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $operationResponse = $contactCenterInsightsClient->exportInsightsData($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->exportInsightsData($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'exportInsightsData'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource to export data from. - * @param array $optionalArgs { - * Optional. - * - * @type BigQueryDestination $bigQueryDestination - * Specified if sink is a BigQuery table. - * @type string $filter - * A filter to reduce results to a specific subset. Useful for exporting - * conversations with specific properties. - * @type string $kmsKey - * A fully qualified KMS key name for BigQuery tables protected by CMEK. - * Format: - * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} - * @type int $writeDisposition - * Options for what to do if the destination table already exists. - * For allowed values, use constants defined on {@see \Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataRequest\WriteDisposition} - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function exportInsightsData($parent, array $optionalArgs = []) - { - $request = new ExportInsightsDataRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['bigQueryDestination'])) { - $request->setBigQueryDestination($optionalArgs['bigQueryDestination']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['kmsKey'])) { - $request->setKmsKey($optionalArgs['kmsKey']); - } - - if (isset($optionalArgs['writeDisposition'])) { - $request->setWriteDisposition($optionalArgs['writeDisposition']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ExportInsightsData', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets an analysis. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - * $response = $contactCenterInsightsClient->getAnalysis($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the analysis to get. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\Analysis - * - * @throws ApiException if the remote call fails - */ - public function getAnalysis($name, array $optionalArgs = []) - { - $request = new GetAnalysisRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAnalysis', Analysis::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a conversation. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - * $response = $contactCenterInsightsClient->getConversation($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the conversation to get. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * The level of details of the conversation. Default is `FULL`. - * For allowed values, use constants defined on {@see \Google\Cloud\ContactCenterInsights\V1\ConversationView} - * @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 \Google\Cloud\ContactCenterInsights\V1\Conversation - * - * @throws ApiException if the remote call fails - */ - public function getConversation($name, array $optionalArgs = []) - { - $request = new GetConversationRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetConversation', Conversation::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets an issue. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - * $response = $contactCenterInsightsClient->getIssue($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the issue to get. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\Issue - * - * @throws ApiException if the remote call fails - */ - public function getIssue($name, array $optionalArgs = []) - { - $request = new GetIssueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIssue', Issue::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets an issue model. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - * $response = $contactCenterInsightsClient->getIssueModel($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the issue model to get. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\IssueModel - * - * @throws ApiException if the remote call fails - */ - public function getIssueModel($name, array $optionalArgs = []) - { - $request = new GetIssueModelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIssueModel', IssueModel::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a phrase matcher. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - * $response = $contactCenterInsightsClient->getPhraseMatcher($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the phrase matcher to get. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher - * - * @throws ApiException if the remote call fails - */ - public function getPhraseMatcher($name, array $optionalArgs = []) - { - $request = new GetPhraseMatcherRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetPhraseMatcher', PhraseMatcher::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets project-level settings. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->settingsName('[PROJECT]', '[LOCATION]'); - * $response = $contactCenterInsightsClient->getSettings($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the settings resource to get. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\Settings - * - * @throws ApiException if the remote call fails - */ - public function getSettings($name, array $optionalArgs = []) - { - $request = new GetSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSettings', Settings::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a view. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - * $response = $contactCenterInsightsClient->getView($formattedName); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the view to get. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\View - * - * @throws ApiException if the remote call fails - */ - public function getView($name, array $optionalArgs = []) - { - $request = new GetViewRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetView', View::class, $optionalArgs, $request)->wait(); - } - - /** - * Imports conversations and processes them according to the user's - * configuration. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $operationResponse = $contactCenterInsightsClient->ingestConversations($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->ingestConversations($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'ingestConversations'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource for new conversations. - * @param array $optionalArgs { - * Optional. - * - * @type GcsSource $gcsSource - * A cloud storage bucket source. Note that any previously ingested objects - * from the source will be skipped to avoid duplication. - * @type TranscriptObjectConfig $transcriptObjectConfig - * Configuration for when `source` contains conversation transcripts. - * @type ConversationConfig $conversationConfig - * Configuration that applies to all conversations. - * @type RedactionConfig $redactionConfig - * Optional. DLP settings for transcript redaction. Optional, will default to - * the config specified in Settings. - * @type SpeechConfig $speechConfig - * Optional. Default Speech-to-Text configuration. Optional, will default to - * the config specified in Settings. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function ingestConversations($parent, array $optionalArgs = []) - { - $request = new IngestConversationsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['gcsSource'])) { - $request->setGcsSource($optionalArgs['gcsSource']); - } - - if (isset($optionalArgs['transcriptObjectConfig'])) { - $request->setTranscriptObjectConfig($optionalArgs['transcriptObjectConfig']); - } - - if (isset($optionalArgs['conversationConfig'])) { - $request->setConversationConfig($optionalArgs['conversationConfig']); - } - - if (isset($optionalArgs['redactionConfig'])) { - $request->setRedactionConfig($optionalArgs['redactionConfig']); - } - - if (isset($optionalArgs['speechConfig'])) { - $request->setSpeechConfig($optionalArgs['speechConfig']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('IngestConversations', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Lists analyses. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - * // Iterate over pages of elements - * $pagedResponse = $contactCenterInsightsClient->listAnalyses($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contactCenterInsightsClient->listAnalyses($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the analyses. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAnalyses($parent, array $optionalArgs = []) - { - $request = new ListAnalysesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAnalyses', $optionalArgs, ListAnalysesResponse::class, $request); - } - - /** - * Lists conversations. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $contactCenterInsightsClient->listConversations($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contactCenterInsightsClient->listConversations($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the conversation. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * @type int $view - * The level of details of the conversation. Default is `BASIC`. - * For allowed values, use constants defined on {@see \Google\Cloud\ContactCenterInsights\V1\ConversationView} - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listConversations($parent, array $optionalArgs = []) - { - $request = new ListConversationsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListConversations', $optionalArgs, ListConversationsResponse::class, $request); - } - - /** - * Lists issue models. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $contactCenterInsightsClient->listIssueModels($formattedParent); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the issue model. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\ListIssueModelsResponse - * - * @throws ApiException if the remote call fails - */ - public function listIssueModels($parent, array $optionalArgs = []) - { - $request = new ListIssueModelsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListIssueModels', ListIssueModelsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists issues. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - * $response = $contactCenterInsightsClient->listIssues($formattedParent); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the issue. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\ListIssuesResponse - * - * @throws ApiException if the remote call fails - */ - public function listIssues($parent, array $optionalArgs = []) - { - $request = new ListIssuesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListIssues', ListIssuesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists phrase matchers. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $contactCenterInsightsClient->listPhraseMatchers($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contactCenterInsightsClient->listPhraseMatchers($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the phrase matcher. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * A filter to reduce results to a specific subset. Useful for querying - * phrase matchers with specific properties. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listPhraseMatchers($parent, array $optionalArgs = []) - { - $request = new ListPhraseMatchersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListPhraseMatchers', $optionalArgs, ListPhraseMatchersResponse::class, $request); - } - - /** - * Lists views. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $contactCenterInsightsClient->listViews($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contactCenterInsightsClient->listViews($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the views. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listViews($parent, array $optionalArgs = []) - { - $request = new ListViewsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListViews', $optionalArgs, ListViewsResponse::class, $request); - } - - /** - * Undeploys an issue model. - * An issue model can not be used in analysis after it has been undeployed. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedName = $contactCenterInsightsClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - * $operationResponse = $contactCenterInsightsClient->undeployIssueModel($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->undeployIssueModel($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'undeployIssueModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $name Required. The issue model to undeploy. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function undeployIssueModel($name, array $optionalArgs = []) - { - $request = new UndeployIssueModelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UndeployIssueModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a conversation. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $conversation = new Conversation(); - * $response = $contactCenterInsightsClient->updateConversation($conversation); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param Conversation $conversation Required. The new values for the conversation. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * @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 \Google\Cloud\ContactCenterInsights\V1\Conversation - * - * @throws ApiException if the remote call fails - */ - public function updateConversation($conversation, array $optionalArgs = []) - { - $request = new UpdateConversationRequest(); - $requestParamHeaders = []; - $request->setConversation($conversation); - $requestParamHeaders['conversation.name'] = $conversation->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateConversation', Conversation::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an issue. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $issue = new Issue(); - * $response = $contactCenterInsightsClient->updateIssue($issue); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param Issue $issue Required. The new values for the issue. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * @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 \Google\Cloud\ContactCenterInsights\V1\Issue - * - * @throws ApiException if the remote call fails - */ - public function updateIssue($issue, array $optionalArgs = []) - { - $request = new UpdateIssueRequest(); - $requestParamHeaders = []; - $request->setIssue($issue); - $requestParamHeaders['issue.name'] = $issue->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateIssue', Issue::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an issue model. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $issueModel = new IssueModel(); - * $response = $contactCenterInsightsClient->updateIssueModel($issueModel); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param IssueModel $issueModel Required. The new values for the issue model. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * @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 \Google\Cloud\ContactCenterInsights\V1\IssueModel - * - * @throws ApiException if the remote call fails - */ - public function updateIssueModel($issueModel, array $optionalArgs = []) - { - $request = new UpdateIssueModelRequest(); - $requestParamHeaders = []; - $request->setIssueModel($issueModel); - $requestParamHeaders['issue_model.name'] = $issueModel->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateIssueModel', IssueModel::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a phrase matcher. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $phraseMatcher = new PhraseMatcher(); - * $response = $contactCenterInsightsClient->updatePhraseMatcher($phraseMatcher); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param PhraseMatcher $phraseMatcher Required. The new values for the phrase matcher. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * @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 \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher - * - * @throws ApiException if the remote call fails - */ - public function updatePhraseMatcher($phraseMatcher, array $optionalArgs = []) - { - $request = new UpdatePhraseMatcherRequest(); - $requestParamHeaders = []; - $request->setPhraseMatcher($phraseMatcher); - $requestParamHeaders['phrase_matcher.name'] = $phraseMatcher->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdatePhraseMatcher', PhraseMatcher::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates project-level settings. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $settings = new Settings(); - * $updateMask = new FieldMask(); - * $response = $contactCenterInsightsClient->updateSettings($settings, $updateMask); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param Settings $settings Required. The new settings values. - * @param FieldMask $updateMask Required. The list of fields to be updated. - * @param array $optionalArgs { - * 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 \Google\Cloud\ContactCenterInsights\V1\Settings - * - * @throws ApiException if the remote call fails - */ - public function updateSettings($settings, $updateMask, array $optionalArgs = []) - { - $request = new UpdateSettingsRequest(); - $requestParamHeaders = []; - $request->setSettings($settings); - $request->setUpdateMask($updateMask); - $requestParamHeaders['settings.name'] = $settings->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSettings', Settings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a view. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $view = new View(); - * $response = $contactCenterInsightsClient->updateView($view); - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param View $view Required. The new view. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * @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 \Google\Cloud\ContactCenterInsights\V1\View - * - * @throws ApiException if the remote call fails - */ - public function updateView($view, array $optionalArgs = []) - { - $request = new UpdateViewRequest(); - $requestParamHeaders = []; - $request->setView($view); - $requestParamHeaders['view.name'] = $view->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateView', View::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a longrunning conversation upload operation. This method differs - * from CreateConversation by allowing audio transcription and optional DLP - * redaction. - * - * Sample code: - * ``` - * $contactCenterInsightsClient = new ContactCenterInsightsClient(); - * try { - * $formattedParent = $contactCenterInsightsClient->locationName('[PROJECT]', '[LOCATION]'); - * $conversation = new Conversation(); - * $operationResponse = $contactCenterInsightsClient->uploadConversation($formattedParent, $conversation); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $contactCenterInsightsClient->uploadConversation($formattedParent, $conversation); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $contactCenterInsightsClient->resumeOperation($operationName, 'uploadConversation'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $contactCenterInsightsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the conversation. - * @param Conversation $conversation Required. The conversation resource to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $conversationId - * Optional. A unique ID for the new conversation. This ID will become the - * final component of the conversation's resource name. If no ID is specified, - * a server-generated ID will be used. - * - * This value should be 4-64 characters and must match the regular - * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` - * @type RedactionConfig $redactionConfig - * Optional. DLP settings for transcript redaction. Will default to the config - * specified in Settings. - * @type SpeechConfig $speechConfig - * Optional. Speech-to-Text configuration. Will default to the config - * specified in Settings. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function uploadConversation($parent, $conversation, array $optionalArgs = []) - { - $request = new UploadConversationRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setConversation($conversation); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['conversationId'])) { - $request->setConversationId($optionalArgs['conversationId']); - } - - if (isset($optionalArgs['redactionConfig'])) { - $request->setRedactionConfig($optionalArgs['redactionConfig']); - } - - if (isset($optionalArgs['speechConfig'])) { - $request->setSpeechConfig($optionalArgs['speechConfig']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UploadConversation', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/gapic_metadata.json b/owl-bot-staging/ContactCenterInsights/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 66263ef3f61f..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.contactcenterinsights.v1", - "libraryPackage": "Google\\Cloud\\ContactCenterInsights\\V1", - "services": { - "ContactCenterInsights": { - "clients": { - "grpc": { - "libraryClient": "ContactCenterInsightsGapicClient", - "rpcs": { - "BulkAnalyzeConversations": { - "methods": [ - "bulkAnalyzeConversations" - ] - }, - "BulkDeleteConversations": { - "methods": [ - "bulkDeleteConversations" - ] - }, - "CalculateIssueModelStats": { - "methods": [ - "calculateIssueModelStats" - ] - }, - "CalculateStats": { - "methods": [ - "calculateStats" - ] - }, - "CreateAnalysis": { - "methods": [ - "createAnalysis" - ] - }, - "CreateConversation": { - "methods": [ - "createConversation" - ] - }, - "CreateIssueModel": { - "methods": [ - "createIssueModel" - ] - }, - "CreatePhraseMatcher": { - "methods": [ - "createPhraseMatcher" - ] - }, - "CreateView": { - "methods": [ - "createView" - ] - }, - "DeleteAnalysis": { - "methods": [ - "deleteAnalysis" - ] - }, - "DeleteConversation": { - "methods": [ - "deleteConversation" - ] - }, - "DeleteIssue": { - "methods": [ - "deleteIssue" - ] - }, - "DeleteIssueModel": { - "methods": [ - "deleteIssueModel" - ] - }, - "DeletePhraseMatcher": { - "methods": [ - "deletePhraseMatcher" - ] - }, - "DeleteView": { - "methods": [ - "deleteView" - ] - }, - "DeployIssueModel": { - "methods": [ - "deployIssueModel" - ] - }, - "ExportInsightsData": { - "methods": [ - "exportInsightsData" - ] - }, - "GetAnalysis": { - "methods": [ - "getAnalysis" - ] - }, - "GetConversation": { - "methods": [ - "getConversation" - ] - }, - "GetIssue": { - "methods": [ - "getIssue" - ] - }, - "GetIssueModel": { - "methods": [ - "getIssueModel" - ] - }, - "GetPhraseMatcher": { - "methods": [ - "getPhraseMatcher" - ] - }, - "GetSettings": { - "methods": [ - "getSettings" - ] - }, - "GetView": { - "methods": [ - "getView" - ] - }, - "IngestConversations": { - "methods": [ - "ingestConversations" - ] - }, - "ListAnalyses": { - "methods": [ - "listAnalyses" - ] - }, - "ListConversations": { - "methods": [ - "listConversations" - ] - }, - "ListIssueModels": { - "methods": [ - "listIssueModels" - ] - }, - "ListIssues": { - "methods": [ - "listIssues" - ] - }, - "ListPhraseMatchers": { - "methods": [ - "listPhraseMatchers" - ] - }, - "ListViews": { - "methods": [ - "listViews" - ] - }, - "UndeployIssueModel": { - "methods": [ - "undeployIssueModel" - ] - }, - "UpdateConversation": { - "methods": [ - "updateConversation" - ] - }, - "UpdateIssue": { - "methods": [ - "updateIssue" - ] - }, - "UpdateIssueModel": { - "methods": [ - "updateIssueModel" - ] - }, - "UpdatePhraseMatcher": { - "methods": [ - "updatePhraseMatcher" - ] - }, - "UpdateSettings": { - "methods": [ - "updateSettings" - ] - }, - "UpdateView": { - "methods": [ - "updateView" - ] - }, - "UploadConversation": { - "methods": [ - "uploadConversation" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_client_config.json b/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_client_config.json deleted file mode 100644 index 38c4895e8611..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_client_config.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "interfaces": { - "google.cloud.contactcenterinsights.v1.ContactCenterInsights": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BulkAnalyzeConversations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "BulkDeleteConversations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CalculateIssueModelStats": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CalculateStats": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateAnalysis": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateConversation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateIssueModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreatePhraseMatcher": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateView": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteAnalysis": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteConversation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteIssue": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteIssueModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeletePhraseMatcher": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteView": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeployIssueModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ExportInsightsData": { - "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", - "retry_params_name": "retry_policy_1_params" - }, - "GetConversation": { - "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", - "retry_params_name": "retry_policy_1_params" - }, - "GetIssueModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPhraseMatcher": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSettings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetView": { - "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" - }, - "ListAnalyses": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListConversations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIssueModels": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIssues": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPhraseMatchers": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListViews": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UndeployIssueModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateConversation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateIssue": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateIssueModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdatePhraseMatcher": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateSettings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateView": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UploadConversation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_descriptor_config.php b/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_descriptor_config.php deleted file mode 100644 index 3e813b4ea4ef..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_descriptor_config.php +++ /dev/null @@ -1,599 +0,0 @@ - [ - 'google.cloud.contactcenterinsights.v1.ContactCenterInsights' => [ - 'BulkAnalyzeConversations' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsResponse', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\BulkAnalyzeConversationsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BulkDeleteConversations' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsResponse', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\BulkDeleteConversationsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAnalysis' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\Analysis', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\CreateAnalysisOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIssueModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\IssueModel', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\CreateIssueModelMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteIssueModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\DeleteIssueModelMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeployIssueModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\DeployIssueModelResponse', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\DeployIssueModelMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportInsightsData' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataResponse', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\ExportInsightsDataMetadata', - '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', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\IngestConversationsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UndeployIssueModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelResponse', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\UndeployIssueModelMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UploadConversation' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ContactCenterInsights\V1\Conversation', - 'metadataReturnType' => '\Google\Cloud\ContactCenterInsights\V1\UploadConversationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CalculateIssueModelStats' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\CalculateIssueModelStatsResponse', - 'headerParams' => [ - [ - 'keyName' => 'issue_model', - 'fieldAccessors' => [ - 'getIssueModel', - ], - ], - ], - ], - 'CalculateStats' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\CalculateStatsResponse', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getLocation', - ], - ], - ], - ], - 'CreateConversation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Conversation', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePhraseMatcher' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\PhraseMatcher', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\View', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAnalysis' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteConversation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIssue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePhraseMatcher' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAnalysis' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Analysis', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetConversation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Conversation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIssue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Issue', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIssueModel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\IssueModel', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPhraseMatcher' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\PhraseMatcher', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Settings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\View', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAnalyses' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAnalyses', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListAnalysesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListConversations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConversations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListConversationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIssueModels' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListIssueModelsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIssues' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListIssuesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPhraseMatchers' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPhraseMatchers', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListPhraseMatchersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListViews' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getViews', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\ListViewsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateConversation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Conversation', - 'headerParams' => [ - [ - 'keyName' => 'conversation.name', - 'fieldAccessors' => [ - 'getConversation', - 'getName', - ], - ], - ], - ], - 'UpdateIssue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Issue', - 'headerParams' => [ - [ - 'keyName' => 'issue.name', - 'fieldAccessors' => [ - 'getIssue', - 'getName', - ], - ], - ], - ], - 'UpdateIssueModel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\IssueModel', - 'headerParams' => [ - [ - 'keyName' => 'issue_model.name', - 'fieldAccessors' => [ - 'getIssueModel', - 'getName', - ], - ], - ], - ], - 'UpdatePhraseMatcher' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\PhraseMatcher', - 'headerParams' => [ - [ - 'keyName' => 'phrase_matcher.name', - 'fieldAccessors' => [ - 'getPhraseMatcher', - 'getName', - ], - ], - ], - ], - 'UpdateSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\Settings', - 'headerParams' => [ - [ - 'keyName' => 'settings.name', - 'fieldAccessors' => [ - 'getSettings', - 'getName', - ], - ], - ], - ], - 'UpdateView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ContactCenterInsights\V1\View', - 'headerParams' => [ - [ - 'keyName' => 'view.name', - 'fieldAccessors' => [ - 'getView', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'analysis' => 'projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}', - 'conversation' => 'projects/{project}/locations/{location}/conversations/{conversation}', - 'conversationProfile' => 'projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}', - 'issue' => 'projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}', - 'issueModel' => 'projects/{project}/locations/{location}/issueModels/{issue_model}', - 'location' => 'projects/{project}/locations/{location}', - 'participant' => 'projects/{project}/conversations/{conversation}/participants/{participant}', - 'phraseMatcher' => 'projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}', - 'projectConversationParticipant' => 'projects/{project}/conversations/{conversation}/participants/{participant}', - 'projectLocationConversationParticipant' => 'projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}', - 'recognizer' => 'projects/{project}/locations/{location}/recognizers/{recognizer}', - 'settings' => 'projects/{project}/locations/{location}/settings', - 'view' => 'projects/{project}/locations/{location}/views/{view}', - ], - ], - ], -]; diff --git a/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_rest_client_config.php b/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_rest_client_config.php deleted file mode 100644 index 571d7849c475..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/src/V1/resources/contact_center_insights_rest_client_config.php +++ /dev/null @@ -1,500 +0,0 @@ - [ - 'google.cloud.contactcenterinsights.v1.ContactCenterInsights' => [ - 'BulkAnalyzeConversations' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations:bulkAnalyze', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BulkDeleteConversations' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations:bulkDelete', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CalculateIssueModelStats' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{issue_model=projects/*/locations/*/issueModels/*}:calculateIssueModelStats', - 'placeholders' => [ - 'issue_model' => [ - 'getters' => [ - 'getIssueModel', - ], - ], - ], - ], - 'CalculateStats' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{location=projects/*/locations/*}/conversations:calculateStats', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'CreateAnalysis' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/conversations/*}/analyses', - 'body' => 'analysis', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateConversation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations', - 'body' => 'conversation', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIssueModel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/issueModels', - 'body' => 'issue_model', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePhraseMatcher' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/phraseMatchers', - 'body' => 'phrase_matcher', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateView' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/views', - 'body' => 'view', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAnalysis' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/conversations/*/analyses/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteConversation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/conversations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIssue' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*/issues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIssueModel' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeletePhraseMatcher' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/phraseMatchers/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteView' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/views/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeployIssueModel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*}:deploy', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportInsightsData' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/insightsdata:export', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetAnalysis' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/conversations/*/analyses/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConversation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/conversations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIssue' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*/issues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIssueModel' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPhraseMatcher' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/phraseMatchers/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/settings}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetView' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/views/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'IngestConversations' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations:ingest', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAnalyses' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/conversations/*}/analyses', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListConversations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIssueModels' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/issueModels', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIssues' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/issueModels/*}/issues', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPhraseMatchers' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/phraseMatchers', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListViews' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/views', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UndeployIssueModel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/issueModels/*}:undeploy', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateConversation' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{conversation.name=projects/*/locations/*/conversations/*}', - 'body' => 'conversation', - 'placeholders' => [ - 'conversation.name' => [ - 'getters' => [ - 'getConversation', - 'getName', - ], - ], - ], - ], - 'UpdateIssue' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{issue.name=projects/*/locations/*/issueModels/*/issues/*}', - 'body' => 'issue', - 'placeholders' => [ - 'issue.name' => [ - 'getters' => [ - 'getIssue', - 'getName', - ], - ], - ], - ], - 'UpdateIssueModel' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{issue_model.name=projects/*/locations/*/issueModels/*}', - 'body' => 'issue_model', - 'placeholders' => [ - 'issue_model.name' => [ - 'getters' => [ - 'getIssueModel', - 'getName', - ], - ], - ], - ], - 'UpdatePhraseMatcher' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{phrase_matcher.name=projects/*/locations/*/phraseMatchers/*}', - 'body' => 'phrase_matcher', - 'placeholders' => [ - 'phrase_matcher.name' => [ - 'getters' => [ - 'getPhraseMatcher', - 'getName', - ], - ], - ], - ], - 'UpdateSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{settings.name=projects/*/locations/*/settings}', - 'body' => 'settings', - 'placeholders' => [ - 'settings.name' => [ - 'getters' => [ - 'getSettings', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateView' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{view.name=projects/*/locations/*/views/*}', - 'body' => 'view', - 'placeholders' => [ - 'view.name' => [ - 'getters' => [ - 'getView', - 'getName', - ], - ], - ], - ], - 'UploadConversation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/conversations:upload', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php b/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php deleted file mode 100644 index 3a5b4226ecb8..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/Client/ContactCenterInsightsClientTest.php +++ /dev/null @@ -1,3448 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ContactCenterInsightsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ContactCenterInsightsClient($options); - } - - /** @test */ - public function bulkAnalyzeConversationsTest() - { - $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/bulkAnalyzeConversationsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $successfulAnalysisCount = 1153322545; - $failedAnalysisCount = 1044285998; - $expectedResponse = new BulkAnalyzeConversationsResponse(); - $expectedResponse->setSuccessfulAnalysisCount($successfulAnalysisCount); - $expectedResponse->setFailedAnalysisCount($failedAnalysisCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkAnalyzeConversationsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $filter = 'filter-1274492040'; - $analysisPercentage = 9980822; - $request = (new BulkAnalyzeConversationsRequest()) - ->setParent($formattedParent) - ->setFilter($filter) - ->setAnalysisPercentage($analysisPercentage); - $response = $gapicClient->bulkAnalyzeConversations($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/BulkAnalyzeConversations', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $actualValue = $actualApiRequestObject->getAnalysisPercentage(); - $this->assertProtobufEquals($analysisPercentage, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); - $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 bulkAnalyzeConversationsExceptionTest() - { - $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/bulkAnalyzeConversationsTest'); - $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]'); - $filter = 'filter-1274492040'; - $analysisPercentage = 9980822; - $request = (new BulkAnalyzeConversationsRequest()) - ->setParent($formattedParent) - ->setFilter($filter) - ->setAnalysisPercentage($analysisPercentage); - $response = $gapicClient->bulkAnalyzeConversations($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); - 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 bulkDeleteConversationsTest() - { - $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/bulkDeleteConversationsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkDeleteConversationsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkDeleteConversationsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new BulkDeleteConversationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->bulkDeleteConversations($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/BulkDeleteConversations', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteConversationsTest'); - $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 bulkDeleteConversationsExceptionTest() - { - $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/bulkDeleteConversationsTest'); - $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 BulkDeleteConversationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->bulkDeleteConversations($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteConversationsTest'); - 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 calculateIssueModelStatsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CalculateIssueModelStatsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedIssueModel = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $request = (new CalculateIssueModelStatsRequest()) - ->setIssueModel($formattedIssueModel); - $response = $gapicClient->calculateIssueModelStats($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/CalculateIssueModelStats', $actualFuncCall); - $actualValue = $actualRequestObject->getIssueModel(); - $this->assertProtobufEquals($formattedIssueModel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function calculateIssueModelStatsExceptionTest() - { - $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 - $formattedIssueModel = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $request = (new CalculateIssueModelStatsRequest()) - ->setIssueModel($formattedIssueModel); - try { - $gapicClient->calculateIssueModelStats($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 calculateStatsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $averageTurnCount = 1693477329; - $conversationCount = 1994187347; - $expectedResponse = new CalculateStatsResponse(); - $expectedResponse->setAverageTurnCount($averageTurnCount); - $expectedResponse->setConversationCount($conversationCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new CalculateStatsRequest()) - ->setLocation($formattedLocation); - $response = $gapicClient->calculateStats($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/CalculateStats', $actualFuncCall); - $actualValue = $actualRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function calculateStatsExceptionTest() - { - $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 - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new CalculateStatsRequest()) - ->setLocation($formattedLocation); - try { - $gapicClient->calculateStats($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 createAnalysisTest() - { - $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/createAnalysisTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Analysis(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAnalysisTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $analysis = new Analysis(); - $request = (new CreateAnalysisRequest()) - ->setParent($formattedParent) - ->setAnalysis($analysis); - $response = $gapicClient->createAnalysis($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/CreateAnalysis', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAnalysis(); - $this->assertProtobufEquals($analysis, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); - $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 createAnalysisExceptionTest() - { - $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/createAnalysisTest'); - $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $analysis = new Analysis(); - $request = (new CreateAnalysisRequest()) - ->setParent($formattedParent) - ->setAnalysis($analysis); - $response = $gapicClient->createAnalysis($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); - 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 createConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $languageCode = 'languageCode-412800396'; - $agentId = 'agentId1469158549'; - $turnCount = 428155597; - $obfuscatedUserId = 'obfuscatedUserId-227848300'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setAgentId($agentId); - $expectedResponse->setTurnCount($turnCount); - $expectedResponse->setObfuscatedUserId($obfuscatedUserId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $conversation = new Conversation(); - $request = (new CreateConversationRequest()) - ->setParent($formattedParent) - ->setConversation($conversation); - $response = $gapicClient->createConversation($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/CreateConversation', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getConversation(); - $this->assertProtobufEquals($conversation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConversationExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $conversation = new Conversation(); - $request = (new CreateConversationRequest()) - ->setParent($formattedParent) - ->setConversation($conversation); - try { - $gapicClient->createConversation($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 createIssueModelTest() - { - $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/createIssueModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $issueCount = 1779144233; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new IssueModel(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIssueCount($issueCount); - $expectedResponse->setLanguageCode($languageCode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIssueModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $issueModel = new IssueModel(); - $request = (new CreateIssueModelRequest()) - ->setParent($formattedParent) - ->setIssueModel($issueModel); - $response = $gapicClient->createIssueModel($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/CreateIssueModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIssueModel(); - $this->assertProtobufEquals($issueModel, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIssueModelTest'); - $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 createIssueModelExceptionTest() - { - $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/createIssueModelTest'); - $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]'); - $issueModel = new IssueModel(); - $request = (new CreateIssueModelRequest()) - ->setParent($formattedParent) - ->setIssueModel($issueModel); - $response = $gapicClient->createIssueModel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIssueModelTest'); - 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 createPhraseMatcherTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $versionTag = 'versionTag689430451'; - $displayName = 'displayName1615086568'; - $active = true; - $expectedResponse = new PhraseMatcher(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setVersionTag($versionTag); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setActive($active); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $phraseMatcher = new PhraseMatcher(); - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - $phraseMatcher->setType($phraseMatcherType); - $request = (new CreatePhraseMatcherRequest()) - ->setParent($formattedParent) - ->setPhraseMatcher($phraseMatcher); - $response = $gapicClient->createPhraseMatcher($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/CreatePhraseMatcher', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPhraseMatcher(); - $this->assertProtobufEquals($phraseMatcher, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPhraseMatcherExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $phraseMatcher = new PhraseMatcher(); - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - $phraseMatcher->setType($phraseMatcherType); - $request = (new CreatePhraseMatcherRequest()) - ->setParent($formattedParent) - ->setPhraseMatcher($phraseMatcher); - try { - $gapicClient->createPhraseMatcher($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 createViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $value = 'value111972721'; - $expectedResponse = new View(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setValue($value); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $view = new View(); - $request = (new CreateViewRequest()) - ->setParent($formattedParent) - ->setView($view); - $response = $gapicClient->createView($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/CreateView', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createViewExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $view = new View(); - $request = (new CreateViewRequest()) - ->setParent($formattedParent) - ->setView($view); - try { - $gapicClient->createView($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 deleteAnalysisTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - $request = (new DeleteAnalysisRequest()) - ->setName($formattedName); - $gapicClient->deleteAnalysis($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteAnalysis', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAnalysisExceptionTest() - { - $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->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - $request = (new DeleteAnalysisRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAnalysis($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 deleteConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $request = (new DeleteConversationRequest()) - ->setName($formattedName); - $gapicClient->deleteConversation($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteConversation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConversationExceptionTest() - { - $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $request = (new DeleteConversationRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteConversation($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 deleteIssueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - $request = (new DeleteIssueRequest()) - ->setName($formattedName); - $gapicClient->deleteIssue($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteIssue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIssueExceptionTest() - { - $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->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - $request = (new DeleteIssueRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteIssue($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 deleteIssueModelTest() - { - $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/deleteIssueModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteIssueModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $request = (new DeleteIssueModelRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIssueModel($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/DeleteIssueModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIssueModelTest'); - $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 deleteIssueModelExceptionTest() - { - $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/deleteIssueModelTest'); - $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 DeleteIssueModelRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIssueModel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIssueModelTest'); - 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 deletePhraseMatcherTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - $request = (new DeletePhraseMatcherRequest()) - ->setName($formattedName); - $gapicClient->deletePhraseMatcher($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeletePhraseMatcher', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePhraseMatcherExceptionTest() - { - $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->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - $request = (new DeletePhraseMatcherRequest()) - ->setName($formattedName); - try { - $gapicClient->deletePhraseMatcher($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 deleteViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - $request = (new DeleteViewRequest()) - ->setName($formattedName); - $gapicClient->deleteView($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteViewExceptionTest() - { - $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->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - $request = (new DeleteViewRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteView($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 deployIssueModelTest() - { - $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/deployIssueModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new DeployIssueModelResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deployIssueModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $request = (new DeployIssueModelRequest()) - ->setName($formattedName); - $response = $gapicClient->deployIssueModel($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/DeployIssueModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployIssueModelTest'); - $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 deployIssueModelExceptionTest() - { - $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/deployIssueModelTest'); - $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 DeployIssueModelRequest()) - ->setName($formattedName); - $response = $gapicClient->deployIssueModel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployIssueModelTest'); - 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 exportInsightsDataTest() - { - $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/exportInsightsDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ExportInsightsDataResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportInsightsDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ExportInsightsDataRequest()) - ->setParent($formattedParent); - $response = $gapicClient->exportInsightsData($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/ExportInsightsData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportInsightsDataTest'); - $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 exportInsightsDataExceptionTest() - { - $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/exportInsightsDataTest'); - $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 ExportInsightsDataRequest()) - ->setParent($formattedParent); - $response = $gapicClient->exportInsightsData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportInsightsDataTest'); - 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() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Analysis(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - $request = (new GetAnalysisRequest()) - ->setName($formattedName); - $response = $gapicClient->getAnalysis($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/GetAnalysis', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAnalysisExceptionTest() - { - $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->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - $request = (new GetAnalysisRequest()) - ->setName($formattedName); - try { - $gapicClient->getAnalysis($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 getConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $languageCode = 'languageCode-412800396'; - $agentId = 'agentId1469158549'; - $turnCount = 428155597; - $obfuscatedUserId = 'obfuscatedUserId-227848300'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name2); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setAgentId($agentId); - $expectedResponse->setTurnCount($turnCount); - $expectedResponse->setObfuscatedUserId($obfuscatedUserId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $request = (new GetConversationRequest()) - ->setName($formattedName); - $response = $gapicClient->getConversation($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/GetConversation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversationExceptionTest() - { - $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $request = (new GetConversationRequest()) - ->setName($formattedName); - try { - $gapicClient->getConversation($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() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Issue(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - $request = (new GetIssueRequest()) - ->setName($formattedName); - $response = $gapicClient->getIssue($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/GetIssue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIssueExceptionTest() - { - $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->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - $request = (new GetIssueRequest()) - ->setName($formattedName); - try { - $gapicClient->getIssue($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 getIssueModelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $issueCount = 1779144233; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new IssueModel(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIssueCount($issueCount); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $request = (new GetIssueModelRequest()) - ->setName($formattedName); - $response = $gapicClient->getIssueModel($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/GetIssueModel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIssueModelExceptionTest() - { - $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->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $request = (new GetIssueModelRequest()) - ->setName($formattedName); - try { - $gapicClient->getIssueModel($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 getPhraseMatcherTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $versionTag = 'versionTag689430451'; - $displayName = 'displayName1615086568'; - $active = true; - $expectedResponse = new PhraseMatcher(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setVersionTag($versionTag); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setActive($active); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - $request = (new GetPhraseMatcherRequest()) - ->setName($formattedName); - $response = $gapicClient->getPhraseMatcher($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/GetPhraseMatcher', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPhraseMatcherExceptionTest() - { - $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->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - $request = (new GetPhraseMatcherRequest()) - ->setName($formattedName); - try { - $gapicClient->getPhraseMatcher($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 getSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new Settings(); - $expectedResponse->setName($name2); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->settingsName('[PROJECT]', '[LOCATION]'); - $request = (new GetSettingsRequest()) - ->setName($formattedName); - $response = $gapicClient->getSettings($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/GetSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSettingsExceptionTest() - { - $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->settingsName('[PROJECT]', '[LOCATION]'); - $request = (new GetSettingsRequest()) - ->setName($formattedName); - try { - $gapicClient->getSettings($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 getViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $value = 'value111972721'; - $expectedResponse = new View(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setValue($value); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - $request = (new GetViewRequest()) - ->setName($formattedName); - $response = $gapicClient->getView($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/GetView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getViewExceptionTest() - { - $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->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - $request = (new GetViewRequest()) - ->setName($formattedName); - try { - $gapicClient->getView($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 ingestConversationsTest() - { - $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/ingestConversationsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new IngestConversationsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/ingestConversationsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new IngestConversationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->ingestConversations($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/IngestConversations', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/ingestConversationsTest'); - $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 ingestConversationsExceptionTest() - { - $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/ingestConversationsTest'); - $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 IngestConversationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->ingestConversations($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/ingestConversationsTest'); - 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() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $analysesElement = new Analysis(); - $analyses = [ - $analysesElement, - ]; - $expectedResponse = new ListAnalysesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAnalyses($analyses); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $request = (new ListAnalysesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAnalyses($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAnalyses()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListAnalyses', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAnalysesExceptionTest() - { - $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 - $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $request = (new ListAnalysesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAnalyses($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 listConversationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $conversationsElement = new Conversation(); - $conversations = [ - $conversationsElement, - ]; - $expectedResponse = new ListConversationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConversations($conversations); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListConversationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listConversations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConversations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListConversations', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversationsExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListConversationsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listConversations($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 listIssueModelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListIssueModelsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListIssueModelsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIssueModels($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/ListIssueModels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIssueModelsExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListIssueModelsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIssueModels($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 listIssuesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListIssuesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $request = (new ListIssuesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIssues($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/ListIssues', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIssuesExceptionTest() - { - $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 - $formattedParent = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $request = (new ListIssuesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIssues($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 listPhraseMatchersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $phraseMatchersElement = new PhraseMatcher(); - $phraseMatchers = [ - $phraseMatchersElement, - ]; - $expectedResponse = new ListPhraseMatchersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPhraseMatchers($phraseMatchers); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPhraseMatchersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPhraseMatchers($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPhraseMatchers()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListPhraseMatchers', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPhraseMatchersExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPhraseMatchersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPhraseMatchers($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 listViewsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $viewsElement = new View(); - $views = [ - $viewsElement, - ]; - $expectedResponse = new ListViewsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setViews($views); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListViewsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listViews($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getViews()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListViews', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listViewsExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListViewsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listViews($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 undeployIssueModelTest() - { - $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/undeployIssueModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UndeployIssueModelResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeployIssueModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $request = (new UndeployIssueModelRequest()) - ->setName($formattedName); - $response = $gapicClient->undeployIssueModel($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/UndeployIssueModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployIssueModelTest'); - $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 undeployIssueModelExceptionTest() - { - $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/undeployIssueModelTest'); - $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 UndeployIssueModelRequest()) - ->setName($formattedName); - $response = $gapicClient->undeployIssueModel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployIssueModelTest'); - 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 updateConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $languageCode = 'languageCode-412800396'; - $agentId = 'agentId1469158549'; - $turnCount = 428155597; - $obfuscatedUserId = 'obfuscatedUserId-227848300'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setAgentId($agentId); - $expectedResponse->setTurnCount($turnCount); - $expectedResponse->setObfuscatedUserId($obfuscatedUserId); - $transport->addResponse($expectedResponse); - // Mock request - $conversation = new Conversation(); - $request = (new UpdateConversationRequest()) - ->setConversation($conversation); - $response = $gapicClient->updateConversation($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/UpdateConversation', $actualFuncCall); - $actualValue = $actualRequestObject->getConversation(); - $this->assertProtobufEquals($conversation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateConversationExceptionTest() - { - $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 - $conversation = new Conversation(); - $request = (new UpdateConversationRequest()) - ->setConversation($conversation); - try { - $gapicClient->updateConversation($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 updateIssueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Issue(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $issue = new Issue(); - $request = (new UpdateIssueRequest()) - ->setIssue($issue); - $response = $gapicClient->updateIssue($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/UpdateIssue', $actualFuncCall); - $actualValue = $actualRequestObject->getIssue(); - $this->assertProtobufEquals($issue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateIssueExceptionTest() - { - $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 - $issue = new Issue(); - $request = (new UpdateIssueRequest()) - ->setIssue($issue); - try { - $gapicClient->updateIssue($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 updateIssueModelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $issueCount = 1779144233; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new IssueModel(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIssueCount($issueCount); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $issueModel = new IssueModel(); - $request = (new UpdateIssueModelRequest()) - ->setIssueModel($issueModel); - $response = $gapicClient->updateIssueModel($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/UpdateIssueModel', $actualFuncCall); - $actualValue = $actualRequestObject->getIssueModel(); - $this->assertProtobufEquals($issueModel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateIssueModelExceptionTest() - { - $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 - $issueModel = new IssueModel(); - $request = (new UpdateIssueModelRequest()) - ->setIssueModel($issueModel); - try { - $gapicClient->updateIssueModel($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 updatePhraseMatcherTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $versionTag = 'versionTag689430451'; - $displayName = 'displayName1615086568'; - $active = true; - $expectedResponse = new PhraseMatcher(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setVersionTag($versionTag); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setActive($active); - $transport->addResponse($expectedResponse); - // Mock request - $phraseMatcher = new PhraseMatcher(); - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - $phraseMatcher->setType($phraseMatcherType); - $request = (new UpdatePhraseMatcherRequest()) - ->setPhraseMatcher($phraseMatcher); - $response = $gapicClient->updatePhraseMatcher($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/UpdatePhraseMatcher', $actualFuncCall); - $actualValue = $actualRequestObject->getPhraseMatcher(); - $this->assertProtobufEquals($phraseMatcher, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePhraseMatcherExceptionTest() - { - $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 - $phraseMatcher = new PhraseMatcher(); - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - $phraseMatcher->setType($phraseMatcherType); - $request = (new UpdatePhraseMatcherRequest()) - ->setPhraseMatcher($phraseMatcher); - try { - $gapicClient->updatePhraseMatcher($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 updateSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new Settings(); - $expectedResponse->setName($name); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $settings = new Settings(); - $updateMask = new FieldMask(); - $request = (new UpdateSettingsRequest()) - ->setSettings($settings) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateSettings($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/UpdateSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getSettings(); - $this->assertProtobufEquals($settings, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSettingsExceptionTest() - { - $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 - $settings = new Settings(); - $updateMask = new FieldMask(); - $request = (new UpdateSettingsRequest()) - ->setSettings($settings) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateSettings($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 updateViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $value = 'value111972721'; - $expectedResponse = new View(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setValue($value); - $transport->addResponse($expectedResponse); - // Mock request - $view = new View(); - $request = (new UpdateViewRequest()) - ->setView($view); - $response = $gapicClient->updateView($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/UpdateView', $actualFuncCall); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateViewExceptionTest() - { - $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 - $view = new View(); - $request = (new UpdateViewRequest()) - ->setView($view); - try { - $gapicClient->updateView($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 uploadConversationTest() - { - $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/uploadConversationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $languageCode = 'languageCode-412800396'; - $agentId = 'agentId1469158549'; - $turnCount = 428155597; - $obfuscatedUserId = 'obfuscatedUserId-227848300'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setAgentId($agentId); - $expectedResponse->setTurnCount($turnCount); - $expectedResponse->setObfuscatedUserId($obfuscatedUserId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/uploadConversationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $conversation = new Conversation(); - $request = (new UploadConversationRequest()) - ->setParent($formattedParent) - ->setConversation($conversation); - $response = $gapicClient->uploadConversation($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/UploadConversation', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getConversation(); - $this->assertProtobufEquals($conversation, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/uploadConversationTest'); - $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 uploadConversationExceptionTest() - { - $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/uploadConversationTest'); - $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]'); - $conversation = new Conversation(); - $request = (new UploadConversationRequest()) - ->setParent($formattedParent) - ->setConversation($conversation); - $response = $gapicClient->uploadConversation($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/uploadConversationTest'); - 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 bulkAnalyzeConversationsAsyncTest() - { - $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/bulkAnalyzeConversationsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $successfulAnalysisCount = 1153322545; - $failedAnalysisCount = 1044285998; - $expectedResponse = new BulkAnalyzeConversationsResponse(); - $expectedResponse->setSuccessfulAnalysisCount($successfulAnalysisCount); - $expectedResponse->setFailedAnalysisCount($failedAnalysisCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkAnalyzeConversationsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $filter = 'filter-1274492040'; - $analysisPercentage = 9980822; - $request = (new BulkAnalyzeConversationsRequest()) - ->setParent($formattedParent) - ->setFilter($filter) - ->setAnalysisPercentage($analysisPercentage); - $response = $gapicClient->bulkAnalyzeConversationsAsync($request)->wait(); - $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/BulkAnalyzeConversations', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $actualValue = $actualApiRequestObject->getAnalysisPercentage(); - $this->assertProtobufEquals($analysisPercentage, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); - $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()); - } -} diff --git a/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/ContactCenterInsightsClientTest.php b/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/ContactCenterInsightsClientTest.php deleted file mode 100644 index 2689a76c9ba5..000000000000 --- a/owl-bot-staging/ContactCenterInsights/v1/tests/Unit/V1/ContactCenterInsightsClientTest.php +++ /dev/null @@ -1,3159 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ContactCenterInsightsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ContactCenterInsightsClient($options); - } - - /** @test */ - public function bulkAnalyzeConversationsTest() - { - $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/bulkAnalyzeConversationsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $successfulAnalysisCount = 1153322545; - $failedAnalysisCount = 1044285998; - $expectedResponse = new BulkAnalyzeConversationsResponse(); - $expectedResponse->setSuccessfulAnalysisCount($successfulAnalysisCount); - $expectedResponse->setFailedAnalysisCount($failedAnalysisCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkAnalyzeConversationsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $filter = 'filter-1274492040'; - $analysisPercentage = 9980822; - $response = $gapicClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); - $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/BulkAnalyzeConversations', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $actualValue = $actualApiRequestObject->getAnalysisPercentage(); - $this->assertProtobufEquals($analysisPercentage, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); - $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 bulkAnalyzeConversationsExceptionTest() - { - $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/bulkAnalyzeConversationsTest'); - $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]'); - $filter = 'filter-1274492040'; - $analysisPercentage = 9980822; - $response = $gapicClient->bulkAnalyzeConversations($formattedParent, $filter, $analysisPercentage); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkAnalyzeConversationsTest'); - 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 bulkDeleteConversationsTest() - { - $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/bulkDeleteConversationsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkDeleteConversationsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkDeleteConversationsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->bulkDeleteConversations($formattedParent); - $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/BulkDeleteConversations', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteConversationsTest'); - $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 bulkDeleteConversationsExceptionTest() - { - $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/bulkDeleteConversationsTest'); - $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]'); - $response = $gapicClient->bulkDeleteConversations($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteConversationsTest'); - 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 calculateIssueModelStatsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CalculateIssueModelStatsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedIssueModel = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $response = $gapicClient->calculateIssueModelStats($formattedIssueModel); - $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/CalculateIssueModelStats', $actualFuncCall); - $actualValue = $actualRequestObject->getIssueModel(); - $this->assertProtobufEquals($formattedIssueModel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function calculateIssueModelStatsExceptionTest() - { - $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 - $formattedIssueModel = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - try { - $gapicClient->calculateIssueModelStats($formattedIssueModel); - // 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 calculateStatsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $averageTurnCount = 1693477329; - $conversationCount = 1994187347; - $expectedResponse = new CalculateStatsResponse(); - $expectedResponse->setAverageTurnCount($averageTurnCount); - $expectedResponse->setConversationCount($conversationCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->calculateStats($formattedLocation); - $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/CalculateStats', $actualFuncCall); - $actualValue = $actualRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function calculateStatsExceptionTest() - { - $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 - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->calculateStats($formattedLocation); - // 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 createAnalysisTest() - { - $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/createAnalysisTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Analysis(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAnalysisTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $analysis = new Analysis(); - $response = $gapicClient->createAnalysis($formattedParent, $analysis); - $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/CreateAnalysis', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAnalysis(); - $this->assertProtobufEquals($analysis, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); - $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 createAnalysisExceptionTest() - { - $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/createAnalysisTest'); - $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $analysis = new Analysis(); - $response = $gapicClient->createAnalysis($formattedParent, $analysis); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); - 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 createConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $languageCode = 'languageCode-412800396'; - $agentId = 'agentId1469158549'; - $turnCount = 428155597; - $obfuscatedUserId = 'obfuscatedUserId-227848300'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setAgentId($agentId); - $expectedResponse->setTurnCount($turnCount); - $expectedResponse->setObfuscatedUserId($obfuscatedUserId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $conversation = new Conversation(); - $response = $gapicClient->createConversation($formattedParent, $conversation); - $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/CreateConversation', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getConversation(); - $this->assertProtobufEquals($conversation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConversationExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $conversation = new Conversation(); - try { - $gapicClient->createConversation($formattedParent, $conversation); - // 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 createIssueModelTest() - { - $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/createIssueModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $issueCount = 1779144233; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new IssueModel(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIssueCount($issueCount); - $expectedResponse->setLanguageCode($languageCode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIssueModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $issueModel = new IssueModel(); - $response = $gapicClient->createIssueModel($formattedParent, $issueModel); - $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/CreateIssueModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIssueModel(); - $this->assertProtobufEquals($issueModel, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIssueModelTest'); - $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 createIssueModelExceptionTest() - { - $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/createIssueModelTest'); - $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]'); - $issueModel = new IssueModel(); - $response = $gapicClient->createIssueModel($formattedParent, $issueModel); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIssueModelTest'); - 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 createPhraseMatcherTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $versionTag = 'versionTag689430451'; - $displayName = 'displayName1615086568'; - $active = true; - $expectedResponse = new PhraseMatcher(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setVersionTag($versionTag); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setActive($active); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $phraseMatcher = new PhraseMatcher(); - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - $phraseMatcher->setType($phraseMatcherType); - $response = $gapicClient->createPhraseMatcher($formattedParent, $phraseMatcher); - $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/CreatePhraseMatcher', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPhraseMatcher(); - $this->assertProtobufEquals($phraseMatcher, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPhraseMatcherExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $phraseMatcher = new PhraseMatcher(); - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - $phraseMatcher->setType($phraseMatcherType); - try { - $gapicClient->createPhraseMatcher($formattedParent, $phraseMatcher); - // 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 createViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $value = 'value111972721'; - $expectedResponse = new View(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setValue($value); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $view = new View(); - $response = $gapicClient->createView($formattedParent, $view); - $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/CreateView', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createViewExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $view = new View(); - try { - $gapicClient->createView($formattedParent, $view); - // 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 deleteAnalysisTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - $gapicClient->deleteAnalysis($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteAnalysis', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAnalysisExceptionTest() - { - $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->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - try { - $gapicClient->deleteAnalysis($formattedName); - // 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 deleteConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $gapicClient->deleteConversation($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteConversation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConversationExceptionTest() - { - $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - try { - $gapicClient->deleteConversation($formattedName); - // 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 deleteIssueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - $gapicClient->deleteIssue($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteIssue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIssueExceptionTest() - { - $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->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - try { - $gapicClient->deleteIssue($formattedName); - // 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 deleteIssueModelTest() - { - $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/deleteIssueModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteIssueModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $response = $gapicClient->deleteIssueModel($formattedName); - $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/DeleteIssueModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIssueModelTest'); - $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 deleteIssueModelExceptionTest() - { - $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/deleteIssueModelTest'); - $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]'); - $response = $gapicClient->deleteIssueModel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIssueModelTest'); - 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 deletePhraseMatcherTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - $gapicClient->deletePhraseMatcher($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeletePhraseMatcher', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePhraseMatcherExceptionTest() - { - $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->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - try { - $gapicClient->deletePhraseMatcher($formattedName); - // 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 deleteViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - $gapicClient->deleteView($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteViewExceptionTest() - { - $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->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - try { - $gapicClient->deleteView($formattedName); - // 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 deployIssueModelTest() - { - $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/deployIssueModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new DeployIssueModelResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deployIssueModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $response = $gapicClient->deployIssueModel($formattedName); - $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/DeployIssueModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployIssueModelTest'); - $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 deployIssueModelExceptionTest() - { - $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/deployIssueModelTest'); - $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]'); - $response = $gapicClient->deployIssueModel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployIssueModelTest'); - 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 exportInsightsDataTest() - { - $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/exportInsightsDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ExportInsightsDataResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportInsightsDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->exportInsightsData($formattedParent); - $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/ExportInsightsData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportInsightsDataTest'); - $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 exportInsightsDataExceptionTest() - { - $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/exportInsightsDataTest'); - $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]'); - $response = $gapicClient->exportInsightsData($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportInsightsDataTest'); - 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() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Analysis(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - $response = $gapicClient->getAnalysis($formattedName); - $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/GetAnalysis', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAnalysisExceptionTest() - { - $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->analysisName('[PROJECT]', '[LOCATION]', '[CONVERSATION]', '[ANALYSIS]'); - try { - $gapicClient->getAnalysis($formattedName); - // 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 getConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $languageCode = 'languageCode-412800396'; - $agentId = 'agentId1469158549'; - $turnCount = 428155597; - $obfuscatedUserId = 'obfuscatedUserId-227848300'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name2); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setAgentId($agentId); - $expectedResponse->setTurnCount($turnCount); - $expectedResponse->setObfuscatedUserId($obfuscatedUserId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $response = $gapicClient->getConversation($formattedName); - $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/GetConversation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversationExceptionTest() - { - $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->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - try { - $gapicClient->getConversation($formattedName); - // 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() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Issue(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - $response = $gapicClient->getIssue($formattedName); - $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/GetIssue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIssueExceptionTest() - { - $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->issueName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]', '[ISSUE]'); - try { - $gapicClient->getIssue($formattedName); - // 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 getIssueModelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $issueCount = 1779144233; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new IssueModel(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIssueCount($issueCount); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $response = $gapicClient->getIssueModel($formattedName); - $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/GetIssueModel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIssueModelExceptionTest() - { - $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->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - try { - $gapicClient->getIssueModel($formattedName); - // 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 getPhraseMatcherTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $versionTag = 'versionTag689430451'; - $displayName = 'displayName1615086568'; - $active = true; - $expectedResponse = new PhraseMatcher(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setVersionTag($versionTag); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setActive($active); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - $response = $gapicClient->getPhraseMatcher($formattedName); - $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/GetPhraseMatcher', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPhraseMatcherExceptionTest() - { - $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->phraseMatcherName('[PROJECT]', '[LOCATION]', '[PHRASE_MATCHER]'); - try { - $gapicClient->getPhraseMatcher($formattedName); - // 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 getSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new Settings(); - $expectedResponse->setName($name2); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->settingsName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->getSettings($formattedName); - $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/GetSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSettingsExceptionTest() - { - $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->settingsName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->getSettings($formattedName); - // 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 getViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $value = 'value111972721'; - $expectedResponse = new View(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setValue($value); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - $response = $gapicClient->getView($formattedName); - $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/GetView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getViewExceptionTest() - { - $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->viewName('[PROJECT]', '[LOCATION]', '[VIEW]'); - try { - $gapicClient->getView($formattedName); - // 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 ingestConversationsTest() - { - $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/ingestConversationsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new IngestConversationsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/ingestConversationsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->ingestConversations($formattedParent); - $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/IngestConversations', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/ingestConversationsTest'); - $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 ingestConversationsExceptionTest() - { - $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/ingestConversationsTest'); - $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]'); - $response = $gapicClient->ingestConversations($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/ingestConversationsTest'); - 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() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $analysesElement = new Analysis(); - $analyses = [ - $analysesElement, - ]; - $expectedResponse = new ListAnalysesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAnalyses($analyses); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - $response = $gapicClient->listAnalyses($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAnalyses()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListAnalyses', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAnalysesExceptionTest() - { - $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 - $formattedParent = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[CONVERSATION]'); - try { - $gapicClient->listAnalyses($formattedParent); - // 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 listConversationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $conversationsElement = new Conversation(); - $conversations = [ - $conversationsElement, - ]; - $expectedResponse = new ListConversationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConversations($conversations); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listConversations($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConversations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListConversations', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversationsExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listConversations($formattedParent); - // 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 listIssueModelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListIssueModelsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listIssueModels($formattedParent); - $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/ListIssueModels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIssueModelsExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listIssueModels($formattedParent); - // 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 listIssuesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListIssuesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $response = $gapicClient->listIssues($formattedParent); - $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/ListIssues', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIssuesExceptionTest() - { - $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 - $formattedParent = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - try { - $gapicClient->listIssues($formattedParent); - // 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 listPhraseMatchersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $phraseMatchersElement = new PhraseMatcher(); - $phraseMatchers = [ - $phraseMatchersElement, - ]; - $expectedResponse = new ListPhraseMatchersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPhraseMatchers($phraseMatchers); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listPhraseMatchers($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPhraseMatchers()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListPhraseMatchers', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPhraseMatchersExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listPhraseMatchers($formattedParent); - // 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 listViewsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $viewsElement = new View(); - $views = [ - $viewsElement, - ]; - $expectedResponse = new ListViewsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setViews($views); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listViews($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getViews()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListViews', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listViewsExceptionTest() - { - $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listViews($formattedParent); - // 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 undeployIssueModelTest() - { - $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/undeployIssueModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UndeployIssueModelResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeployIssueModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueModelName('[PROJECT]', '[LOCATION]', '[ISSUE_MODEL]'); - $response = $gapicClient->undeployIssueModel($formattedName); - $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/UndeployIssueModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployIssueModelTest'); - $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 undeployIssueModelExceptionTest() - { - $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/undeployIssueModelTest'); - $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]'); - $response = $gapicClient->undeployIssueModel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployIssueModelTest'); - 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 updateConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $languageCode = 'languageCode-412800396'; - $agentId = 'agentId1469158549'; - $turnCount = 428155597; - $obfuscatedUserId = 'obfuscatedUserId-227848300'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setAgentId($agentId); - $expectedResponse->setTurnCount($turnCount); - $expectedResponse->setObfuscatedUserId($obfuscatedUserId); - $transport->addResponse($expectedResponse); - // Mock request - $conversation = new Conversation(); - $response = $gapicClient->updateConversation($conversation); - $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/UpdateConversation', $actualFuncCall); - $actualValue = $actualRequestObject->getConversation(); - $this->assertProtobufEquals($conversation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateConversationExceptionTest() - { - $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 - $conversation = new Conversation(); - try { - $gapicClient->updateConversation($conversation); - // 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 updateIssueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Issue(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $issue = new Issue(); - $response = $gapicClient->updateIssue($issue); - $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/UpdateIssue', $actualFuncCall); - $actualValue = $actualRequestObject->getIssue(); - $this->assertProtobufEquals($issue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateIssueExceptionTest() - { - $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 - $issue = new Issue(); - try { - $gapicClient->updateIssue($issue); - // 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 updateIssueModelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $issueCount = 1779144233; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new IssueModel(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIssueCount($issueCount); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $issueModel = new IssueModel(); - $response = $gapicClient->updateIssueModel($issueModel); - $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/UpdateIssueModel', $actualFuncCall); - $actualValue = $actualRequestObject->getIssueModel(); - $this->assertProtobufEquals($issueModel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateIssueModelExceptionTest() - { - $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 - $issueModel = new IssueModel(); - try { - $gapicClient->updateIssueModel($issueModel); - // 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 updatePhraseMatcherTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $versionTag = 'versionTag689430451'; - $displayName = 'displayName1615086568'; - $active = true; - $expectedResponse = new PhraseMatcher(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setVersionTag($versionTag); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setActive($active); - $transport->addResponse($expectedResponse); - // Mock request - $phraseMatcher = new PhraseMatcher(); - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - $phraseMatcher->setType($phraseMatcherType); - $response = $gapicClient->updatePhraseMatcher($phraseMatcher); - $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/UpdatePhraseMatcher', $actualFuncCall); - $actualValue = $actualRequestObject->getPhraseMatcher(); - $this->assertProtobufEquals($phraseMatcher, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePhraseMatcherExceptionTest() - { - $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 - $phraseMatcher = new PhraseMatcher(); - $phraseMatcherType = PhraseMatcherType::PHRASE_MATCHER_TYPE_UNSPECIFIED; - $phraseMatcher->setType($phraseMatcherType); - try { - $gapicClient->updatePhraseMatcher($phraseMatcher); - // 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 updateSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new Settings(); - $expectedResponse->setName($name); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $settings = new Settings(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateSettings($settings, $updateMask); - $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/UpdateSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getSettings(); - $this->assertProtobufEquals($settings, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSettingsExceptionTest() - { - $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 - $settings = new Settings(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateSettings($settings, $updateMask); - // 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 updateViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $value = 'value111972721'; - $expectedResponse = new View(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setValue($value); - $transport->addResponse($expectedResponse); - // Mock request - $view = new View(); - $response = $gapicClient->updateView($view); - $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/UpdateView', $actualFuncCall); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateViewExceptionTest() - { - $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 - $view = new View(); - try { - $gapicClient->updateView($view); - // 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 uploadConversationTest() - { - $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/uploadConversationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $languageCode = 'languageCode-412800396'; - $agentId = 'agentId1469158549'; - $turnCount = 428155597; - $obfuscatedUserId = 'obfuscatedUserId-227848300'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setAgentId($agentId); - $expectedResponse->setTurnCount($turnCount); - $expectedResponse->setObfuscatedUserId($obfuscatedUserId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/uploadConversationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $conversation = new Conversation(); - $response = $gapicClient->uploadConversation($formattedParent, $conversation); - $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/UploadConversation', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getConversation(); - $this->assertProtobufEquals($conversation, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/uploadConversationTest'); - $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 uploadConversationExceptionTest() - { - $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/uploadConversationTest'); - $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]'); - $conversation = new Conversation(); - $response = $gapicClient->uploadConversation($formattedParent, $conversation); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/uploadConversationTest'); - 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()); - } -}