From a8cd5c1b4c61df02da223b042477e88da4dd48b6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 13 Jan 2023 19:05:35 +0000 Subject: [PATCH 1/2] feat: Added SuggestConversationSummary RPC docs: updated go library package PiperOrigin-RevId: 501862436 Source-Link: https://github.com/googleapis/googleapis/commit/155e0f4123ba003055587768944a47498c48926b Source-Link: https://github.com/googleapis/googleapis-gen/commit/3051f617a991c274c88d27064e803095e4ef9d39 Copy-Tag: eyJwIjoiRGlhbG9nZmxvdy8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MWY2MTdhOTkxYzI3NGM4OGQyNzA2NGU4MDMwOTVlNGVmOWQzOSJ9 --- .../Google/Cloud/Dialogflow/V2/Agent.php | Bin 0 -> 5807 bytes .../Cloud/Dialogflow/V2/AnswerRecord.php | Bin 0 -> 4426 bytes .../Cloud/Dialogflow/V2/AudioConfig.php | Bin 0 -> 3565 bytes .../Google/Cloud/Dialogflow/V2/Context.php | 70 + .../Cloud/Dialogflow/V2/Conversation.php | Bin 0 -> 5535 bytes .../Dialogflow/V2/ConversationDataset.php | Bin 0 -> 5104 bytes .../Cloud/Dialogflow/V2/ConversationEvent.php | Bin 0 -> 1358 bytes .../Cloud/Dialogflow/V2/ConversationModel.php | Bin 0 -> 9095 bytes .../Dialogflow/V2/ConversationProfile.php | Bin 0 -> 10877 bytes .../Google/Cloud/Dialogflow/V2/Document.php | Bin 0 -> 7665 bytes .../Google/Cloud/Dialogflow/V2/EntityType.php | Bin 0 -> 7422 bytes .../Cloud/Dialogflow/V2/Environment.php | Bin 0 -> 5522 bytes .../Cloud/Dialogflow/V2/Fulfillment.php | Bin 0 -> 2908 bytes .../Google/Cloud/Dialogflow/V2/Gcs.php | 33 + .../V2/HumanAgentAssistantEvent.php | 32 + .../Google/Cloud/Dialogflow/V2/Intent.php | Bin 0 -> 12742 bytes .../Cloud/Dialogflow/V2/KnowledgeBase.php | 66 + .../Cloud/Dialogflow/V2/Participant.php | Bin 0 -> 11918 bytes .../Google/Cloud/Dialogflow/V2/Session.php | Bin 0 -> 6680 bytes .../Cloud/Dialogflow/V2/SessionEntityType.php | Bin 0 -> 5745 bytes .../Cloud/Dialogflow/V2/ValidationResult.php | Bin 0 -> 1126 bytes .../Google/Cloud/Dialogflow/V2/Version.php | Bin 0 -> 3769 bytes .../Google/Cloud/Dialogflow/V2/Webhook.php | 50 + .../src/Google/Cloud/Dialogflow/V2/Agent.php | 541 +++++++ .../Cloud/Dialogflow/V2/Agent/ApiVersion.php | 71 + .../Cloud/Dialogflow/V2/Agent/MatchMode.php | 66 + .../Google/Cloud/Dialogflow/V2/Agent/Tier.php | 72 + .../Dialogflow/V2/AgentAssistantFeedback.php | 243 +++ .../AnswerRelevance.php | 64 + .../DocumentCorrectness.php | 64 + .../DocumentEfficiency.php | 64 + .../SummarizationFeedback.php | 158 ++ ...AgentAssistantFeedback_AnswerRelevance.php | 16 + ...tAssistantFeedback_DocumentCorrectness.php | 16 + ...ntAssistantFeedback_DocumentEfficiency.php | 16 + ...ssistantFeedback_SummarizationFeedback.php | 16 + .../Dialogflow/V2/AgentAssistantRecord.php | 108 ++ .../Cloud/Dialogflow/V2/Agent_ApiVersion.php | 16 + .../Cloud/Dialogflow/V2/Agent_MatchMode.php | 16 + .../Google/Cloud/Dialogflow/V2/Agent_Tier.php | 16 + .../Cloud/Dialogflow/V2/AgentsGrpcClient.php | 253 ++++ .../Dialogflow/V2/AnalyzeContentRequest.php | 401 +++++ .../Dialogflow/V2/AnalyzeContentResponse.php | 428 ++++++ .../Dialogflow/V2/AnnotatedMessagePart.php | 195 +++ .../Cloud/Dialogflow/V2/AnswerFeedback.php | 274 ++++ .../V2/AnswerFeedback/CorrectnessLevel.php | 71 + .../V2/AnswerFeedback_CorrectnessLevel.php | 16 + .../Cloud/Dialogflow/V2/AnswerRecord.php | 189 +++ .../Dialogflow/V2/AnswerRecordsGrpcClient.php | 67 + .../Cloud/Dialogflow/V2/ArticleAnswer.php | 261 ++++ .../V2/ArticleSuggestionModelMetadata.php | 71 + .../Dialogflow/V2/AssistQueryParameters.php | 131 ++ .../Cloud/Dialogflow/V2/AudioEncoding.php | 118 ++ .../Dialogflow/V2/AutomatedAgentConfig.php | 119 ++ .../Dialogflow/V2/AutomatedAgentReply.php | 203 +++ .../AutomatedAgentReplyType.php | 70 + ...atedAgentReply_AutomatedAgentReplyType.php | 16 + .../V2/BatchCreateEntitiesRequest.php | 156 ++ .../V2/BatchDeleteEntitiesRequest.php | 164 ++ .../V2/BatchDeleteEntityTypesRequest.php | 110 ++ .../V2/BatchDeleteIntentsRequest.php | 110 ++ .../V2/BatchUpdateEntitiesRequest.php | 200 +++ .../V2/BatchUpdateEntityTypesRequest.php | 250 +++ .../V2/BatchUpdateEntityTypesResponse.php | 68 + .../V2/BatchUpdateIntentsRequest.php | 278 ++++ .../V2/BatchUpdateIntentsResponse.php | 68 + ...ggestionFeatureConfigOperationMetadata.php | 192 +++ .../ClearSuggestionFeatureConfigRequest.php | 147 ++ .../V2/CompleteConversationRequest.php | 76 + .../Google/Cloud/Dialogflow/V2/Context.php | 269 ++++ .../Dialogflow/V2/ContextsGrpcClient.php | 127 ++ .../Cloud/Dialogflow/V2/Conversation.php | 380 +++++ .../V2/Conversation/ConversationStage.php | 69 + .../V2/Conversation/LifecycleState.php | 64 + .../Dialogflow/V2/ConversationDataset.php | 316 ++++ .../V2/ConversationDatasetsGrpcClient.php | 143 ++ .../Cloud/Dialogflow/V2/ConversationEvent.php | 200 +++ .../Dialogflow/V2/ConversationEvent/Type.php | 96 ++ .../Dialogflow/V2/ConversationEvent_Type.php | 16 + .../Cloud/Dialogflow/V2/ConversationInfo.php | 75 + .../Cloud/Dialogflow/V2/ConversationModel.php | 346 +++++ .../V2/ConversationModel/ModelType.php | 64 + .../Dialogflow/V2/ConversationModel/State.php | 108 ++ .../V2/ConversationModelEvaluation.php | 329 ++++ .../V2/ConversationModel_ModelType.php | 16 + .../Dialogflow/V2/ConversationModel_State.php | 16 + .../V2/ConversationModelsGrpcClient.php | 212 +++ .../Dialogflow/V2/ConversationPhoneNumber.php | 68 + .../Dialogflow/V2/ConversationProfile.php | 651 ++++++++ .../V2/ConversationProfilesGrpcClient.php | 178 +++ .../V2/Conversation_ConversationStage.php | 16 + .../V2/Conversation_LifecycleState.php | 16 + .../Dialogflow/V2/ConversationsGrpcClient.php | 153 ++ .../Dialogflow/V2/CreateContextRequest.php | 132 ++ ...teConversationDatasetOperationMetadata.php | 75 + .../V2/CreateConversationDatasetRequest.php | 116 ++ ...sationModelEvaluationOperationMetadata.php | 201 +++ .../State.php | 85 ++ ...ModelEvaluationOperationMetadata_State.php | 16 + ...eateConversationModelEvaluationRequest.php | 120 ++ ...eateConversationModelOperationMetadata.php | 155 ++ .../State.php | 94 ++ ...nversationModelOperationMetadata_State.php | 16 + .../V2/CreateConversationModelRequest.php | 116 ++ .../V2/CreateConversationProfileRequest.php | 116 ++ .../V2/CreateConversationRequest.php | 182 +++ .../Dialogflow/V2/CreateDocumentRequest.php | 120 ++ .../Dialogflow/V2/CreateEntityTypeRequest.php | 166 ++ .../V2/CreateEnvironmentRequest.php | 158 ++ .../Dialogflow/V2/CreateIntentRequest.php | 200 +++ .../V2/CreateKnowledgeBaseRequest.php | 116 ++ .../V2/CreateParticipantRequest.php | 120 ++ .../V2/CreateSessionEntityTypeRequest.php | 132 ++ .../Dialogflow/V2/CreateVersionRequest.php | 124 ++ .../Dialogflow/V2/DeleteAgentRequest.php | 72 + .../V2/DeleteAllContextsRequest.php | 88 ++ .../Dialogflow/V2/DeleteContextRequest.php | 88 ++ ...teConversationDatasetOperationMetadata.php | 33 + .../V2/DeleteConversationDatasetRequest.php | 76 + ...leteConversationModelOperationMetadata.php | 121 ++ .../V2/DeleteConversationModelRequest.php | 72 + .../V2/DeleteConversationProfileRequest.php | 78 + .../Dialogflow/V2/DeleteDocumentRequest.php | 76 + .../Dialogflow/V2/DeleteEntityTypeRequest.php | 72 + .../V2/DeleteEnvironmentRequest.php | 88 ++ .../Dialogflow/V2/DeleteIntentRequest.php | 76 + .../V2/DeleteKnowledgeBaseRequest.php | 114 ++ .../V2/DeleteSessionEntityTypeRequest.php | 92 ++ .../Dialogflow/V2/DeleteVersionRequest.php | 84 ++ ...ployConversationModelOperationMetadata.php | 121 ++ .../V2/DeployConversationModelRequest.php | 72 + .../Dialogflow/V2/DetectIntentRequest.php | 389 +++++ .../Dialogflow/V2/DetectIntentResponse.php | 273 ++++ .../Google/Cloud/Dialogflow/V2/Document.php | 500 ++++++ .../Dialogflow/V2/Document/KnowledgeType.php | 85 ++ .../Dialogflow/V2/Document/ReloadStatus.php | 132 ++ .../Cloud/Dialogflow/V2/Document/State.php | 85 ++ .../Dialogflow/V2/Document_KnowledgeType.php | 16 + .../Dialogflow/V2/Document_ReloadStatus.php | 16 + .../Cloud/Dialogflow/V2/Document_State.php | 16 + .../Dialogflow/V2/DocumentsGrpcClient.php | 215 +++ .../Cloud/Dialogflow/V2/DtmfParameters.php | 67 + .../Google/Cloud/Dialogflow/V2/EntityType.php | 274 ++++ .../V2/EntityType/AutoExpansionMode.php | 60 + .../Cloud/Dialogflow/V2/EntityType/Entity.php | 148 ++ .../Cloud/Dialogflow/V2/EntityType/Kind.php | 75 + .../Cloud/Dialogflow/V2/EntityTypeBatch.php | 67 + .../V2/EntityType_AutoExpansionMode.php | 16 + .../Cloud/Dialogflow/V2/EntityType_Entity.php | 16 + .../Cloud/Dialogflow/V2/EntityType_Kind.php | 16 + .../Dialogflow/V2/EntityTypesGrpcClient.php | 265 ++++ .../Cloud/Dialogflow/V2/Environment.php | 362 +++++ .../Cloud/Dialogflow/V2/Environment/State.php | 75 + .../Dialogflow/V2/EnvironmentHistory.php | 164 ++ .../V2/EnvironmentHistory/Entry.php | 148 ++ .../V2/EnvironmentHistory_Entry.php | 16 + .../Cloud/Dialogflow/V2/Environment_State.php | 16 + .../Dialogflow/V2/EnvironmentsGrpcClient.php | 136 ++ .../Cloud/Dialogflow/V2/EvaluationConfig.php | 142 ++ .../EvaluationConfig/SmartComposeConfig.php | 124 ++ .../V2/EvaluationConfig/SmartReplyConfig.php | 124 ++ .../EvaluationConfig_SmartComposeConfig.php | 16 + .../V2/EvaluationConfig_SmartReplyConfig.php | 16 + .../Google/Cloud/Dialogflow/V2/EventInput.php | 229 +++ .../Dialogflow/V2/ExportAgentRequest.php | 138 ++ .../Dialogflow/V2/ExportAgentResponse.php | 112 ++ .../Dialogflow/V2/ExportDocumentRequest.php | 194 +++ .../Dialogflow/V2/ExportOperationMetadata.php | 77 + .../Google/Cloud/Dialogflow/V2/FaqAnswer.php | 269 ++++ .../Cloud/Dialogflow/V2/Fulfillment.php | 247 +++ .../Dialogflow/V2/Fulfillment/Feature.php | 70 + .../V2/Fulfillment/Feature/Type.php | 57 + .../V2/Fulfillment/GenericWebService.php | 236 +++ .../Dialogflow/V2/Fulfillment_Feature.php | 16 + .../V2/Fulfillment_Feature_Type.php | 16 + .../V2/Fulfillment_GenericWebService.php | 16 + .../Dialogflow/V2/FulfillmentsGrpcClient.php | 65 + .../Cloud/Dialogflow/V2/GcsDestination.php | 83 + .../Google/Cloud/Dialogflow/V2/GcsSources.php | 75 + .../Cloud/Dialogflow/V2/GetAgentRequest.php | 72 + .../Cloud/Dialogflow/V2/GetContextRequest.php | 88 ++ .../V2/GetConversationDatasetRequest.php | 76 + .../GetConversationModelEvaluationRequest.php | 76 + .../V2/GetConversationModelRequest.php | 72 + .../V2/GetConversationProfileRequest.php | 76 + .../Dialogflow/V2/GetConversationRequest.php | 76 + .../Dialogflow/V2/GetDocumentRequest.php | 76 + .../Dialogflow/V2/GetEntityTypeRequest.php | 122 ++ .../V2/GetEnvironmentHistoryRequest.php | 160 ++ .../Dialogflow/V2/GetEnvironmentRequest.php | 88 ++ .../Dialogflow/V2/GetFulfillmentRequest.php | 72 + .../Cloud/Dialogflow/V2/GetIntentRequest.php | 156 ++ .../Dialogflow/V2/GetKnowledgeBaseRequest.php | 76 + .../Dialogflow/V2/GetParticipantRequest.php | 76 + .../V2/GetSessionEntityTypeRequest.php | 92 ++ .../V2/GetValidationResultRequest.php | 122 ++ .../Cloud/Dialogflow/V2/GetVersionRequest.php | 84 ++ .../V2/HumanAgentAssistantConfig.php | 217 +++ .../ConversationModelConfig.php | 76 + .../ConversationProcessConfig.php | 74 + .../MessageAnalysisConfig.php | 196 +++ .../SuggestionConfig.php | 140 ++ .../SuggestionFeatureConfig.php | 302 ++++ .../SuggestionQueryConfig.php | 322 ++++ .../ContextFilterSettings.php | 143 ++ .../DialogflowQuerySource.php | 83 + .../DocumentQuerySource.php | 83 + .../KnowledgeBaseQuerySource.php | 83 + .../SuggestionTriggerSettings.php | 108 ++ ...ssistantConfig_ConversationModelConfig.php | 16 + ...istantConfig_ConversationProcessConfig.php | 16 + ...tAssistantConfig_MessageAnalysisConfig.php | 16 + ...nAgentAssistantConfig_SuggestionConfig.php | 16 + ...ssistantConfig_SuggestionFeatureConfig.php | 16 + ...tAssistantConfig_SuggestionQueryConfig.php | 16 + ...stionQueryConfig_ContextFilterSettings.php | 16 + ...stionQueryConfig_DialogflowQuerySource.php | 16 + ...gestionQueryConfig_DocumentQuerySource.php | 16 + ...onQueryConfig_KnowledgeBaseQuerySource.php | 16 + ...istantConfig_SuggestionTriggerSettings.php | 16 + .../V2/HumanAgentAssistantEvent.php | 148 ++ .../Dialogflow/V2/HumanAgentHandoffConfig.php | 111 ++ .../LivePersonConfig.php | 74 + .../SalesforceLiveAgentConfig.php | 184 +++ ...manAgentHandoffConfig_LivePersonConfig.php | 16 + ...andoffConfig_SalesforceLiveAgentConfig.php | 16 + .../Dialogflow/V2/ImportAgentRequest.php | 165 ++ ...mportConversationDataOperationMetadata.php | 163 ++ ...mportConversationDataOperationResponse.php | 111 ++ .../V2/ImportConversationDataRequest.php | 120 ++ .../Dialogflow/V2/ImportDocumentTemplate.php | 147 ++ .../Dialogflow/V2/ImportDocumentsRequest.php | 212 +++ .../Dialogflow/V2/ImportDocumentsResponse.php | 68 + .../Cloud/Dialogflow/V2/InputAudioConfig.php | 570 +++++++ .../Cloud/Dialogflow/V2/InputConfig.php | 82 + .../Cloud/Dialogflow/V2/InputDataset.php | 76 + .../Cloud/Dialogflow/V2/InputTextConfig.php | 75 + .../src/Google/Cloud/Dialogflow/V2/Intent.php | 904 +++++++++++ .../V2/Intent/FollowupIntentInfo.php | 112 ++ .../Cloud/Dialogflow/V2/Intent/Message.php | 545 +++++++ .../V2/Intent/Message/BasicCard.php | 216 +++ .../V2/Intent/Message/BasicCard/Button.php | 114 ++ .../BasicCard/Button/OpenUriAction.php | 70 + .../V2/Intent/Message/BrowseCarouselCard.php | 113 ++ .../BrowseCarouselCardItem.php | 234 +++ .../BrowseCarouselCardItem/OpenUrlAction.php | 108 ++ .../OpenUrlAction/UrlTypeHint.php | 65 + .../ImageDisplayOptions.php | 89 ++ .../Dialogflow/V2/Intent/Message/Card.php | 172 +++ .../V2/Intent/Message/Card/Button.php | 108 ++ .../V2/Intent/Message/CarouselSelect.php | 70 + .../V2/Intent/Message/CarouselSelect/Item.php | 192 +++ .../V2/Intent/Message/ColumnProperties.php | 105 ++ .../ColumnProperties/HorizontalAlignment.php | 71 + .../Dialogflow/V2/Intent/Message/Image.php | 108 ++ .../V2/Intent/Message/LinkOutSuggestion.php | 109 ++ .../V2/Intent/Message/ListSelect.php | 138 ++ .../V2/Intent/Message/ListSelect/Item.php | 192 +++ .../V2/Intent/Message/MediaContent.php | 104 ++ .../MediaContent/ResponseMediaObject.php | 213 +++ .../MediaContent/ResponseMediaType.php | 57 + .../Dialogflow/V2/Intent/Message/Platform.php | 116 ++ .../V2/Intent/Message/QuickReplies.php | 104 ++ .../V2/Intent/Message/SelectItemInfo.php | 113 ++ .../V2/Intent/Message/SimpleResponse.php | 150 ++ .../V2/Intent/Message/SimpleResponses.php | 73 + .../V2/Intent/Message/Suggestion.php | 71 + .../V2/Intent/Message/Suggestions.php | 70 + .../V2/Intent/Message/TableCard.php | 250 +++ .../V2/Intent/Message/TableCardCell.php | 71 + .../V2/Intent/Message/TableCardRow.php | 104 ++ .../Dialogflow/V2/Intent/Message/Text.php | 70 + .../Cloud/Dialogflow/V2/Intent/Parameter.php | 360 +++++ .../Dialogflow/V2/Intent/TrainingPhrase.php | 240 +++ .../V2/Intent/TrainingPhrase/Part.php | 196 +++ .../V2/Intent/TrainingPhrase/Type.php | 70 + .../Dialogflow/V2/Intent/WebhookState.php | 65 + .../Cloud/Dialogflow/V2/IntentBatch.php | 67 + .../Google/Cloud/Dialogflow/V2/IntentView.php | 56 + .../V2/Intent_FollowupIntentInfo.php | 16 + .../Cloud/Dialogflow/V2/Intent_Message.php | 16 + .../V2/Intent_Message_BasicCard.php | 16 + .../V2/Intent_Message_BasicCard_Button.php | 16 + ...Message_BasicCard_Button_OpenUriAction.php | 16 + .../V2/Intent_Message_BrowseCarouselCard.php | 16 + ...wseCarouselCard_BrowseCarouselCardItem.php | 16 + ...d_BrowseCarouselCardItem_OpenUrlAction.php | 16 + ...uselCardItem_OpenUrlAction_UrlTypeHint.php | 16 + ...BrowseCarouselCard_ImageDisplayOptions.php | 16 + .../Dialogflow/V2/Intent_Message_Card.php | 16 + .../V2/Intent_Message_Card_Button.php | 16 + .../V2/Intent_Message_CarouselSelect.php | 16 + .../V2/Intent_Message_CarouselSelect_Item.php | 16 + .../V2/Intent_Message_ColumnProperties.php | 16 + ...e_ColumnProperties_HorizontalAlignment.php | 16 + .../Dialogflow/V2/Intent_Message_Image.php | 16 + .../V2/Intent_Message_LinkOutSuggestion.php | 16 + .../V2/Intent_Message_ListSelect.php | 16 + .../V2/Intent_Message_ListSelect_Item.php | 16 + .../V2/Intent_Message_MediaContent.php | 16 + ...ssage_MediaContent_ResponseMediaObject.php | 16 + ...Message_MediaContent_ResponseMediaType.php | 16 + .../Dialogflow/V2/Intent_Message_Platform.php | 16 + .../V2/Intent_Message_QuickReplies.php | 16 + .../V2/Intent_Message_SelectItemInfo.php | 16 + .../V2/Intent_Message_SimpleResponse.php | 16 + .../V2/Intent_Message_SimpleResponses.php | 16 + .../V2/Intent_Message_Suggestion.php | 16 + .../V2/Intent_Message_Suggestions.php | 16 + .../V2/Intent_Message_TableCard.php | 16 + .../V2/Intent_Message_TableCardCell.php | 16 + .../V2/Intent_Message_TableCardRow.php | 16 + .../Dialogflow/V2/Intent_Message_Text.php | 16 + .../Cloud/Dialogflow/V2/Intent_Parameter.php | 16 + .../Dialogflow/V2/Intent_TrainingPhrase.php | 16 + .../V2/Intent_TrainingPhrase_Part.php | 16 + .../V2/Intent_TrainingPhrase_Type.php | 16 + .../Dialogflow/V2/Intent_WebhookState.php | 16 + .../Cloud/Dialogflow/V2/IntentsGrpcClient.php | 178 +++ .../Cloud/Dialogflow/V2/KnowledgeBase.php | 166 ++ .../V2/KnowledgeBasesGrpcClient.php | 111 ++ .../V2/KnowledgeOperationMetadata.php | 143 ++ .../V2/KnowledgeOperationMetadata/State.php | 71 + .../V2/KnowledgeOperationMetadata_State.php | 16 + .../V2/ListAnswerRecordsRequest.php | 215 +++ .../V2/ListAnswerRecordsResponse.php | 122 ++ .../Dialogflow/V2/ListContextsRequest.php | 160 ++ .../Dialogflow/V2/ListContextsResponse.php | 110 ++ .../V2/ListConversationDatasetsRequest.php | 144 ++ .../V2/ListConversationDatasetsResponse.php | 106 ++ ...istConversationModelEvaluationsRequest.php | 144 ++ ...stConversationModelEvaluationsResponse.php | 106 ++ .../V2/ListConversationModelsRequest.php | 144 ++ .../V2/ListConversationModelsResponse.php | 106 ++ .../V2/ListConversationProfilesRequest.php | 144 ++ .../V2/ListConversationProfilesResponse.php | 110 ++ .../V2/ListConversationsRequest.php | 234 +++ .../V2/ListConversationsResponse.php | 110 ++ .../Dialogflow/V2/ListDocumentsRequest.php | 238 +++ .../Dialogflow/V2/ListDocumentsResponse.php | 106 ++ .../Dialogflow/V2/ListEntityTypesRequest.php | 194 +++ .../Dialogflow/V2/ListEntityTypesResponse.php | 110 ++ .../Dialogflow/V2/ListEnvironmentsRequest.php | 152 ++ .../V2/ListEnvironmentsResponse.php | 110 ++ .../Dialogflow/V2/ListIntentsRequest.php | 256 ++++ .../Dialogflow/V2/ListIntentsResponse.php | 110 ++ .../V2/ListKnowledgeBasesRequest.php | 250 +++ .../V2/ListKnowledgeBasesResponse.php | 106 ++ .../Dialogflow/V2/ListMessagesRequest.php | 206 +++ .../Dialogflow/V2/ListMessagesResponse.php | 114 ++ .../Dialogflow/V2/ListParticipantsRequest.php | 148 ++ .../V2/ListParticipantsResponse.php | 110 ++ .../V2/ListSessionEntityTypesRequest.php | 160 ++ .../V2/ListSessionEntityTypesResponse.php | 110 ++ .../Dialogflow/V2/ListVersionsRequest.php | 152 ++ .../Dialogflow/V2/ListVersionsResponse.php | 110 ++ .../Cloud/Dialogflow/V2/LoggingConfig.php | 79 + .../Google/Cloud/Dialogflow/V2/Message.php | 395 +++++ .../Cloud/Dialogflow/V2/MessageAnnotation.php | 109 ++ .../Dialogflow/V2/NotificationConfig.php | 149 ++ .../V2/NotificationConfig/MessageFormat.php | 64 + .../V2/NotificationConfig_MessageFormat.php | 16 + .../V2/OriginalDetectIntentRequest.php | 202 +++ .../Cloud/Dialogflow/V2/OutputAudio.php | 115 ++ .../Cloud/Dialogflow/V2/OutputAudioConfig.php | 163 ++ .../Dialogflow/V2/OutputAudioEncoding.php | 86 ++ .../Cloud/Dialogflow/V2/Participant.php | 387 +++++ .../Cloud/Dialogflow/V2/Participant/Role.php | 72 + .../Cloud/Dialogflow/V2/Participant_Role.php | 16 + .../Dialogflow/V2/ParticipantsGrpcClient.php | 189 +++ .../Google/Cloud/Dialogflow/V2/QueryInput.php | 148 ++ .../Cloud/Dialogflow/V2/QueryParameters.php | 415 +++++ .../Cloud/Dialogflow/V2/QueryResult.php | 855 +++++++++++ .../Dialogflow/V2/ReloadDocumentRequest.php | 203 +++ .../Dialogflow/V2/RestoreAgentRequest.php | 165 ++ .../Dialogflow/V2/SearchAgentsRequest.php | 144 ++ .../Dialogflow/V2/SearchAgentsResponse.php | 110 ++ .../Google/Cloud/Dialogflow/V2/Sentiment.php | 112 ++ .../V2/SentimentAnalysisRequestConfig.php | 75 + .../Dialogflow/V2/SentimentAnalysisResult.php | 89 ++ .../Cloud/Dialogflow/V2/SessionEntityType.php | 181 +++ .../SessionEntityType/EntityOverrideMode.php | 73 + .../SessionEntityType_EntityOverrideMode.php | 16 + .../V2/SessionEntityTypesGrpcClient.php | 134 ++ .../Dialogflow/V2/SessionsGrpcClient.php | 92 ++ .../Cloud/Dialogflow/V2/SetAgentRequest.php | 122 ++ ...ggestionFeatureConfigOperationMetadata.php | 192 +++ .../V2/SetSuggestionFeatureConfigRequest.php | 158 ++ .../Cloud/Dialogflow/V2/SmartReplyAnswer.php | 155 ++ .../Cloud/Dialogflow/V2/SmartReplyMetrics.php | 143 ++ .../V2/SmartReplyMetrics/TopNMetrics.php | 124 ++ .../V2/SmartReplyMetrics_TopNMetrics.php | 16 + .../Dialogflow/V2/SmartReplyModelMetadata.php | 71 + .../Cloud/Dialogflow/V2/SpeechContext.php | 162 ++ .../Dialogflow/V2/SpeechModelVariant.php | 92 ++ .../Dialogflow/V2/SpeechToTextConfig.php | 158 ++ .../Cloud/Dialogflow/V2/SpeechWordInfo.php | 225 +++ .../Cloud/Dialogflow/V2/SsmlVoiceGender.php | 70 + .../V2/StreamingAnalyzeContentRequest.php | 565 +++++++ .../V2/StreamingAnalyzeContentResponse.php | 452 ++++++ .../V2/StreamingDetectIntentRequest.php | 488 ++++++ .../V2/StreamingDetectIntentResponse.php | 323 ++++ .../V2/StreamingRecognitionResult.php | 363 +++++ .../MessageType.php | 71 + ...StreamingRecognitionResult_MessageType.php | 16 + .../Dialogflow/V2/SuggestArticlesRequest.php | 212 +++ .../Dialogflow/V2/SuggestArticlesResponse.php | 168 +++ .../V2/SuggestConversationSummaryRequest.php | 168 +++ .../V2/SuggestConversationSummaryResponse.php | 170 +++ .../Summary.php | 150 ++ ...estConversationSummaryResponse_Summary.php | 16 + .../V2/SuggestFaqAnswersRequest.php | 208 +++ .../V2/SuggestFaqAnswersResponse.php | 168 +++ .../V2/SuggestSmartRepliesRequest.php | 216 +++ .../V2/SuggestSmartRepliesResponse.php | 176 +++ .../Cloud/Dialogflow/V2/SuggestionFeature.php | 69 + .../Dialogflow/V2/SuggestionFeature/Type.php | 71 + .../Dialogflow/V2/SuggestionFeature_Type.php | 16 + .../Cloud/Dialogflow/V2/SuggestionResult.php | 180 +++ .../Dialogflow/V2/SynthesizeSpeechConfig.php | 269 ++++ .../Cloud/Dialogflow/V2/TelephonyDtmf.php | 160 ++ .../Dialogflow/V2/TelephonyDtmfEvents.php | 67 + .../Google/Cloud/Dialogflow/V2/TextInput.php | 119 ++ .../Dialogflow/V2/TextToSpeechSettings.php | 197 +++ .../Cloud/Dialogflow/V2/TrainAgentRequest.php | 72 + ...ployConversationModelOperationMetadata.php | 121 ++ .../V2/UndeployConversationModelRequest.php | 72 + .../V2/UpdateAnswerRecordRequest.php | 122 ++ .../Dialogflow/V2/UpdateContextRequest.php | 122 ++ .../V2/UpdateConversationProfileRequest.php | 122 ++ .../Dialogflow/V2/UpdateDocumentRequest.php | 130 ++ .../Dialogflow/V2/UpdateEntityTypeRequest.php | 172 +++ .../V2/UpdateEnvironmentRequest.php | 168 +++ .../V2/UpdateFulfillmentRequest.php | 126 ++ .../Dialogflow/V2/UpdateIntentRequest.php | 206 +++ .../V2/UpdateKnowledgeBaseRequest.php | 130 ++ .../V2/UpdateParticipantRequest.php | 122 ++ .../V2/UpdateSessionEntityTypeRequest.php | 122 ++ .../Dialogflow/V2/UpdateVersionRequest.php | 138 ++ .../Cloud/Dialogflow/V2/ValidationError.php | 183 +++ .../V2/ValidationError/Severity.php | 78 + .../V2/ValidationError_Severity.php | 16 + .../Cloud/Dialogflow/V2/ValidationResult.php | 67 + .../Google/Cloud/Dialogflow/V2/Version.php | 254 ++++ .../Dialogflow/V2/Version/VersionStatus.php | 71 + .../Dialogflow/V2/Version_VersionStatus.php | 16 + .../Dialogflow/V2/VersionsGrpcClient.php | 116 ++ .../Dialogflow/V2/VoiceSelectionParams.php | 129 ++ .../Cloud/Dialogflow/V2/WebhookRequest.php | 217 +++ .../Cloud/Dialogflow/V2/WebhookResponse.php | 430 ++++++ .../samples/V2/AgentsClient/delete_agent.php | 65 + .../samples/V2/AgentsClient/export_agent.php | 99 ++ .../v2/samples/V2/AgentsClient/get_agent.php | 67 + .../samples/V2/AgentsClient/get_location.php | 53 + .../V2/AgentsClient/get_validation_result.php | 68 + .../samples/V2/AgentsClient/import_agent.php | 102 ++ .../V2/AgentsClient/list_locations.php | 58 + .../samples/V2/AgentsClient/restore_agent.php | 100 ++ .../samples/V2/AgentsClient/search_agents.php | 78 + .../v2/samples/V2/AgentsClient/set_agent.php | 99 ++ .../samples/V2/AgentsClient/train_agent.php | 89 ++ .../V2/AnswerRecordsClient/get_location.php | 53 + .../list_answer_records.php | 74 + .../V2/AnswerRecordsClient/list_locations.php | 58 + .../update_answer_record.php | 61 + .../V2/ContextsClient/create_context.php | 95 ++ .../V2/ContextsClient/delete_all_contexts.php | 69 + .../V2/ContextsClient/delete_context.php | 69 + .../samples/V2/ContextsClient/get_context.php | 71 + .../V2/ContextsClient/get_location.php | 53 + .../V2/ContextsClient/list_contexts.php | 76 + .../V2/ContextsClient/list_locations.php | 58 + .../V2/ContextsClient/update_context.php | 85 ++ .../create_conversation_dataset.php | 95 ++ .../delete_conversation_dataset.php | 90 ++ .../get_conversation_dataset.php | 72 + .../get_location.php | 53 + .../import_conversation_data.php | 99 ++ .../list_conversation_datasets.php | 73 + .../list_locations.php | 58 + .../create_conversation_model.php | 109 ++ .../create_conversation_model_evaluation.php | 90 ++ .../delete_conversation_model.php | 84 ++ .../deploy_conversation_model.php | 87 ++ .../get_conversation_model.php | 66 + .../get_conversation_model_evaluation.php | 67 + .../ConversationModelsClient/get_location.php | 53 + .../list_conversation_model_evaluations.php | 71 + .../list_conversation_models.php | 71 + .../list_locations.php | 58 + .../undeploy_conversation_model.php | 87 ++ .../clear_suggestion_feature_config.php | 107 ++ .../create_conversation_profile.php | 83 + .../delete_conversation_profile.php | 69 + .../get_conversation_profile.php | 71 + .../get_location.php | 53 + .../list_conversation_profiles.php | 72 + .../list_locations.php | 58 + .../set_suggestion_feature_config.php | 110 ++ .../update_conversation_profile.php | 79 + .../complete_conversation.php | 69 + .../create_conversation.php | 102 ++ .../ConversationsClient/get_conversation.php | 68 + .../V2/ConversationsClient/get_location.php | 53 + .../list_conversations.php | 72 + .../V2/ConversationsClient/list_locations.php | 58 + .../V2/ConversationsClient/list_messages.php | 77 + .../suggest_conversation_summary.php | 70 + .../V2/DocumentsClient/create_document.php | 112 ++ .../V2/DocumentsClient/delete_document.php | 86 ++ .../V2/DocumentsClient/export_document.php | 89 ++ .../V2/DocumentsClient/get_document.php | 68 + .../V2/DocumentsClient/get_location.php | 53 + .../V2/DocumentsClient/import_documents.php | 110 ++ .../V2/DocumentsClient/list_documents.php | 73 + .../V2/DocumentsClient/list_locations.php | 58 + .../V2/DocumentsClient/reload_document.php | 94 ++ .../V2/DocumentsClient/update_document.php | 101 ++ .../batch_create_entities.php | 121 ++ .../batch_delete_entities.php | 96 ++ .../batch_delete_entity_types.php | 97 ++ .../batch_update_entities.php | 124 ++ .../batch_update_entity_types.php | 92 ++ .../EntityTypesClient/create_entity_type.php | 84 ++ .../EntityTypesClient/delete_entity_type.php | 69 + .../V2/EntityTypesClient/get_entity_type.php | 67 + .../V2/EntityTypesClient/get_location.php | 53 + .../EntityTypesClient/list_entity_types.php | 72 + .../V2/EntityTypesClient/list_locations.php | 58 + .../EntityTypesClient/update_entity_type.php | 77 + .../EnvironmentsClient/create_environment.php | 75 + .../EnvironmentsClient/delete_environment.php | 71 + .../V2/EnvironmentsClient/get_environment.php | 73 + .../get_environment_history.php | 78 + .../V2/EnvironmentsClient/get_location.php | 53 + .../EnvironmentsClient/list_environments.php | 75 + .../V2/EnvironmentsClient/list_locations.php | 58 + .../EnvironmentsClient/update_environment.php | 69 + .../V2/FulfillmentsClient/get_fulfillment.php | 67 + .../V2/FulfillmentsClient/get_location.php | 53 + .../V2/FulfillmentsClient/list_locations.php | 58 + .../FulfillmentsClient/update_fulfillment.php | 77 + .../V2/IntentsClient/batch_delete_intents.php | 97 ++ .../V2/IntentsClient/batch_update_intents.php | 92 ++ .../V2/IntentsClient/create_intent.php | 77 + .../V2/IntentsClient/delete_intent.php | 70 + .../samples/V2/IntentsClient/get_intent.php | 67 + .../samples/V2/IntentsClient/get_location.php | 53 + .../samples/V2/IntentsClient/list_intents.php | 80 + .../V2/IntentsClient/list_locations.php | 58 + .../V2/IntentsClient/update_intent.php | 73 + .../create_knowledge_base.php | 76 + .../delete_knowledge_base.php | 66 + .../get_knowledge_base.php | 68 + .../V2/KnowledgeBasesClient/get_location.php | 53 + .../list_knowledge_bases.php | 72 + .../KnowledgeBasesClient/list_locations.php | 58 + .../update_knowledge_base.php | 70 + .../V2/ParticipantsClient/analyze_content.php | 77 + .../ParticipantsClient/create_participant.php | 71 + .../V2/ParticipantsClient/get_location.php | 53 + .../V2/ParticipantsClient/get_participant.php | 72 + .../V2/ParticipantsClient/list_locations.php | 58 + .../ParticipantsClient/list_participants.php | 73 + .../streaming_analyze_content.php | 97 ++ .../ParticipantsClient/suggest_articles.php | 73 + .../suggest_faq_answers.php | 73 + .../suggest_smart_replies.php | 73 + .../ParticipantsClient/update_participant.php | 58 + .../create_session_entity_type.php | 140 ++ .../delete_session_entity_type.php | 78 + .../SessionEntityTypesClient/get_location.php | 53 + .../get_session_entity_type.php | 80 + .../list_locations.php | 58 + .../list_session_entity_types.php | 80 + .../update_session_entity_type.php | 124 ++ .../V2/SessionsClient/detect_intent.php | 100 ++ .../V2/SessionsClient/get_location.php | 53 + .../V2/SessionsClient/list_locations.php | 58 + .../streaming_detect_intent.php | 109 ++ .../V2/VersionsClient/create_version.php | 75 + .../V2/VersionsClient/delete_version.php | 69 + .../V2/VersionsClient/get_location.php | 53 + .../samples/V2/VersionsClient/get_version.php | 71 + .../V2/VersionsClient/list_locations.php | 58 + .../V2/VersionsClient/list_versions.php | 75 + .../V2/VersionsClient/update_version.php | 62 + .../Dialogflow/v2/src/V2/AgentsClient.php | 34 + .../v2/src/V2/AnswerRecordsClient.php | 34 + .../Dialogflow/v2/src/V2/ContextsClient.php | 34 + .../v2/src/V2/ConversationDatasetsClient.php | 34 + .../v2/src/V2/ConversationModelsClient.php | 34 + .../v2/src/V2/ConversationProfilesClient.php | 34 + .../v2/src/V2/ConversationsClient.php | 34 + .../Dialogflow/v2/src/V2/DocumentsClient.php | 34 + .../v2/src/V2/EntityTypesClient.php | 34 + .../v2/src/V2/EnvironmentsClient.php | 34 + .../v2/src/V2/FulfillmentsClient.php | 34 + .../v2/src/V2/Gapic/AgentsGapicClient.php | 1158 ++++++++++++++ .../src/V2/Gapic/AnswerRecordsGapicClient.php | 626 ++++++++ .../v2/src/V2/Gapic/ContextsGapicClient.php | 974 ++++++++++++ .../Gapic/ConversationDatasetsGapicClient.php | 813 ++++++++++ .../Gapic/ConversationModelsGapicClient.php | 1193 +++++++++++++++ .../Gapic/ConversationProfilesGapicClient.php | 1015 +++++++++++++ .../src/V2/Gapic/ConversationsGapicClient.php | 1086 +++++++++++++ .../v2/src/V2/Gapic/DocumentsGapicClient.php | 1266 ++++++++++++++++ .../src/V2/Gapic/EntityTypesGapicClient.php | 1343 +++++++++++++++++ .../src/V2/Gapic/EnvironmentsGapicClient.php | 965 ++++++++++++ .../src/V2/Gapic/FulfillmentsGapicClient.php | 507 +++++++ .../v2/src/V2/Gapic/IntentsGapicClient.php | 1104 ++++++++++++++ .../V2/Gapic/KnowledgeBasesGapicClient.php | 772 ++++++++++ .../src/V2/Gapic/ParticipantsGapicClient.php | 1217 +++++++++++++++ .../Gapic/SessionEntityTypesGapicClient.php | 955 ++++++++++++ .../v2/src/V2/Gapic/SessionsGapicClient.php | 698 +++++++++ .../v2/src/V2/Gapic/VersionsGapicClient.php | 779 ++++++++++ .../Dialogflow/v2/src/V2/IntentsClient.php | 34 + .../v2/src/V2/KnowledgeBasesClient.php | 34 + .../v2/src/V2/ParticipantsClient.php | 34 + .../v2/src/V2/SessionEntityTypesClient.php | 34 + .../Dialogflow/v2/src/V2/SessionsClient.php | 34 + .../Dialogflow/v2/src/V2/VersionsClient.php | 34 + .../Dialogflow/v2/src/V2/gapic_metadata.json | 847 +++++++++++ .../V2/resources/agents_client_config.json | 89 ++ .../V2/resources/agents_descriptor_config.php | 68 + .../resources/agents_rest_client_config.php | 250 +++ .../answer_records_client_config.json | 54 + .../answer_records_descriptor_config.php | 28 + .../answer_records_rest_client_config.php | 129 ++ .../V2/resources/contexts_client_config.json | 74 + .../resources/contexts_descriptor_config.php | 28 + .../resources/contexts_rest_client_config.php | 245 +++ .../conversation_datasets_client_config.json | 69 + ...onversation_datasets_descriptor_config.php | 58 + ...nversation_datasets_rest_client_config.php | 162 ++ .../conversation_models_client_config.json | 89 ++ .../conversation_models_descriptor_config.php | 88 ++ ...conversation_models_rest_client_config.php | 240 +++ .../conversation_profiles_client_config.json | 79 + ...onversation_profiles_descriptor_config.php | 48 + ...nversation_profiles_rest_client_config.php | 220 +++ .../conversations_client_config.json | 74 + .../conversations_descriptor_config.php | 38 + .../conversations_rest_client_config.php | 194 +++ .../V2/resources/documents_client_config.json | 84 ++ .../resources/documents_descriptor_config.php | 88 ++ .../documents_rest_client_config.php | 260 ++++ .../resources/entity_types_client_config.json | 94 ++ .../entity_types_descriptor_config.php | 78 + .../entity_types_rest_client_config.php | 271 ++++ .../resources/environments_client_config.json | 74 + .../environments_descriptor_config.php | 38 + .../environments_rest_client_config.php | 205 +++ .../resources/fulfillments_client_config.json | 54 + .../fulfillments_descriptor_config.php | 18 + .../fulfillments_rest_client_config.php | 129 ++ .../V2/resources/intents_client_config.json | 79 + .../resources/intents_descriptor_config.php | 48 + .../resources/intents_rest_client_config.php | 222 +++ .../knowledge_bases_client_config.json | 69 + .../knowledge_bases_descriptor_config.php | 28 + .../knowledge_bases_rest_client_config.php | 198 +++ .../resources/participants_client_config.json | 109 ++ .../participants_descriptor_config.php | 33 + .../participants_rest_client_config.php | 241 +++ .../session_entity_types_client_config.json | 69 + ...session_entity_types_descriptor_config.php | 28 + ...ession_entity_types_rest_client_config.php | 220 +++ .../V2/resources/sessions_client_config.json | 74 + .../resources/sessions_descriptor_config.php | 23 + .../resources/sessions_rest_client_config.php | 115 ++ .../V2/resources/versions_client_config.json | 69 + .../resources/versions_descriptor_config.php | 28 + .../resources/versions_rest_client_config.php | 182 +++ .../v2/tests/Unit/V2/AgentsClientTest.php | 1012 +++++++++++++ .../tests/Unit/V2/AnswerRecordsClientTest.php | 322 ++++ .../v2/tests/Unit/V2/ContextsClientTest.php | 565 +++++++ .../V2/ConversationDatasetsClientTest.php | 700 +++++++++ .../Unit/V2/ConversationModelsClientTest.php | 1064 +++++++++++++ .../V2/ConversationProfilesClientTest.php | 808 ++++++++++ .../tests/Unit/V2/ConversationsClientTest.php | 579 +++++++ .../v2/tests/Unit/V2/DocumentsClientTest.php | 1109 ++++++++++++++ .../tests/Unit/V2/EntityTypesClientTest.php | 1129 ++++++++++++++ .../tests/Unit/V2/EnvironmentsClientTest.php | 587 +++++++ .../tests/Unit/V2/FulfillmentsClientTest.php | 320 ++++ .../v2/tests/Unit/V2/IntentsClientTest.php | 805 ++++++++++ .../Unit/V2/KnowledgeBasesClientTest.php | 514 +++++++ .../tests/Unit/V2/ParticipantsClientTest.php | 806 ++++++++++ .../Unit/V2/SessionEntityTypesClientTest.php | 519 +++++++ .../v2/tests/Unit/V2/SessionsClientTest.php | 365 +++++ .../v2/tests/Unit/V2/VersionsClientTest.php | 511 +++++++ 690 files changed, 99483 insertions(+) create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Agent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/AnswerRecord.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/AudioConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Context.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Conversation.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationDataset.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationEvent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationModel.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationProfile.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Document.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/EntityType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Environment.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Fulfillment.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Gcs.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Intent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/KnowledgeBase.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Participant.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Session.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/SessionEntityType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ValidationResult.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Version.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Webhook.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/ApiVersion.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/MatchMode.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/Tier.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/AnswerRelevance.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentCorrectness.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentEfficiency.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/SummarizationFeedback.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_AnswerRelevance.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_DocumentCorrectness.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_DocumentEfficiency.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_SummarizationFeedback.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantRecord.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_ApiVersion.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_MatchMode.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_Tier.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnnotatedMessagePart.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback/CorrectnessLevel.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback_CorrectnessLevel.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecord.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecordsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleAnswer.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleSuggestionModelMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AssistQueryParameters.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AudioEncoding.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply/AutomatedAgentReplyType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply_AutomatedAgentReplyType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchCreateEntitiesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntitiesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntityTypesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteIntentsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntitiesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CompleteConversationRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Context.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ContextsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/ConversationStage.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/LifecycleState.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDataset.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDatasetsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent/Type.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent_Type.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationInfo.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/ModelType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelEvaluation.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_ModelType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationPhoneNumber.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfile.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfilesGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_ConversationStage.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_LifecycleState.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateContextRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata/State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata_State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata/State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata_State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationProfileRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateDocumentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEntityTypeRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEnvironmentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateIntentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateKnowledgeBaseRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateParticipantRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateSessionEntityTypeRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateVersionRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAgentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAllContextsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteContextRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationProfileRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteDocumentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEntityTypeRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEnvironmentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteIntentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteKnowledgeBaseRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteSessionEntityTypeRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteVersionRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/KnowledgeType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/ReloadStatus.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_KnowledgeType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_ReloadStatus.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DocumentsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DtmfParameters.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/AutoExpansionMode.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Entity.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Kind.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypeBatch.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_AutoExpansionMode.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_Entity.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_Kind.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypesGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment/State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory/Entry.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory_Entry.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment_State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartComposeConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartReplyConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartComposeConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartReplyConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EventInput.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportDocumentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FaqAnswer.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature/Type.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/GenericWebService.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature_Type.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_GenericWebService.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FulfillmentsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsDestination.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsSources.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetAgentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetContextRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationDatasetRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelEvaluationRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationProfileRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetDocumentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEntityTypeRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentHistoryRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetFulfillmentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetIntentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetKnowledgeBaseRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetParticipantRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetSessionEntityTypeRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetValidationResultRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetVersionRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationModelConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationProcessConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionFeatureConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/ContextFilterSettings.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DocumentQuerySource.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/KnowledgeBaseQuerySource.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionTriggerSettings.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationModelConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationProcessConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_MessageAnalysisConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionFeatureConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionTriggerSettings.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/LivePersonConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/SalesforceLiveAgentConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_LivePersonConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_SalesforceLiveAgentConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportAgentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentTemplate.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputAudioConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputDataset.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputTextConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/FollowupIntentInfo.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button/OpenUriAction.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction/UrlTypeHint.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/ImageDisplayOptions.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card/Button.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect/Item.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties/HorizontalAlignment.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Image.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/LinkOutSuggestion.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect/Item.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaObject.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Platform.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/QuickReplies.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SelectItemInfo.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponses.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestion.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestions.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCard.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardCell.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardRow.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Text.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Parameter.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Part.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Type.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/WebhookState.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentBatch.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentView.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_FollowupIntentInfo.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BasicCard.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BasicCard_Button.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BasicCard_Button_OpenUriAction.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction_UrlTypeHint.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard_ImageDisplayOptions.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Card.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Card_Button.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_CarouselSelect.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_CarouselSelect_Item.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_ColumnProperties.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_ColumnProperties_HorizontalAlignment.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Image.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_LinkOutSuggestion.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_ListSelect.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_ListSelect_Item.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_MediaContent.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_MediaContent_ResponseMediaObject.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_MediaContent_ResponseMediaType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Platform.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_QuickReplies.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_SelectItemInfo.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_SimpleResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_SimpleResponses.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Suggestion.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Suggestions.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_TableCard.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_TableCardCell.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_TableCardRow.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Text.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Parameter.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_TrainingPhrase.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_TrainingPhrase_Part.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_TrainingPhrase_Type.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_WebhookState.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBase.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBasesGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata/State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata_State.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/LoggingConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Message.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/MessageAnnotation.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig/MessageFormat.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig_MessageFormat.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OriginalDetectIntentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudio.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioEncoding.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant/Role.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant_Role.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ParticipantsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryInput.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryParameters.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryResult.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ReloadDocumentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/RestoreAgentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Sentiment.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisRequestConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisResult.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType/EntityOverrideMode.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType_EntityOverrideMode.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityTypesGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetAgentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyAnswer.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics/TopNMetrics.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics_TopNMetrics.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyModelMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechContext.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechModelVariant.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechToTextConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechWordInfo.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SsmlVoiceGender.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult/MessageType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult_MessageType.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse/Summary.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse_Summary.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature/Type.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature_Type.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionResult.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SynthesizeSpeechConfig.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmf.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmfEvents.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextInput.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextToSpeechSettings.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TrainAgentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelOperationMetadata.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateAnswerRecordRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateContextRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateConversationProfileRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateDocumentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEntityTypeRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEnvironmentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateFulfillmentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateIntentRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateKnowledgeBaseRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateParticipantRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateSessionEntityTypeRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateVersionRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError/Severity.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError_Severity.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationResult.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version/VersionStatus.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version_VersionStatus.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VersionsGrpcClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VoiceSelectionParams.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookRequest.php create mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookResponse.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/delete_agent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/export_agent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_agent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_validation_result.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/import_agent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/restore_agent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/search_agents.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/set_agent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/train_agent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_answer_records.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/update_answer_record.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/create_context.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_all_contexts.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_context.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_context.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_contexts.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/update_context.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_conversation_dataset.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/import_conversation_data.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_conversation_datasets.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model_evaluation.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/delete_conversation_model.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/deploy_conversation_model.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model_evaluation.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_model_evaluations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_models.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/undeploy_conversation_model.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/create_conversation_profile.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/delete_conversation_profile.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_conversation_profile.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_conversation_profiles.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/update_conversation_profile.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/complete_conversation.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/create_conversation.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_conversation.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_conversations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_messages.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/suggest_conversation_summary.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/create_document.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/delete_document.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/export_document.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_document.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/import_documents.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_documents.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/reload_document.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/update_document.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_create_entities.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entities.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entity_types.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entities.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entity_types.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/create_entity_type.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/delete_entity_type.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_entity_type.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_entity_types.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/update_entity_type.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/create_environment.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/delete_environment.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment_history.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_environments.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/update_environment.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_fulfillment.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/update_fulfillment.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_delete_intents.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_update_intents.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/create_intent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/delete_intent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_intent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_intents.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/update_intent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/create_knowledge_base.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/delete_knowledge_base.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_knowledge_base.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_knowledge_bases.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/update_knowledge_base.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/analyze_content.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/create_participant.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_participant.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_participants.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/streaming_analyze_content.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_articles.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_faq_answers.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_smart_replies.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/update_participant.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/create_session_entity_type.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/delete_session_entity_type.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_session_entity_type.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_session_entity_types.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/update_session_entity_type.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/detect_intent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/streaming_detect_intent.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/create_version.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/delete_version.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_location.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_version.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_locations.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_versions.php create mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/update_version.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/AgentsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/AnswerRecordsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ContextsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ConversationDatasetsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ConversationModelsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ConversationProfilesClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ConversationsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/DocumentsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/EntityTypesClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/EnvironmentsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/FulfillmentsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AgentsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AnswerRecordsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ContextsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationDatasetsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationModelsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationProfilesGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/DocumentsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EntityTypesGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EnvironmentsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/FulfillmentsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/IntentsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/KnowledgeBasesGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ParticipantsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionEntityTypesGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/VersionsGapicClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/IntentsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/KnowledgeBasesClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ParticipantsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/SessionEntityTypesClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/SessionsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/VersionsClient.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_client_config.json create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_descriptor_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_rest_client_config.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AgentsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AnswerRecordsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ContextsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationDatasetsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationModelsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationProfilesClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/DocumentsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EntityTypesClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EnvironmentsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/FulfillmentsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/IntentsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/KnowledgeBasesClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ParticipantsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionEntityTypesClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionsClientTest.php create mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/VersionsClientTest.php diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Agent.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Agent.php new file mode 100644 index 0000000000000000000000000000000000000000..3f823d547bb2f2f155379f406c07c2d243b8b16e GIT binary patch literal 5807 zcmb_gNpssq7B(nLv7c;9Zh4{UEHG@x@**&1mYL9Tra+OBn9{i39`? z0F<}#9HwS|K`u!ysY=aUa-7Rl%}>ZFmAR$nkV8&$n^RIr4td>J2+j9OT^lZo%haTf=Fyhecqn>ZD%y_aSxw6j8~t{hI%3o6*}6d;Srm&K;`&BS zEEUVOOQ`BveWywDV#l&N2F*4NtKZ7Dbj`3jZNs{s-N|LO4mCZQn*=bm9(8T4NyX(# zVU2oPOY^k)GS{vzGVOXX(ynji?f^6m&2>eES%JqO;y=6JF!ZMAdYXs-UC~`tH+2uy z^hX%OU9qhhE=A3!W!rtT>FJg!GKCGZN$0PNzD*{3#kMf!yJF~1g{1*gP%oPvbxh5u z7pdEHblbC>3X10Q9qL8NV_)X42ir1pdRv_Leaz>da`LX|Iei-6T@)Sa^&RsL_nR4b z68)+tWJ|I2x?-9Z%YtRP`TQWJfr-5o7Y!Zrc`%(Nof@qI?P@!^RVW0#0y4?_WH&F++VfKj?*_y-R#siYzFp&r7S`M)}hq1y@%t6AF1;6t!eH@$+{eT z3vcTI)Ra~$Le>)Y-h6}whKy_Q_p9*ocuhw#zMRaPQyw&@ypzkE4{T_*j?K$3;dg50 zrPxB76<%!wl@A0i!~~q6yunf~SW04pov4N?YGDxroy&oaF{o75iYgTdT?~XcnP6jP zDXT@W7;;dw=)2v+jQbMOKc0h0&Ld zIkLYirpT3%3A0$y4{6gQ7vMxocWpy^s4`khr?{yJG({vh+oEj^!&42-?DWx$+O%3U zJu#5E3Td}*+m?gGyIaal9~CFiD>NmLb8y_#dsKa7nKV5)P*1~jD_|qUa(XIU5y*J} zZ3k)9QTvXber~XE5l&H4YZz2TdhTE^q>tg^F@K*WfS%?xyK0a5c^nr`bT7PQ+&T$`|pRW zx8>{jcHV@eo=%I39UVGH`B9sV%OkYa7Lq`tJH>rLFk35^szV!`hLim3W=&ZyDplt89L(@f zrS)2=TB(*dOSr-FaAxSET3LN}b9N$=Iws_M|5HAMmtxE@)DeDDrLpr^W4PJJ!LKL& z@FxoiD~9F61Es^Cfw=Sz%q&xn8?Dlh`_%QwABGyXevNnRC9>f-5%2Q}$;76IVjJ?kTC`ox7`JF|Op*T$m_X=4iTkNco~bN)H&z9*#YhE*>f;*8%0D+jG122{JPm7w5xf z#yb5(3W%Q+A?-btx`KJKWF-|3N$iWFGTsbBf26ir#k2ss3 z>BBnQ*sl&Zo}~`|72rgiJ4rV5BFXExWa#!Q<16^&Bk8<6+vG|zZUSKCT|Q5?bL5p| zxulZ#Is=&fDgX>{8qtI3@kb~s+Z*a&CAzaiaDmQ8Anf!;Gj|9?C?B+P8` z#wcJVD1^Bfc{?0F8A$$UGKriVZIGGl;5`DlF73cILO zgzdNez77bDJ#2KW_|q*qhR2b?4tC>C{Ewdm;mcI2xb#&jv&^4w^A;MR%Qc({t~YWch(fXg0BQ@A=NT=X~dJ z_0b(`+ky+y3NeVSxTGP~pGfXDku2MEP1V$;dZ*bWwxpVEOVf#+kfhu_sdR5c%IAt3 z=TX!#JGM&FQp+@3I!UU!*=ZyjnxdPnrf%*fcT-8laQ28@vx#cjjRb=RFqAfNEJY>K zN;z|vxJpBDmFfyZsb(okH5Z^%w^GXhs;)SWBr~)M1A}KE;h)v1>zXP#uHxdqi<(o@ z49!Jp?I|AVmef>qhakY<-e$*8UClHkDsazG$>J4>W754BEfZaEOY+SsQ?H;$szt*k zwxQ_N9C1`zvs}|II@dLu)&m0iuW4<}k79&Zk8 zs~ZPzw_grevSY?1xwmvcFr0fgwszhPOR*$5=6aJ9D72y3)bhr~SFirwXYO?2i*U=T95!H2)&%9szUg_kp z_})7)H*a6e50TJKmFIu*ng8<*Fqz{p!4c!n1(;t$AB634D&$cI$u8c82@EtImq#Fz zKh8`cM{u9Kr0PMYM?hu28 zBFYxxyRb0CM#sXMN5qd|y2nWl8asxpSR5I|P)k9*GX{C=)1z6a$uuYM$ zdwlQY;6#sN=A=XD7tb}`l{g!n0(>ra*jHg8R@^`&8Iq?Vqn@r_1%=Ec2{@Vo1$wU1lDsVF38b(&Zxy6fZ=I~zkLS7*r63;#j zPB%=o)24MXL?p(@=~Uq@)Z{$4kY~B77Mu!Hk!BMcIx*BIEdJA}{QuCD55TyhHq1Gl zc3ZKvr>sPFDa#A}>Raeq4+Hu{X6j;J2ykZTG9@+k8QbN2r2T9%HHy?pm~=Yzw&n@& zJ~v9>G)(c6KB>7_%a|{t@lRmJuUuZNMG4-KOY8UZm0Bf_l$J}`d>^T&0g6a_wzz?u zo`U1SQzU*LP7R5xcoFcLklnnSF9qqqvZgm*PC&F+>SoI%9P=L{@dqIKz}+y47vNlg zn=cfK*?5h8FgAM?0Gmx*LbFR zrRT~>iqL6P_qqe+01g4zkf5nN@=5&n1TiTaj`*hl zvjfdgyg3SgV7u4BVjmt-ig(=j&gZ}W{$-?E6)(}d-ZMTT+zKX>t9{eQ!yDoU!#5`V zdBsWg3%!)R(L?+(0^(p37Dw7XxZgkWfv1A_&jLHFrvz|x9zthsWG<4*?vF+-9 zx_35sSWewJ07}RoZ$f-2FZ5Wn6q+JpkAIODUOR)nkRNQjuH~eY$-TWjj{?Dfs&w3K zey6{NJ=JZRc6;ef+qKEdXx8<&II*b={khpz0ey{@yJ L{93&a`vCs|Jr2>( literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/AudioConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/AudioConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..2f8a26e8eacf53a19ef221afa86d54788f95aa06 GIT binary patch literal 3565 zcmb7HPjlNu6h}_eHZQR&)IYc>w5lmX8mJA1=^>>pvZXj4Y|CTI33M`}k)^dQkhMaR z1ErIXz=i3J8%M5u6Aqj?GkgGMxbSvmD~aP8$R*m{_xJaH?|Ju=r@<(Ix8)k~Nod8y zk^9f(ctqqNq%pOrC-*0V0SRTBjsw>tVNsSA?9dHj8n#h%XJ<&_ z6iK$Tb${xXnR5s7RubdR&bc5T%W*g%r@hN^Na9K8KjLvS1IOvt;R4K*z&+e`iRVq=Cs+OE-8p(N~1levth&@8C z#pK&qx&oJiQD{XZ$_w(!)|!-s)jp+BoX^O@R;KWS0J%itfQC-pA5dunE_{RE`4tpc zlS;6G^$%l{4h9j4(TcFOUcOnJ#y<C@SYJ2Q{u6%zM$^s~h+<-P!kZ!{3ku?rHVzRMejz}1P$8lJd zu0z(d{NcnJ66|@0Ota5}NPMf08VnL_(E-h8F~-YM9yStS%@MLB!pITbN+vHz6}S@d z8nEHPiV)@3@o;^4q-V>9RT^UyUj7m~Taz@%@}+rXg|6ktdBE*lxwtI##9)(I*-x}E zW-&tGFq=t?!@y#QU*_3tL&0$)o~TdFY4{Ck8M$RtMuz2=x~VF1_mscVxi@dzJ8 zZ7a0K5#tS;kGw2v(xV@UDA zam=cPFy;d{zcCRa5lDR-`*{Yq3nixYg~K8OWaLJPAo}Xbr8sr?2f)vay^f|KpR=&W*SmU;(Kub!_cf&MOt)MA9JxBv z?P~j4OT3h>wR&yO5HF|7Eo?E7T~-p)&$Ny%0$vp^a!-o5o_<%vjr6-JX47v~%%$qc z&5n2_b=KBOKW8>;{NYgK4~OE(!=boe{zK`(Eo&0fu{RA5twu$Rw!~XkdWgSV zU$URD(u?WWamk}LztZB~?DM$9XDIIQ|HpqQeYlfM*Lk~beogF>SbF+jZ6_BXRAEtY mbrY|M$Nh_FAf_L^o8FS&PaX=V-W9KWQ*g=T=6?*w0RI57{6850 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Context.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Context.php new file mode 100644 index 000000000000..12791ba0816e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Context.php @@ -0,0 +1,70 @@ +internalAddGeneratedFile( + ' +" +(google/cloud/dialogflow/v2/context.protogoogle.cloud.dialogflow.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/struct.proto" +Context +name ( BàA +lifespan_count (BàA0 + +parameters ( 2.google.protobuf.StructBàA:¡êA +!dialogflow.googleapis.com/Context>projects/{project}/agent/sessions/{session}/contexts/{context}fprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}Sprojects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}{projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}" +ListContextsRequest9 +parent ( B)àAúA#!dialogflow.googleapis.com/Context + page_size (BàA + +page_token ( BàA"f +ListContextsResponse5 +contexts ( 2#.google.cloud.dialogflow.v2.Context +next_page_token ( "L +GetContextRequest7 +name ( B)àAúA# +!dialogflow.googleapis.com/Context"Œ +CreateContextRequest9 +parent ( B)àAúA#!dialogflow.googleapis.com/Context9 +context ( 2#.google.cloud.dialogflow.v2.ContextBàA"‡ +UpdateContextRequest9 +context ( 2#.google.cloud.dialogflow.v2.ContextBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"O +DeleteContextRequest7 +name ( B)àAúA# +!dialogflow.googleapis.com/Context"U +DeleteAllContextsRequest9 +parent ( B)àAúA#!dialogflow.googleapis.com/Context2è +Contextsœ + ListContexts/.google.cloud.dialogflow.v2.ListContextsRequest0.google.cloud.dialogflow.v2.ListContextsResponse"¨‚Ó䓘1/v2/{parent=projects/*/agent/sessions/*}/contextsZJH/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZ?=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contextsZVT/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contextsÚAparent‰ + +GetContext-.google.cloud.dialogflow.v2.GetContextRequest#.google.cloud.dialogflow.v2.Context"¦‚Ó䓘1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJH/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}Z?=/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}ZVT/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}ÚAname½ + CreateContext0.google.cloud.dialogflow.v2.CreateContextRequest#.google.cloud.dialogflow.v2.Context"Ô‚Ó䓼"1/v2/{parent=projects/*/agent/sessions/*}/contexts:contextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:contextZH"=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts:contextZ_"T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts:contextÚAparent,contextâ + UpdateContext0.google.cloud.dialogflow.v2.UpdateContextRequest#.google.cloud.dialogflow.v2.Context"ù‚Óä“Ü29/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:contextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:contextZP2E/v2/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}:contextZg2\\/v2/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}:contextÚAcontext,update_mask‚ + DeleteContext0.google.cloud.dialogflow.v2.DeleteContextRequest.google.protobuf.Empty"¦‚Ó䓘*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}Z?*=/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}ZV*T/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}ÚAnameŒ +DeleteAllContexts4.google.cloud.dialogflow.v2.DeleteAllContextsRequest.google.protobuf.Empty"¨‚Ó䓘*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZ?*=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contextsZV*T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contextsÚAparentxÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB• +com.google.cloud.dialogflow.v2B ContextProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Conversation.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Conversation.php new file mode 100644 index 0000000000000000000000000000000000000000..9bfeeba7ecdd62f7051d479d255f9c9d5e485fd4 GIT binary patch literal 5535 zcmb_g-EZ4e6vye>t*2k>?X5Ac8lZ~PIkXC488)Tcf0gv1+2Xc7|l`Xjyh@={ozQv05--}#+$e9xV` z)|LfR{3156t+=?tZ|w2z7UnJ6bWPRN`Hfn&ifvvsw=GS_w#f78Wj?oDvq(LrJaPNn#K;c9mUm5L-aHQ7|J$wEJelqVt)P} zc9n|aDy2nFNhw8@l+tx2rM1Lu0998Uhfgue;1TfT&#GDHCX<`ktwTwlOkWPnQgvFDpZ0xBCR?1G`h9g8llh zQX9}@ODoBSVNw)K!$~F&V>(pPNid~r*l>>~v!G$UGLN^E9nG|lCc1(H+H~z?8%mV& zicJ!(S;|p7uP3pn5eB--w$?@TrBcuA0;z=QdM;>YF2R!vaP3GXfa3mf z(W@BouwulWM0`9@rC1uND4H6-ZsO;d7gdUXc_TbOj~k0)Z}?Qr4^ z(RZd@^dhTOTngn2RNPlvfKzNwDH9*7BqtL+p5zBK};Ba&7ou@(p+ zs4&XGptWThxNOw6H?Tc%j3^sO%yjE$p33GtQQyfK01~n7mML%(y`Hvss4YZQth3M; zx&bG!QSn9kx)WIg)BpxCx``)_6XD@RGPKu*WQ{Phh!CVVvG5KIH)4;@!I`D(LMC-T zwUj9rigGbiUd{^*ZYeoDE z_O@d0g?UdmRiZy3kC=bb4~BKpDjc^Q1Rikz;&XWly2!^V&kL7w)+;GG;Ch8$dq9Ya zAb|T_IPUmCdEICru@Hs!ixr9iL~Ww-s%ZYdMn#j;8-E;wv>Xq?h{UjslwVfD0}q%|33Z3e`V2Zc76)?h9f1xw7-95VAlEJM=y4u>(LM3pTBJXY+B9&&9hDubHR*rXeUxP+FljXj;<4qD$qWCJ7DbBJR&7FrLwUF;#l*>p_{dlEv;6?A814c%-m zuf0rFeJAh?te~Fb^eikJmJ@X3j;UKtuWLEm@>WeY9D56UzD`WXZg+H|`t!qo6F|EOjY0bo#cCWSofMMyrj~XeXO>PtH0!07ZVBIneW6FHks^Y*P(zcqS(6@!-(Re zE!zZpwr*)n>>Hlx631&%QAO!tk|4`|nZFWk%gmWwG|zohlp!Y<5%B_?-W?$ilfbhV zLcf`Te)6SdV5hpKrrNf{P;hKtQ3f#$OynsxEEC&gGM!r{wmNmZp>LUvH<{`xj;d&E zCo?KTTQVky^0s65yuh|iyQi(VtoSEGDM|jCNeh_ho9_4_ueyeIm*yqN@i#2At2fN3 ztkg~?siIqyg!4(>SryEIUuVI!Ct@Egb2TX>tu!F5v{fr#h)n9PNlDGhfm60Tn_B3y zoVVAbq(=fXDFH9aY_xPaTFUAYJ;RTrE=5w-AV;#330xlKf6#>2mrVS6%rru`Al#bDr=~_8X!vugmrMz zWWiDtShS_%p_(=q>t&RRltPCaxeZQJ^+C@!Da56z&{B1jp)?#UE!^5HfCsD@PGFPL zv(#KM6i^-sf2bb|;A*OXc{*tA`Vt*oa@uf=^IZzT18fjq-i^NcvgH`O5y-poXaB(X zij=9&0hc;_0QJRB1b`YL>KR+E;`amEE8rP05ApD&;@8L8F!hGcW=DTzJ9v#!Y;J}!O;D!EPSf52Rvwdr<_Pi<=^IYPi=s6(J4GR+}_-D$qt;L*}y*w;C%Kl z8qJPuoiRap%t81{5F3-QLE)|aaBozE%KbHQCDYOvJju7Zr>-77s*_M<)T!`=V~r=`h&OU0+E5^OqoeQz$fVeOD+ig%4g*gFSdj q&E&yLx>sAD3ak0mx#ZSgHg literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationEvent.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..706dd9507cb4608df505c984a43f23f8f49b1be5 GIT binary patch literal 1358 zcmbVMO>fgc6s*$})NKX9Ei|nJTG~oYC2*wlmeN8#HmN1zM7A3QvSe+XO=`*YTI+SH zf_mUzATCH8`Gp)=+xbEX2$56l-I+IUJny}F9b5(A05*wF80Mr8d$*8Z5g0JasY5;3 ziv|P2phK?%*CR}Uu-=AR+k~jDn$HC^q!DvS84f8OdZg%hH0l@oF81hf;L)4ns8n>Q zKO!u|+@-!vM#Sez!ViFtuSpnShrnj1+9DkHF~?Rjp|WZ*l~tcoS>4hp0FH;l5Z2}> zQOpQF0VsY!)bm^ihFlbL;GrAZuJ3X|;eHg&oxuV2LLyie?+zm0i3P$K(DoftIEE=_ zeD^S*!i+OG(bkFm5#Cs;&k6IfXVppQFgM_ob;Q+jc}V!w)%Z=}cw9E7a|f`HYAlx* zM4my;A~IhcLPmJR{L@5tOmH{-XZ@RVRtGa-i5p;_m&>yrXOzo`^uVzU;bjyq$0WAA zJa@+?RQmmC&kYfm!c=9f`3QVj11JBH6L~KMDM`4LS-6x@X>Vst$O5MrTN;IFxb{D< zf=3H6k+;F-d>r!rvd#XA{7|1hAx4rIkW1R`$P2Ae)rk208P62icdJ z(Lpt}p`vr&HEtu5+Qs&A2vbiJ+Tvek8Pf812{ zn*^ST)$y06s!tXSO=hbjeK=1&n0yO*T^!Q+&4L40ESFgtg5K%;!%s>2p2^f3KQepG tWT7a@LQ!T5Md_A$_mWL?ax_iqi*)+thBf}8uCruNlbh)P-GMs*egUn#v^f9( literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationModel.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationModel.php new file mode 100644 index 0000000000000000000000000000000000000000..4136092dc73e22d0cd8e2672e7ce3acbd50ee84d GIT binary patch literal 9095 zcmcgyO>7%k9p7=jnwPelzHXD$Rl{_)t7b!MgG<@P-E1}fNbt&WvWZhE#nNapes%`N zGsDa{X|@VNE5Q-*aYb4QAt7;qBN9j)5NM@bkU(5|KpZ$AZY!h}>H+aS<}02L$0qpP93q8a^mzOBld(d}r)Vg8_yR}B3CS+?w`hA#Dt zHqvsGKLEPiL$)a^h+o?*ts_Tn%Z}VyqpVtG!m3sAS+yP)9s;0fvTgI_5X*JK5j+Dt z{xkb~nyT=&gM}&lZPk`kU3D-E^#g3&3g3}68(}Wdy`8?U5CwTcu%Rnx=}n&TBzte0 z1_on=_jKDN_+V^WHQhm$E^Dm{vK31;9mCqhTZ_dma(q$<9UTN@^c+tG~leb-cR^f_|RjMtd@{NB5&>tV6o z_8q#4b79GM0ddG3@W~@^{~SpGvy3Q5Gba~hPVS(Pop%|^riwF*_=ROo_H&_y4gp`< zbJ2GHWJd|Mj(o0x%L0yBz*aLJJfOrm}*P}mYVZjM5xB#BXEIK z2pc)}!Z<&MNtQg482EBE-RwIRM!>|bfeDg#XkiKqyj-}SMjf#(w@pZyCfC3vP1d`8 zxr-zP7odf!)Z#9U@iQB0~6Fzcnw_HZi>ySwA0w$td?u5wQ6Pd z73|~-<*lmNtTonVId~a>okpd)S>M>js~LC+OtUAlJVrMAi{tQBFyn0|%M)z5UZuPy zApn!BVy%w(Ou-p2wOMUc$hHeY7fe$%n@1*sSunT0QK{CY=I-X8ZUR``UKh8T(iYZe zSE}rYb*b7Yn#2lf~b1{}g}CfzOBXki{fUK|6=rU_KHSa04gF z*OB7b`DgB@2!9+0 zHzG<`4`i)RH9Tw1ai+gEWgaV!s(L~0nv;=Ng@}acf@5#DE43r$y!$k|%CdEFW*-DGnSn&l8j!!x8 zV1(cZY=_(D_i8@C9fwTta18fjn0f(+w|XDX9D9k9O4DEpS1^LM@Z)hX8yLo%da5>$ zou@W`4ZyH#-S{FsW2Uf@=Gj42a)GOvZrI5Zc#Sb9ldNHrqD{khoU(s3I{Px?;|a(f zfZ0K@uneHA;UQR4ZAWSwO23CYIO~n2)}0sPZ6G9vQpMd5Z-UvL{1g{@yRSJ|?>^>1 zP??}DE&CKeD)^K_{}<7vd2o%@8rwvQ+EEo3RpBwX81B7r6->E(+qM1yo&jEnd2lb; zevGVtYH)kF@C+=bcShV7uR4~D=Uu()Hbn=w3_4$2F1(fI=CC|kU~}|8={U4t2@aSK zJWSWTew-wg)W(;U`Z0%_aL}t+2I3YLiY&#zK;c1zVw-`R;F4pQ5S>iJ6`TXpCYcOveC!Nzm4ovD(C;1N8%U=?NjnQCd(tvj(G2h{ ip^OT#6)4wk@T)WLKhVS}3I>(Q!MU|X`+|BBU2 z$jpG;19p8N;8$oVe+!;-DpJ7BRIA-=Kd;d&i$BgJ8tC63_{Ds%+OeX;PPDt;`H`f{ z<-&VuH8lazh(LC%g!vIq#DYEKm=-!fapY9Cy;Ck%s}*`k3l3UiWT`AR%GEkKca4+t zocrjX(3)FftwEk9g+s7ZiBH;yU6HmC26AL;kHB(bz4(kpQ=4Op;%6-Q(+nsiL{X5J zQ61hGmQpO1F0+Cx%vo}3>LsxP+->r9io(E@%VuEbpr zCUqI#R=)`UivzF4HF}uZ2;wL_kVhMl1e;>sfednTeHj8g?j~pX_{rOl!8^FyJB8c% z<#@{HBE2?+-_3xz*m=Q*spES*jc0jkXeN=ep+xAPg5gY&=fe=$JuJ$ei|+Uje}OYC zVGvEvv;-m#iXoZyE0$@U<&nI;{BmAD5k+uq@Z!7LGo2%dd+izf&TlASvD5T0z+#Ec z2-xo#U>^uyq;+L5@WX{+o!m;|3^*>bslUiAKPd?-v2;TdCg72dUaW1=YV(H-xSlv& zz<0dz9QPYTBH0-cJYfiaOSm74L_C6h_vAz{tO$={DTiYi;&LLElVWg`vFn!^uozc^ zgINHIX<(+)dWfdBfJoa8WDDPCSbxaDw__oT1N+p4D6a9Vuo6o<4DJCwUd8`i2Jo>Z zI8fV$|4}LfRVYJ4_fp{FY-iI(sI}F5Ae1dNAmkhX-Fk%HT!c+i; zl6x=?=^$=8*8~4cs=og_D|yOzT=p7 zF`qv?JamK0|CLPcJNxWqkbC5(l#XHb?he}?h$?-A@5As-eM-od<|3KCNnXm>a^QZF`InX2)~komBeFoAkEx+7=HLS$NeOesjU7ylU<{4qU6ftO_W^4e-kD5xUe^g l$8X2Df5(3d;4XV@BlMOB`K4J^V&3qeJK38U$KV)%{{o%SNnHQ{ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationProfile.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationProfile.php new file mode 100644 index 0000000000000000000000000000000000000000..083999d5c0ddbb84eae5d0fe50d2709ce2f1027a GIT binary patch literal 10877 zcmeHNU2Ggz74EL%);^9MXA;NjP0~&_t@2ZQw`?hbP17>#znJ*1-tAA!qS1Kv?s}5( z%rG-+*A0z%xSdP@$^g37*IkNId0*M^FV4=l;y>tUa^cT^Wf7 z@(|lI_xykNoO93IS6_E_9k?nl6N|W-PwMi{q3rJx*>P>()@@VXX*C+em34d1F-+p- zWqDykUf-z7iwi5&D@f|uEmtQcxoO)?lN5B*Zq*BQLo@AW!?X_y`^AE8Tl>WIG~ci- z6*)JMQ=Ulxu(UnmIhs!7<<0UM@wK|yZFduwmP$?Hhn}TRuHO)1DLbPfU*|fO zO2?GEE&FbZM5W8JOZ=8=-C}xE29LtuYB9c39HXXKmQB52TVAQuwyDh`iE!RDh~@W3 zvt$snUM9QRzG1ulk!}%zqMntEK}Jn!)eReA(J-35i;rWpskw+8!_oS2!K!UF-Iiq; zRvM_*=fO2a|}#06rwzhWS@(?XiyxgI|7Je z!AxXC13wx3#BPf*TeO1A*S=dy4UWr5oQn zl%DZa0&2nhZOBHM?`l@vZZrawhZ*aadt-fv(+b9S;T$G!qhaX0Zt4t#nWq`Yd^e8k z5i-F{feEa~P0US!X3sD_H@fjzHm)U0NU>ZjXvk^y8hDxHN<3S0F(+aj3>_GlH(dPHxzhJUDf z#P`uLUS^!WDu3n^B@eTayu(qBDaXrW7gU&kry?jTg0S>a>WT7U3g)^H9dA~o*Kohy zC%W$y9*W-{b#zLbys5$082V%V(<7-8LvPv~El3pn+85K@w^Q)kDsB%9dMGkbWQ%;Y zg(X5-gr_mlVfcCCD8GU!;uEDH^=Utb#i5b%ur15bWHT&D0PK-(KOh#{@1wbIr9e*B z$aAo_A<{Zb#W~4C4TmsQ6}rJZ##Ct<&RB>mHKGkmhq*djUM6wg37j(@&8dNF`h-UA zH)!)bOSm!01(HrE3|nwM&UGvz{dsq|2J9c@1lQ_U|Nj^6dWlzv_1+Oju)!1 zPvYt}L0%vx@ktkLPb9AEa6Yy|eGZ0kCxjcSc8%?*EAU)$Mp5Yc++WYZOmb~XC?OQd zW5s?;$R1pd7CNuhY+^FN9yh2cygV;;+iHob<|`pPi~%-V(tXGhtFE>@;;P4G@sfQ~ zvP_r`%9@79xI^p@0;6~VzdM*wYrIw}f+x2udk1FP)>d5u{pbdzL^=9{?3^!-4n>oiAN-w}= zVre^OQ1o{+4_mV~cb2F}Bp)uepQ%1KtX*AcEgmawbQ9eRJdQd{gVR`*+`}MXygwQ+ zU~Svqpge^u9hlK0R=m7{{s71%Z!E7k{#Qmn}Q-9TI!r7>M9Y!Y_oDe3De zn5x@)Ymc_b9eVK8tDdAD3qnw*3g1YHgtgKM@5=VHPq-GtgLEDV%K1{{>NxFUf@*p&G?470q2VXm=4x!p%&WL` z1!lww${P==C?#k^c;d@_I0Vz};@CMS*a68j_KAu^C9mC#@g{nqw>{p$Fu#i2HW@SY z2euNJ&{}ZG(@f$uY#jBgOdRW1gM!4Q(7hDOXaezHV~UFz~oV7q>C`2>CE-2 z)!N%3t_V1tQ)RIX%p@|zymQ8Oo0?_3$0sUAJwhvGVZ2Tp(>`PYz<1OrG5@*%qdP6% zNB81$nm)yIehbuvm)YZ_8(3oO=m-*nLAMx!HHkIT+JqqWEgJU>;|i7kFG^JaP*#-thn-on2e3RFvgKb!lU3O{uDHu2(h} z=U0|i78fR;l15>8b8DlzF`1G^;MA8Y8|#zl+{-ZDITgaP9e~%@^aphpgXpSa)+EsT zK?=^cYp5vu(ih>Bf9UYx<3zF8&A4O4`6^Q8*5MTWi9PdV_1@;<5&bWKq-<4J=2sWh z%A3o}iEDWAEaTf8!rCuC-xDo_^Wep{zyMTKYM%9chZnanrBM4y5)x?Dv_D8T?<4q zF+XGF4&VRN-@co^FU`^~_7C}h_ck6p`H1>v{1|z=Bz-=9eIb}XdxZqr$BGyuOaD&6 zh4`te^o4E?iKhwN(eKbVchKPh`VA~%fBb0v=A+O9N7qN}PojOSuQ+=H_=6S2w_PBw@|z{wn=fVch)^XGG5GM1up=#&s~AHXT|4T zI%}7nVDFtcMepwUM6$s17lJH+`G{S)$+H_0!H&Jjk=mmtw@WuUCXcS~!9Br_{qYcF zlY0f}cA#(EH|k`%z}(9LdF0kWJ}j)cpQhOk{e3F;c4F*%$Xq2avDYo7Zf@`9^q#o) z;I;0O9xJh_<71^9e`}$yCheC)aH(6nBE25?IxbY*D0>XnFLkF|i;}8GZB*Ags7kuM)Y1Fi z_rCA85hFnPc2_R#Elx@C%V!iL!;i;C$(L$Ey(<)$U|yU zFaU_on&}b8)QnDzxLrrLJuXUI-z5vUoXImb%lo#YI2HYIR?bH$~4GlIZH9 z=n!w{nAcg{)WKf(t1|&G+15LfJ+Rxo(+#XK0$b+3#%Fl;wv*DcpRP_Fc_=l0M~dZd(V&d)mNG zKeuIfJDael!vk_jf+#G` zENA~N3-~-b+0$Ly&~{Zel;J}e{05pCz%r`0Ym-8D^t_2qJu$5vgY^3Tpj(&{vx{?; zO3BZ5(k7I65T$qd+&1{7L1ge*lI>fNFULg;oIX|a1I%B}m;CjKB>LXG(2`2fLkL)Ndb2IJ$5%Xwaw{!GZo^Di7NO(*lCU0(+;7(Wku0P)(^A$q2O`@MKtB|5zwL=Rc3;emMt(V1h_$AY3ONPoPDjhpC6V8&bjp1|Xlu4d>YGi3v z5Yi6?baurdP^{xnzE0lPQI5yS(oPvB>#x#}Gw6-Afo(aT?q1wL2u?cHr%w>o#U$`R z25mB~xzNU2=rqqr^~eB@AZUp6n0ZBGjVIC$X0k+~yA^eor%D6s4qeY0sA1QpRLDgL z|NVWiaBuOmFFYLVwJi*eNxDl7qtqjM<*lbL|~BD&xXG{*y)yRO!UeS((c(05AJ z&y&e1Ul~QX|8Gc0c@}L6ygMH~AqAbHW!HmaLpRy+6u_G(aG)u`%PF4$xqlXYhOo%g z?V(|W@{i(^!xvMgJB#v>IHW#0=Vu$fQ1Obv>!{!_M|!MlM5YCL>JZ^eA7?=MaD}^n zu_jl3l(%!08%d>pup1`Sd@Tr_YA!A#f)nsPbUr{aeBX$7!hGdw(&`7m_0BPA`4vhl zk4`j|2GdUhNXHYc`;7(_QyH8?Q?-qTGM`;OgYf>aD!+tR4qjg_{&fb;#tv=#rKEsk zrU99YiDG|jhTrg{-wEIQ>pwood?ersy$X8nOO>0U2wNJLaZ3^5_UI12b-*mH)7)~h zhbq2yfCtb$rkAw(OF0l$_`?j!N5mX1B_S6v7ypi|(Qds@ck1~u>e-@-8P^uaV zzenGYUXxrAUp48-G#hz&DWCGo;|iB@FXW4n3x}ju_^S*$H6}W6;tj%>aZ2oe?{oBh zLHhauWfith|E(-q&Q+bM$*Qmf*eeIjPvUE&HH>_{kiUAc-b#Y(Z$Q?#%t|I}+%_d( z|KUZwm}E`3z6a@8jw_d1vCbDR<_Buu1!k;&2<{u=~PjqZpr`eji4@YSL}C z597Ylz#n>fDbLgSS0Y!e>7oA_K<`UIF3gglkK3k%{^PM8J)UlIE%-9`(}6zpl^UVq zvlsID1MdU>B0qfWdA3_Emv?q{0+kS67Q+4YWB>c(+w}Tl+j0h1US&R7YWXJux&U{M zTzgEou3DbuyVj(Auqiyc7%g5N4ep(wCN`+crP0+AQ0sO+#uU7btaq=q7eTXcC(ysc2+jt?g%L>1KDk zyKd`N=1?S%khp+^dWHiM65K#SsIQE1P2j0)_`gzw*HceECUK+oh znK$#zH#2YFo`1twH^4Dr4rD2tni%8Ydt7Z`OWh;a?D3 zr?MCkghp;&v!SWUYAyw>qNy0RZf22aGFgGPha+B@IO%MQ%_(JJg8G7 zy9iS8^|O>$w``~V-$4FN+z2zHBEFVc50s4tuI3;6>TG-d>l`<;4m*})LqYY2b4klAI>tOG zdx=O8#gJG!21r_GY)jM};$Wz;tNw*q#9(mbEq@t%mFID1s&~sB( zs}6QF%0r;fs%g4b+ptC=$P)^l_!j8KNbm>2;N|(HRDN}7Ih&rDpPf&q2A@MY=p(C( zQg)Ez_klg+*TVer%3y>a0R80WmGoTto$O$jcn$0iz`!2^W76tMCXYmcYw(m;8$ROZt)n;|$elni0#b7@9}%W@`Ba;@EqzXj}2S&R_Mo zTtRtoW)Geh=owmY2T`4$Yonv;McP~9cilg?G$bM~hZYpeZu(s|6k_i`(s4dqR8g=`m9&K-O*jI@AcG zN!mHl0K)+%Ed$L8h`ij(AY&n4F>Q~Bqb)xS1~f#^JhLtFQ`Er0Imn>mf|6v*+=V1$ zqBns={Eh>|GbTjGm}Vy2J$IIfOQ4?th@>GjKC~7Ce&g2VWab;>_o{&oKyCc??TkC) zPIqQV^a|*&l8y7YDH9s?C!%iN-M$_3MjxS=xC(|-P=)Q>-9c)_?<3&Iv}_mG{aEZ$ zHI0EoOcL`2yj8wxDzvKJe2&k6k)VL0sftD`tUv6eAyFWMfu!RBLzB+?pzk4x-3t2Y z17Lr^Me$v5v=eT-QQ%_T$%{YfyOfustuc`|19o0L;6Rkb$J90&u3J=g$bQ03Ydj;L zW?DyriDs(%iR(T?>;I4Yex70mhiDO>x4aqsyG^B%cqp6mI3Xe#?uVwc0FK-r8i>Ql2 z$n%HzVQb*He+0s2qmED3y}FomcGX?B(EPq4q}^{;ca|yFS`p#|`j^tIAwu#Jp=H z@psCJdtAp_AWUfKoXJA-pqk_+*Jee^gkaYVgua=bhte`QyUArnr#PKs-jJi}C2|>E zD;9137Z+AP1*{OT26RHg`uM3~r918%R?kjD8VU9ya;aoJl;Yr!A2z~&z7v{HBH#c? z1k=6I*@l13rCCRYwkm|g@q-Ad!~2|gsl%*p*Qn^+LT*u}(w#A+Z;J~Z%mkR~n|+;3 zHlzU-U9@LII^tVtZC*P8otXgPKyOuemY~y}cNKKc%hTnZaz1+dp)}g@_VbZ+ZQZsFD;ba9x^>HGJ>JzQ zy4_xB+4b8TZk zx9h4%6Pkp$aDfAGLE^w+e*hAH0&qZr+fF-h;>-ai4!j?B;>50-Zo4e5zu)ise!kz& z_w%0LyYE?T3tSXekb!I&BURkm6LA}fmTh8FF?DgvZ8niDD(1GO>ByEuv9vC(t=GhI zX|;BNxH_h5E2tp0OtYnIhL#- zaiy|&8(~?Mv0PtaG3rY+M!nRHQQyeV1EA=#B}OINo_A#Cc(cT`dL+INk}>Bs|H54 zA?x)Laui#$uxVF_X`#?UxLZj2m+8yivNW956sLKPg+eIF1rggW3a&1SHo~rL%(J{{ zfKK;UJ)&ksOREFlCx!yq@X@*WR zf)Vwit7_(wX*9Lg@XJR9T6XoOrt6fR!w2fJf%KxhZQ;G=aAhUDEj#y~!?&i90mAaO z746H&J9}O8s9IFjE;Eb>-pt^1OvzD@e(S@^iR7T9kNH^@F30jYp+!Etbm3Se3gh3S)v$*096OoNo_ z$qAX?bi#ilz#HHdxkZZD*g>{K-zC|*%TJ5Kv*JZ?Ay9k{gVf!Th+yY7xC1PL5vn{W zeT;aH=4T~t7u7r|kfv0nPCUJ9Amv&_qfvumOOKF1seHx{A0dKAQjNIQ%qnxNdVVynKmerzO-!F)vFcNC!2(0hVr0u; zgyDk|V7yu@*2;~$Yt>45X?1zETpD``roi!PZM{+<4+4F-wO%Z(uC0tE=);}6Yisl& zS$Hh`Rs2B!Zywx*KtrqvOSulYNc}pkl?dum~=m}o*Dwr@`Y`M6>=M5Q(sghnYu8!t&an)aEj!d!3 zo*NCCfak%uLqv=$OphOpHnQ;pM(`27s0+?Gdj>g?IAk~XNyI1JA#_d>7T%6qI0~&) z?MCF};+u$5Hn6?Nmd)7UT$~Z1K=K~iQBH&5JEUDeIVton@$-C3wq(ykvpjBjPdgYx2fc+ht_mD3v zbi%SWNQZNAEON3yB$-nIemW#2+J^Y?3xI-?;8laNEU+?@yKD_ite_x%AO3uwUi#pN z9J=gJ0!S~}i0~_rg&+DwD@&v(Pz;X(L)U^2!C5dGh|$ngPvYr>WPc{v-(}Jpk^R8x zbU!&lC-~|;X{TG7hafEN-NTCSRiBb|a=>rsrmRwhS8cgTw82mts^%!Ntu~alY_yQW z&~OpSehAVfq@&1IyjYjN5Wu;9_S_`HWZHX&b$Un|!6VPmzXE`Po_XoO*9K;pbU6v% z2gk{D+Zw4>f{oL)I28#;CHuA~UP*W^JYW3CKv&ABV1(I{eQ)4g!A>J2z3@Q<=0Hke z6U4WF8ZLJG&;NP~oC;*=z`q4BHmE4@Y8=QxYp;))*vf>RxM*eFPyhJy%S02-&=1mm zE~X3Jjdh0a!kxZtcykWEbAYwK=Q_Da&nHDsuHh2_jP|njJ|KRW*JIR3ANJO_b#hec_yhY^R%nNA;w%@6X6jOB4*4y8h0NcbD!MM&o3 z>k=~e>vGy37c#8u{zYP++dk80I0uHpy*W3-D>i6-C_MNmF?crd<$TW1FX|Jff1LX_ zq>L2j84yp;E&Gu7{Q`@a;=9QdX4d-0<-#+Fma z<#u;>J#gKRQQ5_9emgj8=`wDb_V$&-%zH~Mej|YM+au`QXDpg7AGJQCfbS$gHrtNok4RO-iNi-K4aU-+Gx*^XgRh cQsoN2&I{cB(eH0fiMaV=mi&gU13Ccw4>z@LNB{r; literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Fulfillment.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Fulfillment.php new file mode 100644 index 0000000000000000000000000000000000000000..d9633a5b8ddf0d4f82641eee87990b9552679056 GIT binary patch literal 2908 zcmb7G&vV;E6t0}4P1kL4R62EhfF*=U3W+qR?F>~&J8~SS8S=x^xP@jkV`OP%FOel7 ztzy!QFPu1VDLwVd3AplKaD-cX;lPQ%fZ@dMN|qJuq>e9^t@plt?|a{S`#yc(w|($F z+(0f041z4!Jc6W+pdWa|Gd%}3Bilv+G`)_G9TZ3qR(9deZXK>yHtX+E*U*as6REJ} zc`XOYrsGAHY+=LkTDIeL)lC~yr&ub|Kjuur_8Mom?GRMkOF z1BlZc*Bnf1b3UIcMvhfRZQ~Go!TDStp+q!e2bpruPu(`cgV87Qnl0bQNrg1aN()k@ z@?A_RWP~n&=LN8I9^Hzi*jnN$mj)`A4wcf)1j+C*?E*$O=HrgOm zCpr{{>L8w}`XTc~5$DMASAnPbgP_E*X9Op`Ib}5~(ET0d0nh&|jI+5of%i(gnL%30 zXsGnfZ`$msP5Qg`v`vT~sinternalAddGeneratedFile( + ' +ž +$google/cloud/dialogflow/v2/gcs.protogoogle.cloud.dialogflow.v2" + +GcsSources +uris ( BàA" +GcsDestination +uri ( B‘ +com.google.cloud.dialogflow.v2BGcsProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php new file mode 100644 index 000000000000..3f2efe820e73 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' + +cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Intent.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Intent.php new file mode 100644 index 0000000000000000000000000000000000000000..f7c9f4f8346b04c709d395dfef0c00af1451101e GIT binary patch literal 12742 zcmds8OKcn06)ma%r9{zBvQ3ShgrSqzF&wg?^KsQFPH&iU38BO?uyZ^W#S{M{+jx z#uVq>`|ju5&%1B<=39-e2AoSQD7w;=Ev25Q?j@`(CDCXamQgdbM76cCp)?aUW2d2N zN;8#6%#{+$rAi_{SExLTq^8ko)|A=AreSPqO1h>Qt$Mny%9^pcp&9qmyP34ATZ(R_ z7*7CQ-cihkTvHMY&$;C5w=!1&YMN}Ci2`E-4iObvlXSf{%;by-`VQ_NaZZCFOLj7w){Hxlv7xSux^7S_7`iz->*?gNIEXN(spytqH1n#W z)w9Z$ysH|`V5BRG4VAuy>;Z=LoPmD$Fo4uWL*Hz+bY0aq*GmnG@?e&70f6Su?=-Bv z{0s1nqzI2_&7lo!+ue(T`$7sFaVuvE>JpAZASU=xqoDzXA zOtFAYc>$f;%?PJ$CUQf?fTt+p!7V)Fd$2*FB2{gy*b8QS3z{|{>_->uN4+vgjeFf* zdCp#`d9FtFz<73w_up_8rLhg{elbdkN{Y$v(N{J@_k|9S<6c{(B| zV320CcqkFNFqR$oyBH!fFkV;9h9>Vx>`~Zx6ec%d;+|67GK_7BrUfNFjL)K(bc%1+ z%i1ZvQR+6QTcu=tpOY}!Xkr|y)?R!7`3&)|;}F4ghzU@u%C+tIAU+v&pX_K7$|hGe zr5>O1o;(9YQ+E|f-b80gTe4m^Ha6nZ-h#6*spxe~vIsSq<F; zZ!i7C{{)jU0}wejLF45m@IJ;&SHHXgu1dJw=_#ac^g<06bXT7Z5YiRGd_u2 zqnXS7b4`_PTF(9jm}we@C2bfQmiAVI!2$8YP#$v(K0waF88iq*QqPqq=t}Y~Om{w2 z^$jCVnCh?gA>_O*1~+E`iK&Q_EDE5~4)aF$Z|rA$b)Bsa|9nVwF4PytKBwTF&PR z^M(9e>>DHkBl&m5rE)PJ3y~O%R`U2+tmI>1Av_uq9)(~Gh2ufcVeaW(`H-M=yRz0& z{L%?9;lP(aqvF}xJP&c7o-~Vj8Ft89b_&LJFn!6`pY5^iYUjRb7{P3hHJ~jm;kTG8 zHPy5*FFAQq_{BvSvEz!o&EZg>bjYF% z6CbqH+BU{?1IsOUXe9G`09H3C{R$^Xj;K{lZgTer(<+B#$N(+WkoPo0uE(kIBbn2V zFiuTP@y-R;-h!B^?ld&T%}LY;lxWr=>d|F5b zR%9GpuJ6NiwQ1bL^5Zhc5B2yd#`;+2J*#Q5i@I%*Iw29%aKh2m1aeajn+q^Kk zb`)%IdGmrPH_q4viLNC|&l(1uhWtC&nAwHXZt#v=bA=hq%9u!KpJ^w3r>7F$h9Q>XE+|jrx{rx_3k*Acf4U_FG zP3(KRvtfuS93zlJzmucey!*?L>)wer$dXO$^&5&#BSErH0@TBiOyL-trf_heuQgSX9elX4&%#98 zx7Z*JxZx)x0KAml!xdrSTM+S9n55KRe>fn5>6vXPZ#OZ7b!uxjj z;2OrZj;Y{=L|FJF4B%CZ9*Ts>GJ?cX@N_}*La>tVaZVMG1rwb3(}pjS{)DN9F2d?J z$j%8=?qEfV7bnWZIV*%cjXb4kM~zluLq41p`TNr+5)i^~@qB^_%U3YTiep6X`0D|{ z+Rn){r0{=au{SU?vwp>K9);?*vgZ}MFvHEBZs>b96zvlAlR+5wmuFH1;N_kjmne#& zfs%utS;}cg*_Y0#Fob*9Ern72HnwO^Y}^Ro)`PbxF`mL_A((30o`2tQ_Ugd0i}Dcb zBIV|$BJtA+4Yi}Dcx-v{7?n8uVdu$Xu$h7g8zJH7pw-ma(PAt+Vwa(04oDYPqz$nwOUFRzj3|oLa_)2NoxT3>a;fs({$Q`LzA=m6q?}zvpk;rB%(iVDN$~v zR4(JlXaKusk}a;StmNmUteCs8uu@uEo{J3%pNC=0J%D*2V2wyy`S)cjxAGn*PvNor z1YT;kc614+6nJA`(P0WdZ3JmbbBssXWx>3Ir@ldYR7G&nJ}AiX(KW`3agX!z^~}Rh zsAv8%1hG!RNfd^+6uFKe!L8qf=`FlaxR3WOvL@m5a8uvGsT(`!L^GuTpzqu&wdnE{ z9kv|RRha7Wj64U4#nMXQF2YqTN@B6Fu)Ku0?LZ*{u9z3+3d;)!M1bKOF3GPT631~w zxgr*d^vQtmA&mQtjKy!Lrf8apYEx%j380wECx;BUx9HeX-Broo>^fvi%2u7VDJ0`$sI#Zo5tt@q@iQ3GIxqP-%y1@f(wTKaAtC=t6F%p+B;znTL zM&U+mkcQ;y4IJXeh6u(f8X+GWreEGFWYIb!7-c7TURae%%hE!rw19KnQOuB&{Ij$u zE-#eUDyy+bb__;#_$7mI8%X!iot*8SxQq8FGYv=R>=i@>2$xlN- z=(&jRY_2FDwD816@WK)A8E7c7K+Rsj%ZD$;Bze5-2u@AbH(Mw#PPpoP4sFlW-^Qy# zCbzV!D);Qt_QK75vUZyDQ)?yI-S8cemR$H%$k zG7jRIBu+>sA1?(t4U;+@&-ixYaQZdox&_6yp<}|={C7Z(0sCVS8@ra=J24}spAo$m;5vgGg;ZH zZTSuNL~=sRj{7R*&gRC+lc1LJI01{_aE&5N4w=?pH2(6NFy&Jw{SW{xoF!%nyVo;Ik`UhUAmBegh?$g-C&U zl&N~8RD1C)0M3J^esTs*<9UO2W48+V+a1Lj?~nZt=huqGSSa&(3`RHylYAD2h_48c z)M23VEwpo^aOmqYZR@!slV63t`_sL-;(s z?jRof;_0?9u-g;7bK4h%UQc-A@<=SftB1T@*~=n!`9EcoxjyD^w2-#kPAMHR3WO%;O@eJ?s*cYR1<~1LQX*k(w8-{;!fXRdpABi&up0Ym??`&CC!<internalAddGeneratedFile( + ' +Þ +/google/cloud/dialogflow/v2/knowledge_base.protogoogle.cloud.dialogflow.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"ü + KnowledgeBase +name (  + display_name ( BàA + language_code ( :ªêA¦ +\'dialogflow.googleapis.com/KnowledgeBase2projects/{project}/knowledgeBases/{knowledge_base}Gprojects/{project}/locations/{location}/knowledgeBases/{knowledge_base}"“ +ListKnowledgeBasesRequest? +parent ( B/àAúA)\'dialogflow.googleapis.com/KnowledgeBase + page_size ( + +page_token (  +filter ( "y +ListKnowledgeBasesResponseB +knowledge_bases ( 2).google.cloud.dialogflow.v2.KnowledgeBase +next_page_token ( "X +GetKnowledgeBaseRequest= +name ( B/àAúA) +\'dialogflow.googleapis.com/KnowledgeBase"¥ +CreateKnowledgeBaseRequest? +parent ( B/àAúA)\'dialogflow.googleapis.com/KnowledgeBaseF +knowledge_base ( 2).google.cloud.dialogflow.v2.KnowledgeBaseBàA"o +DeleteKnowledgeBaseRequest= +name ( B/àAúA) +\'dialogflow.googleapis.com/KnowledgeBase +force (BàA"š +UpdateKnowledgeBaseRequestF +knowledge_base ( 2).google.cloud.dialogflow.v2.KnowledgeBaseBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA2´ +KnowledgeBases¤ +ListKnowledgeBases5.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest6.google.cloud.dialogflow.v2.ListKnowledgeBasesResponse"ž‚Óä“Ž&/v2/{parent=projects/*}/knowledgeBasesZ42/v2/{parent=projects/*/locations/*}/knowledgeBasesZ.,/v2/{parent=projects/*/agent}/knowledgeBasesÚAparent‘ +GetKnowledgeBase3.google.cloud.dialogflow.v2.GetKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"œ‚Óä“Ž&/v2/{name=projects/*/knowledgeBases/*}Z42/v2/{name=projects/*/locations/*/knowledgeBases/*}Z.,/v2/{name=projects/*/agent/knowledgeBases/*}ÚAnameØ +CreateKnowledgeBase6.google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"Ý‚Ó䓾"&/v2/{parent=projects/*}/knowledgeBases:knowledge_baseZD"2/v2/{parent=projects/*/locations/*}/knowledgeBases:knowledge_baseZ>",/v2/{parent=projects/*/agent}/knowledgeBases:knowledge_baseÚAparent,knowledge_base„ +DeleteKnowledgeBase6.google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest.google.protobuf.Empty"œ‚Óä“Ž*&/v2/{name=projects/*/knowledgeBases/*}Z4*2/v2/{name=projects/*/locations/*/knowledgeBases/*}Z.*,/v2/{name=projects/*/agent/knowledgeBases/*}ÚAnameŠ +UpdateKnowledgeBase6.google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"‚Óä“ë25/v2/{knowledge_base.name=projects/*/knowledgeBases/*}:knowledge_baseZS2A/v2/{knowledge_base.name=projects/*/locations/*/knowledgeBases/*}:knowledge_baseZM2;/v2/{knowledge_base.name=projects/*/agent/knowledgeBases/*}:knowledge_baseÚAknowledge_base,update_maskxÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB› +com.google.cloud.dialogflow.v2BKnowledgeBaseProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Participant.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Participant.php new file mode 100644 index 0000000000000000000000000000000000000000..778b215c7776706da38d94b649a87a6dfb5a1b58 GIT binary patch literal 11918 zcmd^FO>Er86%JRDCC%zD<49g_QfEUawyemz=_dWbI!?ls){0VFQlz!pI7(THJCYbv zBtvrTD25IV5ClPcDbhm=^i-giqKEd}9)dQP77b7|ITQw3_z)CD&P7r9)Hgrma=Bb; zS9VVI#Vc~=&71eW_q{i7`235`u7ge&mWV}M%_oh*)_%d?B?ZT|eOtH9!d7#8o45tt z-g69-xWz(Yaka3rS})WVm+Mc!RL^d@I;j+PYen&lUnV1z7fk9dxzlfu$k^$PK|hUROVOH9V*0+q437|PhZR=$9cZfc%aSZm2b zw^0H9In6E8&B9B2+Z#syWO;O->|I$ov>=@WcFNv z%cNtUbZprF#X_Lf8Z`-+V{_T^iEC-*<|6TQ*KmB>U4x;O$`0{EL((U+=ftv9oUvV) z9ZFs-_->O#S1%M?;x}FE0@IrcI0%1jCfH1Ij7`O|Y-$DD@+y_qo?0ThOhX1|Xx^1s4qJ=U*@cu$4w5#PKDF`q>b9 z6o+Tg_v>iBpK!-{KDx-rq1Yma;>~jYgpi~;29O8EA?Jwv%EnBZkkW4EH!X#K?f=7>xlLl(=SlfB`Y$F(E4);W0;xx51{u zw|?MFF(5F9>*ys)7fp}9kbg9UvJvvb52Ha!qB*G`&5l+F?kW;~5e>SwNpcx@G*O-} za!rz~UW`a8uEQKEUK*qxnr$`X3?Ye)^^j=Y06N^ z+nf*8rbk@WXyk@lBQ2C~*m`ph-0Fce&hzTFVZszIH&Pgw&6aDuD!Ld*3K9l@lgg=C zzPry%kbe<HXozqH> z2UtyzW!m60njuQJgP%uUK>pzn8omPYq3w_)JU)VkL02Dq&mhTAn!$NAZfe#}6DC0v zHb`!u1(zJkMs|=J4BiajZ=tEk8}61#`z z;@1KGc7lumi@n3LQ?UFq3FQ`;Un3EO zXi|>NmN(C)**u~JwR1+Uqv<8$M;-^tU1%foK(!t@L;gTQCoUUaRInFFzTa)npizgS z*Mn-BMez{biiA%f#Gd>14Pr$?SawmaQy0$x#v$N?G4Mff7Vy9ml>d7+A}l&-LAFsN zD^ov=${&K~uR3ssAPL5ed5*fjk42g1C}T94e3hnpW{9Nd4+}!>?{^2$G>f-)$O0$A zz%A8wG_^yrN55k@UHH@-hUGMU!D3IP0kRIGm+9b_9|B)w$xX^4d^V?$GikGHba*g* z8DW<==Dr#&r*f2$4(gnfyh_J|tDyj*1pv_O zaX1`82&iq6CYU;3O_QXsX>oZ)G_JqR^(n|10I+-7SY*qDcEpQic*4!3Z1u3(ExEWEQncP;dGjWE24I& zqf@)hJT@Cn!Wc5JkVG)hB1t(8gsWxQM9f?ig2~dTR z45W29X$xGW1}76jsRlR?rhtrOvY^#n-()e3vMj1N?=X;!y(~ewj`(918tkY7Piw(b z>NLSCsgSM{lQ_G!wNG8f_|5|{ae|`fn`}AN25~~^LQtG_9|S>-Go88;)I55USlX6J zD5=rr7}zf|_^|Sy91+TZJ ziy&_2JeKWojPvOE;jo0>6X$V2rUK*;&ZEG~mLCx39fhC{;XHoePNjej8cpCl#J1TF z=e?IfGeWXL3qX?`TA}t@1u1C4g!BcuKgc``CDn6KrruLd_j0N^iN*l$jOJLKOA#gN z+%AF3q0)cg%0GZwy~7Y9eyV7aRmTven&sW19THw4pGylKVNZq4z%$9#0D?@|qWpda z<%Bkuw70m3|5L}jC!v!GrVy^FpzOBxR?ID_wRULFK3(!}3FUi4^8MSv*Q<%Ayz%pW3(kh@edMuG;!a;0}zNFwFj?HW1dK7w7`t} z9N_e9Ht;3w;&qgbrW!bXi@J%QI#XLdk%_!=qWwu$!LhP_O#W8}9ZyO?YiOnc#i< zaJ~SZ=if)eW3dL4q@%9iSkmK)C4t)3D4>v4jO`3 zGvTUG)it<-Gl9&ZdSE@R5qjc>gIIuAdhX|^EBOs{qMN)qbSBo5Ro824mtRxsudT%! zx>+>5rmWYOmCMk~9YsTzmRI0sM*dtvzVHnny6fz$PW#AB*I8I9;<~mgViN}tfD4}@zoUZ#(|6z^hEG(1@>sdl3Tl3iOEs!kRUjBLI*)6R{04d~ zkQ_;9E#bVF{#u|_(z#y<4;>d3uc1?c_!e73`f4q}Q%x%J#R8$*So#ZgP@RTE5E?a< zE1yS`v4dylO#^c`Z_T}l9ud8D(hzM3Xwdj@cQeS2kQ^Dup-Beab{|?Ul=%4Zql6~6 zZ5LW5^zw_}A91VA1Xc^%L)Yl-l5C-e#S*P{K3vuf(W6*U;-zwQqNX`CMT=I=uvDfa zScxe(B7Y)5+cB}P<)vQ7@nUl|*hP}>6U7!&uiWnYPOf}!8jVrsh;K+d{EG~FxTDdJ zpG#A`W4P$V=F@v+k!9syOYeUA`G=VwOY(E{s}_3K28O>F-e%0jF6!pmFXt-JtF7y+ z@=INWw5~$>5qL+zT%URPFR&E;kAx=LZya#ynWcSf|0a5$o9G?PEkrMW;hu{-wLNrRFJBHq zr>npeE2Rp*qnwDu&wS+02j9)0iS}-7dMve%4eVD=BdPclfu(;2mXu$KZ@iD_s%Z4) zH@u0eNORX;m#?J>?8k^5!tW?EQA@Js3Tx5EOdPp{!at$Sk>t)euA~{R%cQ{Q7mhSn zSpT6}=@|+CF@q*WU80DJ45#`sHaJivm4Z6v2o?U!0q{FXUJv}0o_XRJFSRNruOfa2 z+n_+u{?QuMkXm;~ z-uiN^8(S!}Z~pB+DJQ!g{Qj!Ew(I+jS1FZl-MS^{Cj7t)dMUg7%jokCv^VJKVg9h; zt);3zmCz~pPArAQs#9yNs&9>csJtd!e}Nb9!B>Frq1lcd{T33`gEF?YjF1fu;-z0^@=NTy?BW9bF1xrGewSUmR^B?s&N|PY4L=c`=bti1zI>*iF&cWpSI=xD L|2p{q9U$~S)@|t_ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Session.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Session.php new file mode 100644 index 0000000000000000000000000000000000000000..049e1ceb29f835497e6bd1247d6a20a5a5f14858 GIT binary patch literal 6680 zcmds6&2t-B5s&0Jv07Tkd3K1R^@fR(C3X@^DeVV~67Q~L$&MlZz%tonOSMzu(UUY} zJTp5V_Bt+KxO0IkTsU&z%)bDffZ_lr4sh8!Ra>0s_c0^c9?7yPF8E-5yzYLlyMO)b zo~NguI9&(sDl62YuIAI0vU8yLU8*>)?c2I-Dmy{DO?uQgY=eshWGH*1l8^F`?ifNpA@r!<5eI0Oa%oM6W^bj9;EA7Abno@!WzkBY_{ z^kY$JYoRR5y{LpI+GL@?Ff>;!pSqT2Hfz+= zUBmHhcN0a+1fkdc0QHE9GuVE1F{<@3B%66qoyU-$I+!i@GBVMhe{O6L4i! z$fX6j#5X)aq#A?1s&nj1@nN2zAOpCRY~CMYnZ+(T{`*4&C6}uxjbK%M%#E~vTWWEZ zN4_k!BqZf}*dd~I5t&^Co|Kq9X~E;@lB;2~T}Ll6LJd5*kdC1>V?}xj_l%5DF_7jvR4`6bi?sRSYwJLBS zBT7O8h?s&P9Wn!%erI{aGK0c-kx27yqdmj!_35j%==|NXcng z;1Mr}HsaiCghndThAe7y8z%zt60U_{=u)kP<(8e~j(sxB=!t|CJ`;F)CM=-8?m_MY zn2!0Hq+#qeJ&;*_3&!^}GoU=3sdDn8ME(y60B)X_FR4N1SjjT}NtYfCI~-T+tJr6k z5E7SJN+oLE9j3jFa@+!{eHX^*9>#AJ%BeF!saU-V;|61&{BOn~&ApMeM*zO$Y{-wp z$&}oHw@l6I1X_n;URyMK4Sh_Jci|n+p;Yf;(sjGTW_8;ViEmLH!nrd^G6`2SKArPJ zrpQA8&a|95CBqE_*v!=)|B(W=7=0o`WoG(l!zM%Qpd(^Eau_SLpwnugWM z-r%cQm}& z?twR~suV7yO9LH#3fCl`MO6-?Q$z`_h{m5y^KJ5H`#>Vw zj%9oJY=+NeZ5yj_s3R}nRxCa6j&PmpzBlZ2F|@!`^S>B_S!5up?P7|L_ap@F|HCXW z3sWBYW>PiqalBy27EE7FW)p*28>@sf$o_vkDX^N#!-MhG2dcs3f+=DcK>SXLXW z>nqPue0#f&0!#I&WWEfks56u6vYm^E5kBGPPBu~YoRQ+wf4&RQ>&{G>-KdEPL_8iG z@0sEWWnc?AwG#ur+-VtZ#}F$gPC0MggIPYzy`gGv5Ktp3=ck&;e*rgR?C|M*31$W= zrb|Odo5*B-0aDQif=AT^}DpZxhBKTrNPng5VokRHl`d=Y{9V|-fmiVuo7T3CK~b&6jc zl|{c5qeMCJ;Pb8g+HhrR?HR6Zu{nlW3_P5M@l|dXYjY)E9b_|nRADC0KHL}iSECy` z|3Uv&nU-!m66oRMDfw9fZbYotpDOavupGszgxUSx1vF)vFU=($Cvso?zH)2ey~3X= zue!ePc;#Yoe}7+Y6I)9uY_x56_t9D6y{)QWkHKxcyBOj?H6!a_lihM} zCO-dIfIhsANL-G2*(M?=8&_HcHd^nds!k@!_ISzG>fGPlAn^b1S;;;a^3=oem; zzOMW+Im%Vb!>Ak%<-4Pk$O|jyh%^QYA4At+-=`y45{IlZj(T;`Gx}+a(Ow-KhHr-) xt9w2ReW&w^=Q``o72L_U-@6~(c0Lk6F7*8t!LCOPJ?3`^E-8L5ID#X9{{R*s$yfjY literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/SessionEntityType.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/SessionEntityType.php new file mode 100644 index 0000000000000000000000000000000000000000..51d43436e46cc34ccd380add5212c419110897f2 GIT binary patch literal 5745 zcmcIo&u<$=6vlR2(WwOO5+$vxwp%x-sY!Mvw-Ul7rJL9ZQR~`D(^j!8ne}>{ELra^ zJL9Aw@+AkvjRWF>kPrn4i6bEX0)&7g+;ZZ;seeJmiP@Rmwd0+&vu>M1{A1^R@6CJf z`{sGxeb3&s!4+{Cn$S@(Y>JIt5pP1#b}VdZmLWDetrm1d&1&1a0Ub#c3uWPQ)G1<4d%rS%i1uYtQl6PDK~Z1ur^wTwIgrmWCRh?Ewc_ytmEA}-nF4b9ROge zZHR1DgW_^!p#-toRIyrHrdYK_7pqnXuxbx;Hv!NL6(R9H!z@zBHG&BCfJpxAPQ%bO z5n&aRmuVfHwbYQ=C zQFI{gIOa_nw+qk>-qkpnQ*6Dan5N}s!7@=k-`i6UBFb>l&`G7@*(~YMXfD7_bz8Tb zc&4k+YoQ|t$?1z)uMv*!J*XkcV6koE-7!q*#!D*N;@i@;nY*QXO`%DA~?)R0lZ3` z=n$PviK&@Wxw&D$491lx50Ro|_7gw|dl069SiHBkvbJ6?KP;}Ut`v&(QkndFaPNMl zxVW;kQY@T)MYs$ua98;@rxU^zaEZI*{)0;8Zm~q3olfR|Pd!zBO@X)i8iu8a^a_%Q z=*ywB2t`t-521#Uyyv~^%IXHmh_CbH0b=Uhm1&}O-OZD4*$1lsU7;Nb1I=ySvCKAE zPK|<3UAcpxL%wrgy7AmqIqnQgWBMrX`ESSC%6=jq_{-Q}=8FWla92k-R4}v(Kk7h) zg+*|}RvnU6k1^K?WBya-gjm&|1Sf4$?K&doDW%nMx1AHh6ae&lY;8f4(88l+BJ)WC zT#Skf+2nA7!W}T-HBA4AfJm4l$raiy3FLJXKF0OFXk7N6%zOaOFT-$p{Ol-))Wpk8 zEM{bWAzNK^Aeo~=VfkKONDa#14NksjHAZMrC@!W&-;=-}*ktsI4m`rAtG#3S6mEc1 z9qO{~3cVM6+80tnC^}wA!TCztETe&o1!%w_fj)m7b5AFL5Xux1eoKK#ekTj>_;GX2 zUx{zybwoNpjwvHf=I7-8-~WD|{4OcnaOdnjM(_DRjk1HnoIRw-)sk>$sNEr<%6jUX z?FsJy+=6gB0?wCLB##PdU3he4jCkQ4D4zTYKc&C~PYQ&$ht+~-;TLh}01#@W%#Qux*k^RQd5x%qi zL~iRjyuFYeA1FNL9w?VMrJe1YY=kE%FcmSg4DZMYBfldj{lhAlmFOKt?{LX7fr{B? z)l!ye5#KIuE~^V!COd<0F`A;fo@EL%8Y6Ca-rB9gi!C>Mge1zt$kX z*Eg*G%U2R4nG1W~?8eRh56=>bC&^@C>4#)`nO?a{i|&=HR0ytIrH8r33EE)SuLgHj Wv+RDd?>aN`DwD2cSB_oK1>k>5augB( literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ValidationResult.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ValidationResult.php new file mode 100644 index 0000000000000000000000000000000000000000..9baa2f455897615e8d5f736e100c23154b2224af GIT binary patch literal 1126 zcmb7DQE$>v6t;j4?$lx960!$##3k#ZmZbW`WQIW@O%w=2j0*|5lnc8_*W28Ci=`0d@(rdnX@>#HtF9+A-6p5iyOLDbr|Z9U47xt+bQ=dx3K)?JV@&NFYRjuJ01#5E9O)c0XWh z6*ah$){C~IHZyX3Nw|-_QIiOl(?BxbQ>E4FoXB*i(I4Y*)i$D|GcXd3)#?qAHIO_c zo8198ksvO%| zaXRf{MlYcIcE8{47qj|9ly4}Y)2M$a=E`TNxK@_rOilJ=k!EikYY}S1tg&sqyu*km zKQ#1A-PC^|C%f01$EoXSXUB;RR|{nql{wqII2=%QbZeJ_$LNKG8P^X@FiOx!j2Htr3nZle8|;5}|*}7;6du literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Version.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Version.php new file mode 100644 index 0000000000000000000000000000000000000000..b1f9bc09a0945675df9294d88105e9ba9aede058 GIT binary patch literal 3769 zcmbtX&u<$=6lR?^Z6-~dPNURyrLuJ@>V#w$Oc1I=3Y++cETyq!Cqa!Yto3^AELra^ zyR%74WC;+W7fv9!apB0nfy4oc3*2(bffFZ=2ytL`W_E4Ij_ZV6yxDp0&HLW>zPB^) zzGv^*U{1^-6FDkIb+Ptb#Cu4z9Sd8UWr#Je(Lj!Aw!}<2zjdFu zx|Zi?C?z&6t7#xvGc2zz*LBsfnhnD`ln;{f0did3G9?-m08?!t*H$$o=89`i5LW9d zRx3H`Us?D4E9ua`vXfi^Kr>X=6?a%1a0Ep1XL~h6*F+bqnEX7@-KuWtm^kX65FD#w zLp5APeEV%1o~dDykmx%UObsRGMHbVyePCMz_o^6VRP;+h%23Ih7&)eDRMN=R9Nos2 zQzWLTR1@K_fc~4rJm1z2r#Hj|%Q2PeOLA4jj)%H;7exnQ&oNhM-hO~~_*5BCFU8g? zifLMY6)e+Dr8<~8Af+|9_&k7W$Cfb8$+qr!#>CowIo93d>$WyFJ?hvRGGjSvy`Zy zq>iAZgJkSBkD}T-5uDE<(^l-&u7!qARJF#L;s$rR3>;1eU%Jbes7gt{%g8S{Ukv0O zF0$w?Qr1&jhZZ=f9W#jkGzPA41;d-*l0OBaf+!>=*2YehF&G7tb*?MY$k9l!BEY-g zI-ej_(`(g`6CERqmzmo#nA99ZMpxC}FM5frOeSLz!@_nZSfr3h=9LBGz9v04I!+v} zC*KSl22@+(Ne91W>PX|nKLAsFmA!@cKx`*dD(4HE)$*3IwOy`mZhH3=*N-mB=)f zgHpau3jPt&uqz+&r?#v%NlOG{mn`t|wc+~%j15a;vqL@#9?y;t|4ab4Hgp&B?cEak z*dr2wkHEOCI%HeU>HLWj`A3<9BOsUs6E?}X>XN}td8gD0@HPPSJ+}6dNjayjBE%bD zrZ)xGCZi9*x4~78)FoMrkw%ysfmgE64HG@X)vnEG_r*8B%^V7l20-8GXN(pzBqY=;8fU54b4G|)0oq$~G%9V=XM@K*tVPNTx5Vfl9K0(hfn zB);E+$e-PPctSYxLOVos+OiK%x7V>kzY6d#0ZjEM1rDX4$MjsNUI-MH9UqaXRG^IA z)%XP%3*C>E>#Qjjxq9K35ir%G#^I2AOwR@Rdj|PaAt}+8;|WNoi8}QOS!jpJ?`D#z zp{_$Y4#ONPxA@+RT{8pzOt|lv2Ez-{V;U4A^z0Zk@d9J}rHFTz7Z}N> zEr$Z+O&ojni*o18ulH}t(>;uBHzmu5hlf1f@YAk(c#mDAmTW`C4a;dQzRbL{)!MfL zxJOP1K@kQVY1Xds@mTZ=R1|g}Gb4U#@{boytNRj1QX})Jvxi+<>Hg<$LHHpONoRkI y#B%f+C$0O}I4K=oQP^N1GE=tsrU1-{%4ZwfVinternalAddGeneratedFile( + ' +Ó +(google/cloud/dialogflow/v2/webhook.protogoogle.cloud.dialogflow.v2\'google/cloud/dialogflow/v2/intent.proto(google/cloud/dialogflow/v2/session.proto4google/cloud/dialogflow/v2/session_entity_type.protogoogle/protobuf/struct.proto"Ö +WebhookRequest +session (  + response_id ( = + query_result ( 2\'.google.cloud.dialogflow.v2.QueryResult_ +original_detect_intent_request ( 27.google.cloud.dialogflow.v2.OriginalDetectIntentRequest"€ +WebhookResponse +fulfillment_text ( H +fulfillment_messages ( 2*.google.cloud.dialogflow.v2.Intent.Message +source ( ( +payload ( 2.google.protobuf.Struct< +output_contexts ( 2#.google.cloud.dialogflow.v2.ContextD +followup_event_input ( 2&.google.cloud.dialogflow.v2.EventInputK +session_entity_types + ( 2-.google.cloud.dialogflow.v2.SessionEntityType"h +OriginalDetectIntentRequest +source (  +version ( ( +payload ( 2.google.protobuf.StructB• +com.google.cloud.dialogflow.v2B WebhookProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent.php new file mode 100644 index 000000000000..664ea58c7fc0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent.php @@ -0,0 +1,541 @@ +google.cloud.dialogflow.v2.Agent + */ +class Agent extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project of this agent. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The name of this agent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. The default language of the agent as a language tag. See + * [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. This field cannot be + * set by the `Update` method. + * + * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $default_language_code = ''; + /** + * Optional. The list of all languages supported by this agent (except for the + * `default_language_code`). + * + * Generated from protobuf field repeated string supported_language_codes = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $supported_language_codes; + /** + * Required. The time zone of this agent from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. + * + * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $time_zone = ''; + /** + * Optional. The description of this agent. + * The maximum length is 500 characters. If exceeded, the request is rejected. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. The URI of the agent's avatar. + * Avatars are used throughout the Dialogflow console and in the self-hosted + * [Web + * Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) + * integration. + * + * Generated from protobuf field string avatar_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $avatar_uri = ''; + /** + * Optional. Determines whether this agent should log conversation queries. + * + * Generated from protobuf field bool enable_logging = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_logging = false; + /** + * Optional. Determines how intents are detected from user queries. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $match_mode = 0; + /** + * Optional. To filter out false positive results and still get variety in + * matched natural language inputs for your agent, you can tune the machine + * learning classification threshold. If the returned score value is less than + * the threshold value, then a fallback intent will be triggered or, if there + * are no fallback intents defined, no intent will be triggered. The score + * values range from 0.0 (completely uncertain) to 1.0 (completely certain). + * If set to 0.0, the default of 0.3 is used. + * + * Generated from protobuf field float classification_threshold = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $classification_threshold = 0.0; + /** + * Optional. API version displayed in Dialogflow console. If not specified, + * V2 API is assumed. Clients are free to query different service endpoints + * for different API versions. However, bots connectors and webhook calls will + * follow the specified API version. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.ApiVersion api_version = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $api_version = 0; + /** + * Optional. The agent tier. If not specified, TIER_STANDARD is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.Tier tier = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tier = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project of this agent. + * Format: `projects/`. + * @type string $display_name + * Required. The name of this agent. + * @type string $default_language_code + * Required. The default language of the agent as a language tag. See + * [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. This field cannot be + * set by the `Update` method. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_language_codes + * Optional. The list of all languages supported by this agent (except for the + * `default_language_code`). + * @type string $time_zone + * Required. The time zone of this agent from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. + * @type string $description + * Optional. The description of this agent. + * The maximum length is 500 characters. If exceeded, the request is rejected. + * @type string $avatar_uri + * Optional. The URI of the agent's avatar. + * Avatars are used throughout the Dialogflow console and in the self-hosted + * [Web + * Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) + * integration. + * @type bool $enable_logging + * Optional. Determines whether this agent should log conversation queries. + * @type int $match_mode + * Optional. Determines how intents are detected from user queries. + * @type float $classification_threshold + * Optional. To filter out false positive results and still get variety in + * matched natural language inputs for your agent, you can tune the machine + * learning classification threshold. If the returned score value is less than + * the threshold value, then a fallback intent will be triggered or, if there + * are no fallback intents defined, no intent will be triggered. The score + * values range from 0.0 (completely uncertain) to 1.0 (completely certain). + * If set to 0.0, the default of 0.3 is used. + * @type int $api_version + * Optional. API version displayed in Dialogflow console. If not specified, + * V2 API is assumed. Clients are free to query different service endpoints + * for different API versions. However, bots connectors and webhook calls will + * follow the specified API version. + * @type int $tier + * Optional. The agent tier. If not specified, TIER_STANDARD is assumed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project of this agent. + * Format: `projects/`. + * + * 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 project of this agent. + * Format: `projects/`. + * + * 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 name of this agent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The name of this agent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The default language of the agent as a language tag. See + * [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. This field cannot be + * set by the `Update` method. + * + * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDefaultLanguageCode() + { + return $this->default_language_code; + } + + /** + * Required. The default language of the agent as a language tag. See + * [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. This field cannot be + * set by the `Update` method. + * + * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDefaultLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->default_language_code = $var; + + return $this; + } + + /** + * Optional. The list of all languages supported by this agent (except for the + * `default_language_code`). + * + * Generated from protobuf field repeated string supported_language_codes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedLanguageCodes() + { + return $this->supported_language_codes; + } + + /** + * Optional. The list of all languages supported by this agent (except for the + * `default_language_code`). + * + * Generated from protobuf field repeated string supported_language_codes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedLanguageCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->supported_language_codes = $arr; + + return $this; + } + + /** + * Required. The time zone of this agent from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. + * + * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Required. The time zone of this agent from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. + * + * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Optional. The description of this agent. + * The maximum length is 500 characters. If exceeded, the request is rejected. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of this agent. + * The maximum length is 500 characters. If exceeded, the request is rejected. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. The URI of the agent's avatar. + * Avatars are used throughout the Dialogflow console and in the self-hosted + * [Web + * Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) + * integration. + * + * Generated from protobuf field string avatar_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAvatarUri() + { + return $this->avatar_uri; + } + + /** + * Optional. The URI of the agent's avatar. + * Avatars are used throughout the Dialogflow console and in the self-hosted + * [Web + * Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) + * integration. + * + * Generated from protobuf field string avatar_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAvatarUri($var) + { + GPBUtil::checkString($var, True); + $this->avatar_uri = $var; + + return $this; + } + + /** + * Optional. Determines whether this agent should log conversation queries. + * + * Generated from protobuf field bool enable_logging = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableLogging() + { + return $this->enable_logging; + } + + /** + * Optional. Determines whether this agent should log conversation queries. + * + * Generated from protobuf field bool enable_logging = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableLogging($var) + { + GPBUtil::checkBool($var); + $this->enable_logging = $var; + + return $this; + } + + /** + * Optional. Determines how intents are detected from user queries. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return int + * @deprecated + */ + public function getMatchMode() + { + @trigger_error('match_mode is deprecated.', E_USER_DEPRECATED); + return $this->match_mode; + } + + /** + * Optional. Determines how intents are detected from user queries. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + * @deprecated + */ + public function setMatchMode($var) + { + @trigger_error('match_mode is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Agent\MatchMode::class); + $this->match_mode = $var; + + return $this; + } + + /** + * Optional. To filter out false positive results and still get variety in + * matched natural language inputs for your agent, you can tune the machine + * learning classification threshold. If the returned score value is less than + * the threshold value, then a fallback intent will be triggered or, if there + * are no fallback intents defined, no intent will be triggered. The score + * values range from 0.0 (completely uncertain) to 1.0 (completely certain). + * If set to 0.0, the default of 0.3 is used. + * + * Generated from protobuf field float classification_threshold = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getClassificationThreshold() + { + return $this->classification_threshold; + } + + /** + * Optional. To filter out false positive results and still get variety in + * matched natural language inputs for your agent, you can tune the machine + * learning classification threshold. If the returned score value is less than + * the threshold value, then a fallback intent will be triggered or, if there + * are no fallback intents defined, no intent will be triggered. The score + * values range from 0.0 (completely uncertain) to 1.0 (completely certain). + * If set to 0.0, the default of 0.3 is used. + * + * Generated from protobuf field float classification_threshold = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setClassificationThreshold($var) + { + GPBUtil::checkFloat($var); + $this->classification_threshold = $var; + + return $this; + } + + /** + * Optional. API version displayed in Dialogflow console. If not specified, + * V2 API is assumed. Clients are free to query different service endpoints + * for different API versions. However, bots connectors and webhook calls will + * follow the specified API version. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.ApiVersion api_version = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Optional. API version displayed in Dialogflow console. If not specified, + * V2 API is assumed. Clients are free to query different service endpoints + * for different API versions. However, bots connectors and webhook calls will + * follow the specified API version. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.ApiVersion api_version = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Agent\ApiVersion::class); + $this->api_version = $var; + + return $this; + } + + /** + * Optional. The agent tier. If not specified, TIER_STANDARD is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.Tier tier = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTier() + { + return $this->tier; + } + + /** + * Optional. The agent tier. If not specified, TIER_STANDARD is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.Tier tier = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Agent\Tier::class); + $this->tier = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/ApiVersion.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/ApiVersion.php new file mode 100644 index 000000000000..39e0da50ffd4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/ApiVersion.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.Agent.ApiVersion + */ +class ApiVersion +{ + /** + * Not specified. + * + * Generated from protobuf enum API_VERSION_UNSPECIFIED = 0; + */ + const API_VERSION_UNSPECIFIED = 0; + /** + * Legacy V1 API. + * + * Generated from protobuf enum API_VERSION_V1 = 1; + */ + const API_VERSION_V1 = 1; + /** + * V2 API. + * + * Generated from protobuf enum API_VERSION_V2 = 2; + */ + const API_VERSION_V2 = 2; + /** + * V2beta1 API. + * + * Generated from protobuf enum API_VERSION_V2_BETA_1 = 3; + */ + const API_VERSION_V2_BETA_1 = 3; + + private static $valueToName = [ + self::API_VERSION_UNSPECIFIED => 'API_VERSION_UNSPECIFIED', + self::API_VERSION_V1 => 'API_VERSION_V1', + self::API_VERSION_V2 => 'API_VERSION_V2', + self::API_VERSION_V2_BETA_1 => 'API_VERSION_V2_BETA_1', + ]; + + 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(ApiVersion::class, \Google\Cloud\Dialogflow\V2\Agent_ApiVersion::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/MatchMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/MatchMode.php new file mode 100644 index 000000000000..e1e08fd21806 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/MatchMode.php @@ -0,0 +1,66 @@ +google.cloud.dialogflow.v2.Agent.MatchMode + */ +class MatchMode +{ + /** + * Not specified. + * + * Generated from protobuf enum MATCH_MODE_UNSPECIFIED = 0; + */ + const MATCH_MODE_UNSPECIFIED = 0; + /** + * Best for agents with a small number of examples in intents and/or wide + * use of templates syntax and composite entities. + * + * Generated from protobuf enum MATCH_MODE_HYBRID = 1; + */ + const MATCH_MODE_HYBRID = 1; + /** + * Can be used for agents with a large number of examples in intents, + * especially the ones using @sys.any or very large custom entities. + * + * Generated from protobuf enum MATCH_MODE_ML_ONLY = 2; + */ + const MATCH_MODE_ML_ONLY = 2; + + private static $valueToName = [ + self::MATCH_MODE_UNSPECIFIED => 'MATCH_MODE_UNSPECIFIED', + self::MATCH_MODE_HYBRID => 'MATCH_MODE_HYBRID', + self::MATCH_MODE_ML_ONLY => 'MATCH_MODE_ML_ONLY', + ]; + + 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(MatchMode::class, \Google\Cloud\Dialogflow\V2\Agent_MatchMode::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/Tier.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/Tier.php new file mode 100644 index 000000000000..c20b42316e00 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/Tier.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.Agent.Tier + */ +class Tier +{ + /** + * Not specified. This value should never be used. + * + * Generated from protobuf enum TIER_UNSPECIFIED = 0; + */ + const TIER_UNSPECIFIED = 0; + /** + * Trial Edition, previously known as Standard Edition. + * + * Generated from protobuf enum TIER_STANDARD = 1; + */ + const TIER_STANDARD = 1; + /** + * Essentials Edition, previously known as Enterprise Essential Edition. + * + * Generated from protobuf enum TIER_ENTERPRISE = 2; + */ + const TIER_ENTERPRISE = 2; + /** + * Essentials Edition (same as TIER_ENTERPRISE), previously known as + * Enterprise Plus Edition. + * + * Generated from protobuf enum TIER_ENTERPRISE_PLUS = 3 [deprecated = true]; + */ + const TIER_ENTERPRISE_PLUS = 3; + + private static $valueToName = [ + self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', + self::TIER_STANDARD => 'TIER_STANDARD', + self::TIER_ENTERPRISE => 'TIER_ENTERPRISE', + self::TIER_ENTERPRISE_PLUS => 'TIER_ENTERPRISE_PLUS', + ]; + + 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(Tier::class, \Google\Cloud\Dialogflow\V2\Agent_Tier::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback.php new file mode 100644 index 000000000000..0317768299a3 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback.php @@ -0,0 +1,243 @@ +google.cloud.dialogflow.v2.AgentAssistantFeedback + */ +class AgentAssistantFeedback extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether or not the suggested answer is relevant. + * For example: + * * Query: "Can I change my mailing address?" + * * Suggested document says: "Items must be returned/exchanged within 60 + * days of the purchase date." + * * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance answer_relevance = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $answer_relevance = 0; + /** + * Optional. Whether or not the information in the document is correct. + * For example: + * * Query: "Can I return the package in 2 days once received?" + * * Suggested document says: "Items must be returned/exchanged within 60 + * days of the purchase date." + * * Ground truth: "No return or exchange is allowed." + * * [document_correctness]: INCORRECT + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness document_correctness = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $document_correctness = 0; + /** + * Optional. Whether or not the suggested document is efficient. For example, + * if the document is poorly written, hard to understand, hard to use or + * too long to find useful information, + * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] + * is + * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency document_efficiency = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $document_efficiency = 0; + /** + * Optional. Feedback for conversation summarization. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback summarization_feedback = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $summarization_feedback = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $answer_relevance + * Optional. Whether or not the suggested answer is relevant. + * For example: + * * Query: "Can I change my mailing address?" + * * Suggested document says: "Items must be returned/exchanged within 60 + * days of the purchase date." + * * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] + * @type int $document_correctness + * Optional. Whether or not the information in the document is correct. + * For example: + * * Query: "Can I return the package in 2 days once received?" + * * Suggested document says: "Items must be returned/exchanged within 60 + * days of the purchase date." + * * Ground truth: "No return or exchange is allowed." + * * [document_correctness]: INCORRECT + * @type int $document_efficiency + * Optional. Whether or not the suggested document is efficient. For example, + * if the document is poorly written, hard to understand, hard to use or + * too long to find useful information, + * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] + * is + * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. + * @type \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback $summarization_feedback + * Optional. Feedback for conversation summarization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether or not the suggested answer is relevant. + * For example: + * * Query: "Can I change my mailing address?" + * * Suggested document says: "Items must be returned/exchanged within 60 + * days of the purchase date." + * * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance answer_relevance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAnswerRelevance() + { + return $this->answer_relevance; + } + + /** + * Optional. Whether or not the suggested answer is relevant. + * For example: + * * Query: "Can I change my mailing address?" + * * Suggested document says: "Items must be returned/exchanged within 60 + * days of the purchase date." + * * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance answer_relevance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAnswerRelevance($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\AnswerRelevance::class); + $this->answer_relevance = $var; + + return $this; + } + + /** + * Optional. Whether or not the information in the document is correct. + * For example: + * * Query: "Can I return the package in 2 days once received?" + * * Suggested document says: "Items must be returned/exchanged within 60 + * days of the purchase date." + * * Ground truth: "No return or exchange is allowed." + * * [document_correctness]: INCORRECT + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness document_correctness = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDocumentCorrectness() + { + return $this->document_correctness; + } + + /** + * Optional. Whether or not the information in the document is correct. + * For example: + * * Query: "Can I return the package in 2 days once received?" + * * Suggested document says: "Items must be returned/exchanged within 60 + * days of the purchase date." + * * Ground truth: "No return or exchange is allowed." + * * [document_correctness]: INCORRECT + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness document_correctness = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDocumentCorrectness($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\DocumentCorrectness::class); + $this->document_correctness = $var; + + return $this; + } + + /** + * Optional. Whether or not the suggested document is efficient. For example, + * if the document is poorly written, hard to understand, hard to use or + * too long to find useful information, + * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] + * is + * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency document_efficiency = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDocumentEfficiency() + { + return $this->document_efficiency; + } + + /** + * Optional. Whether or not the suggested document is efficient. For example, + * if the document is poorly written, hard to understand, hard to use or + * too long to find useful information, + * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] + * is + * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency document_efficiency = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDocumentEfficiency($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\DocumentEfficiency::class); + $this->document_efficiency = $var; + + return $this; + } + + /** + * Optional. Feedback for conversation summarization. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback summarization_feedback = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback|null + */ + public function getSummarizationFeedback() + { + return $this->summarization_feedback; + } + + public function hasSummarizationFeedback() + { + return isset($this->summarization_feedback); + } + + public function clearSummarizationFeedback() + { + unset($this->summarization_feedback); + } + + /** + * Optional. Feedback for conversation summarization. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback summarization_feedback = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback $var + * @return $this + */ + public function setSummarizationFeedback($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback::class); + $this->summarization_feedback = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/AnswerRelevance.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/AnswerRelevance.php new file mode 100644 index 000000000000..f3f32765064b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/AnswerRelevance.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance + */ +class AnswerRelevance +{ + /** + * Answer relevance unspecified. + * + * Generated from protobuf enum ANSWER_RELEVANCE_UNSPECIFIED = 0; + */ + const ANSWER_RELEVANCE_UNSPECIFIED = 0; + /** + * Answer is irrelevant to query. + * + * Generated from protobuf enum IRRELEVANT = 1; + */ + const IRRELEVANT = 1; + /** + * Answer is relevant to query. + * + * Generated from protobuf enum RELEVANT = 2; + */ + const RELEVANT = 2; + + private static $valueToName = [ + self::ANSWER_RELEVANCE_UNSPECIFIED => 'ANSWER_RELEVANCE_UNSPECIFIED', + self::IRRELEVANT => 'IRRELEVANT', + self::RELEVANT => 'RELEVANT', + ]; + + 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(AnswerRelevance::class, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback_AnswerRelevance::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentCorrectness.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentCorrectness.php new file mode 100644 index 000000000000..51a3988cfaa8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentCorrectness.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness + */ +class DocumentCorrectness +{ + /** + * Document correctness unspecified. + * + * Generated from protobuf enum DOCUMENT_CORRECTNESS_UNSPECIFIED = 0; + */ + const DOCUMENT_CORRECTNESS_UNSPECIFIED = 0; + /** + * Information in document is incorrect. + * + * Generated from protobuf enum INCORRECT = 1; + */ + const INCORRECT = 1; + /** + * Information in document is correct. + * + * Generated from protobuf enum CORRECT = 2; + */ + const CORRECT = 2; + + private static $valueToName = [ + self::DOCUMENT_CORRECTNESS_UNSPECIFIED => 'DOCUMENT_CORRECTNESS_UNSPECIFIED', + self::INCORRECT => 'INCORRECT', + self::CORRECT => '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(DocumentCorrectness::class, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback_DocumentCorrectness::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentEfficiency.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentEfficiency.php new file mode 100644 index 000000000000..70517d74d9bb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentEfficiency.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency + */ +class DocumentEfficiency +{ + /** + * Document efficiency unspecified. + * + * Generated from protobuf enum DOCUMENT_EFFICIENCY_UNSPECIFIED = 0; + */ + const DOCUMENT_EFFICIENCY_UNSPECIFIED = 0; + /** + * Document is inefficient. + * + * Generated from protobuf enum INEFFICIENT = 1; + */ + const INEFFICIENT = 1; + /** + * Document is efficient. + * + * Generated from protobuf enum EFFICIENT = 2; + */ + const EFFICIENT = 2; + + private static $valueToName = [ + self::DOCUMENT_EFFICIENCY_UNSPECIFIED => 'DOCUMENT_EFFICIENCY_UNSPECIFIED', + self::INEFFICIENT => 'INEFFICIENT', + self::EFFICIENT => 'EFFICIENT', + ]; + + 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(DocumentEfficiency::class, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback_DocumentEfficiency::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/SummarizationFeedback.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/SummarizationFeedback.php new file mode 100644 index 000000000000..7191a6938718 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/SummarizationFeedback.php @@ -0,0 +1,158 @@ +google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback + */ +class SummarizationFeedback extends \Google\Protobuf\Internal\Message +{ + /** + * Timestamp when composing of the summary starts. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Timestamp when the summary was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + */ + protected $submit_time = null; + /** + * Text of actual submitted summary. + * + * Generated from protobuf field string summary_text = 3; + */ + protected $summary_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Timestamp when composing of the summary starts. + * @type \Google\Protobuf\Timestamp $submit_time + * Timestamp when the summary was submitted. + * @type string $summary_text + * Text of actual submitted summary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); + parent::__construct($data); + } + + /** + * Timestamp when composing of the summary starts. + * + * 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); + } + + /** + * Timestamp when composing of the summary starts. + * + * 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; + } + + /** + * Timestamp when the summary was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * Timestamp when the summary was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + + /** + * Text of actual submitted summary. + * + * Generated from protobuf field string summary_text = 3; + * @return string + */ + public function getSummaryText() + { + return $this->summary_text; + } + + /** + * Text of actual submitted summary. + * + * Generated from protobuf field string summary_text = 3; + * @param string $var + * @return $this + */ + public function setSummaryText($var) + { + GPBUtil::checkString($var, True); + $this->summary_text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SummarizationFeedback::class, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback_SummarizationFeedback::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_AnswerRelevance.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_AnswerRelevance.php new file mode 100644 index 000000000000..584321513a5a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_AnswerRelevance.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.AgentAssistantRecord + */ +class AgentAssistantRecord extends \Google\Protobuf\Internal\Message +{ + protected $answer; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\ArticleAnswer $article_suggestion_answer + * Output only. The article suggestion answer. + * @type \Google\Cloud\Dialogflow\V2\FaqAnswer $faq_answer + * Output only. The FAQ answer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The article suggestion answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ArticleAnswer article_suggestion_answer = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\ArticleAnswer|null + */ + public function getArticleSuggestionAnswer() + { + return $this->readOneof(5); + } + + public function hasArticleSuggestionAnswer() + { + return $this->hasOneof(5); + } + + /** + * Output only. The article suggestion answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ArticleAnswer article_suggestion_answer = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\ArticleAnswer $var + * @return $this + */ + public function setArticleSuggestionAnswer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ArticleAnswer::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. The FAQ answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.FaqAnswer faq_answer = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\FaqAnswer|null + */ + public function getFaqAnswer() + { + return $this->readOneof(6); + } + + public function hasFaqAnswer() + { + return $this->hasOneof(6); + } + + /** + * Output only. The FAQ answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.FaqAnswer faq_answer = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\FaqAnswer $var + * @return $this + */ + public function setFaqAnswer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\FaqAnswer::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getAnswer() + { + return $this->whichOneof("answer"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_ApiVersion.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_ApiVersion.php new file mode 100644 index 000000000000..96aa93c23b6d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_ApiVersion.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Agents/GetAgent', + $argument, + ['\Google\Cloud\Dialogflow\V2\Agent', 'decode'], + $metadata, $options); + } + + /** + * Creates/updates the specified agent. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\SetAgentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetAgent(\Google\Cloud\Dialogflow\V2\SetAgentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/SetAgent', + $argument, + ['\Google\Cloud\Dialogflow\V2\Agent', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified agent. + * @param \Google\Cloud\Dialogflow\V2\DeleteAgentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteAgent(\Google\Cloud\Dialogflow\V2\DeleteAgentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/DeleteAgent', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Returns the list of agents. + * + * Since there is at most one conversational agent per project, this method is + * useful primarily for listing all agents across projects the caller has + * access to. One can achieve that with a wildcard project collection id "-". + * Refer to [List + * Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + * @param \Google\Cloud\Dialogflow\V2\SearchAgentsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SearchAgents(\Google\Cloud\Dialogflow\V2\SearchAgentsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/SearchAgents', + $argument, + ['\Google\Cloud\Dialogflow\V2\SearchAgentsResponse', 'decode'], + $metadata, $options); + } + + /** + * Trains the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\TrainAgentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function TrainAgent(\Google\Cloud\Dialogflow\V2\TrainAgentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/TrainAgent', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Exports the specified agent to a ZIP file. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: + * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse] + * @param \Google\Cloud\Dialogflow\V2\ExportAgentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ExportAgent(\Google\Cloud\Dialogflow\V2\ExportAgentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/ExportAgent', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Imports the specified agent from a ZIP file. + * + * Uploads new intents and entity types without deleting the existing ones. + * Intents and entity types with the same name are replaced with the new + * versions from + * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After + * the import, the imported draft agent will be trained automatically (unless + * disabled in agent settings). However, once the import is done, training may + * not be completed yet. Please call + * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the + * operation it returns in order to train explicitly. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * The operation only tracks when importing is complete, not when it is done + * training. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\ImportAgentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ImportAgent(\Google\Cloud\Dialogflow\V2\ImportAgentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/ImportAgent', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Restores the specified agent from a ZIP file. + * + * Replaces the current agent version with a new one. All the intents and + * entity types in the older version are deleted. After the restore, the + * restored draft agent will be trained automatically (unless disabled in + * agent settings). However, once the restore is done, training may not be + * completed yet. Please call + * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the + * operation it returns in order to train explicitly. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * The operation only tracks when restoring is complete, not when it is done + * training. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\RestoreAgentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RestoreAgent(\Google\Cloud\Dialogflow\V2\RestoreAgentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/RestoreAgent', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets agent validation result. Agent validation is performed during + * training time and is updated automatically when training is completed. + * @param \Google\Cloud\Dialogflow\V2\GetValidationResultRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetValidationResult(\Google\Cloud\Dialogflow\V2\GetValidationResultRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/GetValidationResult', + $argument, + ['\Google\Cloud\Dialogflow\V2\ValidationResult', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentRequest.php new file mode 100644 index 000000000000..6011eb464a7b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentRequest.php @@ -0,0 +1,401 @@ +google.cloud.dialogflow.v2.AnalyzeContentRequest + */ +class AnalyzeContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the participant this text comes from. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $participant = ''; + /** + * Speech synthesis configuration. + * The speech synthesis settings for a virtual agent that may be configured + * for the associated conversation profile are not used when calling + * AnalyzeContent. If this configuration is not supplied, speech synthesis + * is disabled. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5; + */ + protected $reply_audio_config = null; + /** + * Parameters for a Dialogflow virtual-agent query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 9; + */ + protected $query_params = null; + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14; + */ + protected $assist_query_params = null; + /** + * Additional parameters to be put into Dialogflow CX session parameters. To + * remove a parameter from the session, clients should explicitly set the + * parameter value to null. + * Note: this field should only be used if you are connecting to a Dialogflow + * CX agent. + * + * Generated from protobuf field .google.protobuf.Struct cx_parameters = 18; + */ + protected $cx_parameters = null; + /** + * A unique identifier for this request. Restricted to 36 ASCII characters. + * A random UUID is recommended. + * This request is only idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 11; + */ + protected $request_id = ''; + protected $input; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $participant + * Required. The name of the participant this text comes from. + * Format: `projects//locations//conversations//participants/`. + * @type \Google\Cloud\Dialogflow\V2\TextInput $text_input + * The natural language text to be processed. + * @type \Google\Cloud\Dialogflow\V2\EventInput $event_input + * An input event to send to Dialogflow. + * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $reply_audio_config + * Speech synthesis configuration. + * The speech synthesis settings for a virtual agent that may be configured + * for the associated conversation profile are not used when calling + * AnalyzeContent. If this configuration is not supplied, speech synthesis + * is disabled. + * @type \Google\Cloud\Dialogflow\V2\QueryParameters $query_params + * Parameters for a Dialogflow virtual-agent query. + * @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params + * Parameters for a human assist query. + * @type \Google\Protobuf\Struct $cx_parameters + * Additional parameters to be put into Dialogflow CX session parameters. To + * remove a parameter from the session, clients should explicitly set the + * parameter value to null. + * Note: this field should only be used if you are connecting to a Dialogflow + * CX agent. + * @type string $request_id + * A unique identifier for this request. Restricted to 36 ASCII characters. + * A random UUID is recommended. + * This request is only idempotent if a `request_id` is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the participant this text comes from. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParticipant() + { + return $this->participant; + } + + /** + * Required. The name of the participant this text comes from. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParticipant($var) + { + GPBUtil::checkString($var, True); + $this->participant = $var; + + return $this; + } + + /** + * The natural language text to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput text_input = 6; + * @return \Google\Cloud\Dialogflow\V2\TextInput|null + */ + public function getTextInput() + { + return $this->readOneof(6); + } + + public function hasTextInput() + { + return $this->hasOneof(6); + } + + /** + * The natural language text to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput text_input = 6; + * @param \Google\Cloud\Dialogflow\V2\TextInput $var + * @return $this + */ + public function setTextInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextInput::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * An input event to send to Dialogflow. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput event_input = 8; + * @return \Google\Cloud\Dialogflow\V2\EventInput|null + */ + public function getEventInput() + { + return $this->readOneof(8); + } + + public function hasEventInput() + { + return $this->hasOneof(8); + } + + /** + * An input event to send to Dialogflow. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput event_input = 8; + * @param \Google\Cloud\Dialogflow\V2\EventInput $var + * @return $this + */ + public function setEventInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Speech synthesis configuration. + * The speech synthesis settings for a virtual agent that may be configured + * for the associated conversation profile are not used when calling + * AnalyzeContent. If this configuration is not supplied, speech synthesis + * is disabled. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5; + * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null + */ + public function getReplyAudioConfig() + { + return $this->reply_audio_config; + } + + public function hasReplyAudioConfig() + { + return isset($this->reply_audio_config); + } + + public function clearReplyAudioConfig() + { + unset($this->reply_audio_config); + } + + /** + * Speech synthesis configuration. + * The speech synthesis settings for a virtual agent that may be configured + * for the associated conversation profile are not used when calling + * AnalyzeContent. If this configuration is not supplied, speech synthesis + * is disabled. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5; + * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var + * @return $this + */ + public function setReplyAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); + $this->reply_audio_config = $var; + + return $this; + } + + /** + * Parameters for a Dialogflow virtual-agent query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 9; + * @return \Google\Cloud\Dialogflow\V2\QueryParameters|null + */ + public function getQueryParams() + { + return $this->query_params; + } + + public function hasQueryParams() + { + return isset($this->query_params); + } + + public function clearQueryParams() + { + unset($this->query_params); + } + + /** + * Parameters for a Dialogflow virtual-agent query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 9; + * @param \Google\Cloud\Dialogflow\V2\QueryParameters $var + * @return $this + */ + public function setQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class); + $this->query_params = $var; + + return $this; + } + + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14; + * @return \Google\Cloud\Dialogflow\V2\AssistQueryParameters|null + */ + public function getAssistQueryParams() + { + return $this->assist_query_params; + } + + public function hasAssistQueryParams() + { + return isset($this->assist_query_params); + } + + public function clearAssistQueryParams() + { + unset($this->assist_query_params); + } + + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14; + * @param \Google\Cloud\Dialogflow\V2\AssistQueryParameters $var + * @return $this + */ + public function setAssistQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AssistQueryParameters::class); + $this->assist_query_params = $var; + + return $this; + } + + /** + * Additional parameters to be put into Dialogflow CX session parameters. To + * remove a parameter from the session, clients should explicitly set the + * parameter value to null. + * Note: this field should only be used if you are connecting to a Dialogflow + * CX agent. + * + * Generated from protobuf field .google.protobuf.Struct cx_parameters = 18; + * @return \Google\Protobuf\Struct|null + */ + public function getCxParameters() + { + return $this->cx_parameters; + } + + public function hasCxParameters() + { + return isset($this->cx_parameters); + } + + public function clearCxParameters() + { + unset($this->cx_parameters); + } + + /** + * Additional parameters to be put into Dialogflow CX session parameters. To + * remove a parameter from the session, clients should explicitly set the + * parameter value to null. + * Note: this field should only be used if you are connecting to a Dialogflow + * CX agent. + * + * Generated from protobuf field .google.protobuf.Struct cx_parameters = 18; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setCxParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->cx_parameters = $var; + + return $this; + } + + /** + * A unique identifier for this request. Restricted to 36 ASCII characters. + * A random UUID is recommended. + * This request is only idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 11; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A unique identifier for this request. Restricted to 36 ASCII characters. + * A random UUID is recommended. + * This request is only idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 11; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getInput() + { + return $this->whichOneof("input"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentResponse.php new file mode 100644 index 000000000000..7f1ce53b0bd5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentResponse.php @@ -0,0 +1,428 @@ +google.cloud.dialogflow.v2.AnalyzeContentResponse + */ +class AnalyzeContentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The output text content. + * This field is set if the automated agent responded with text to show to + * the user. + * + * Generated from protobuf field string reply_text = 1; + */ + protected $reply_text = ''; + /** + * The audio data bytes encoded as specified in the request. + * This field is set if: + * - `reply_audio_config` was specified in the request, or + * - The automated agent responded with audio to play to the user. In such + * case, `reply_audio.config` contains settings used to synthesize the + * speech. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 2; + */ + protected $reply_audio = null; + /** + * Only set if a Dialogflow automated agent has responded. + * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] + * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] + * instead. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 3; + */ + protected $automated_agent_reply = null; + /** + * Message analyzed by CCAI. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 5; + */ + protected $message = null; + /** + * The suggestions for most recent human agent. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. + * Note that any failure of Agent Assist features will not lead to the overall + * failure of an AnalyzeContent API call. Instead, the features will + * fail silently with the error field set in the corresponding + * SuggestionResult. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 6; + */ + private $human_agent_suggestion_results; + /** + * The suggestions for end user. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. + * Same as human_agent_suggestion_results, any failure of Agent Assist + * features will not lead to the overall failure of an AnalyzeContent API + * call. Instead, the features will fail silently with the error field set in + * the corresponding SuggestionResult. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 7; + */ + private $end_user_suggestion_results; + /** + * Indicates the parameters of DTMF. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 9; + */ + protected $dtmf_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $reply_text + * The output text content. + * This field is set if the automated agent responded with text to show to + * the user. + * @type \Google\Cloud\Dialogflow\V2\OutputAudio $reply_audio + * The audio data bytes encoded as specified in the request. + * This field is set if: + * - `reply_audio_config` was specified in the request, or + * - The automated agent responded with audio to play to the user. In such + * case, `reply_audio.config` contains settings used to synthesize the + * speech. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * @type \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $automated_agent_reply + * Only set if a Dialogflow automated agent has responded. + * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] + * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] + * instead. + * @type \Google\Cloud\Dialogflow\V2\Message $message + * Message analyzed by CCAI. + * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $human_agent_suggestion_results + * The suggestions for most recent human agent. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. + * Note that any failure of Agent Assist features will not lead to the overall + * failure of an AnalyzeContent API call. Instead, the features will + * fail silently with the error field set in the corresponding + * SuggestionResult. + * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $end_user_suggestion_results + * The suggestions for end user. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. + * Same as human_agent_suggestion_results, any failure of Agent Assist + * features will not lead to the overall failure of an AnalyzeContent API + * call. Instead, the features will fail silently with the error field set in + * the corresponding SuggestionResult. + * @type \Google\Cloud\Dialogflow\V2\DtmfParameters $dtmf_parameters + * Indicates the parameters of DTMF. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * The output text content. + * This field is set if the automated agent responded with text to show to + * the user. + * + * Generated from protobuf field string reply_text = 1; + * @return string + */ + public function getReplyText() + { + return $this->reply_text; + } + + /** + * The output text content. + * This field is set if the automated agent responded with text to show to + * the user. + * + * Generated from protobuf field string reply_text = 1; + * @param string $var + * @return $this + */ + public function setReplyText($var) + { + GPBUtil::checkString($var, True); + $this->reply_text = $var; + + return $this; + } + + /** + * The audio data bytes encoded as specified in the request. + * This field is set if: + * - `reply_audio_config` was specified in the request, or + * - The automated agent responded with audio to play to the user. In such + * case, `reply_audio.config` contains settings used to synthesize the + * speech. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 2; + * @return \Google\Cloud\Dialogflow\V2\OutputAudio|null + */ + public function getReplyAudio() + { + return $this->reply_audio; + } + + public function hasReplyAudio() + { + return isset($this->reply_audio); + } + + public function clearReplyAudio() + { + unset($this->reply_audio); + } + + /** + * The audio data bytes encoded as specified in the request. + * This field is set if: + * - `reply_audio_config` was specified in the request, or + * - The automated agent responded with audio to play to the user. In such + * case, `reply_audio.config` contains settings used to synthesize the + * speech. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 2; + * @param \Google\Cloud\Dialogflow\V2\OutputAudio $var + * @return $this + */ + public function setReplyAudio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudio::class); + $this->reply_audio = $var; + + return $this; + } + + /** + * Only set if a Dialogflow automated agent has responded. + * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] + * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] + * instead. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 3; + * @return \Google\Cloud\Dialogflow\V2\AutomatedAgentReply|null + */ + public function getAutomatedAgentReply() + { + return $this->automated_agent_reply; + } + + public function hasAutomatedAgentReply() + { + return isset($this->automated_agent_reply); + } + + public function clearAutomatedAgentReply() + { + unset($this->automated_agent_reply); + } + + /** + * Only set if a Dialogflow automated agent has responded. + * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] + * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] + * instead. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 3; + * @param \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $var + * @return $this + */ + public function setAutomatedAgentReply($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AutomatedAgentReply::class); + $this->automated_agent_reply = $var; + + return $this; + } + + /** + * Message analyzed by CCAI. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 5; + * @return \Google\Cloud\Dialogflow\V2\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * Message analyzed by CCAI. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 5; + * @param \Google\Cloud\Dialogflow\V2\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Message::class); + $this->message = $var; + + return $this; + } + + /** + * The suggestions for most recent human agent. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. + * Note that any failure of Agent Assist features will not lead to the overall + * failure of an AnalyzeContent API call. Instead, the features will + * fail silently with the error field set in the corresponding + * SuggestionResult. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHumanAgentSuggestionResults() + { + return $this->human_agent_suggestion_results; + } + + /** + * The suggestions for most recent human agent. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. + * Note that any failure of Agent Assist features will not lead to the overall + * failure of an AnalyzeContent API call. Instead, the features will + * fail silently with the error field set in the corresponding + * SuggestionResult. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 6; + * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHumanAgentSuggestionResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); + $this->human_agent_suggestion_results = $arr; + + return $this; + } + + /** + * The suggestions for end user. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. + * Same as human_agent_suggestion_results, any failure of Agent Assist + * features will not lead to the overall failure of an AnalyzeContent API + * call. Instead, the features will fail silently with the error field set in + * the corresponding SuggestionResult. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndUserSuggestionResults() + { + return $this->end_user_suggestion_results; + } + + /** + * The suggestions for end user. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. + * Same as human_agent_suggestion_results, any failure of Agent Assist + * features will not lead to the overall failure of an AnalyzeContent API + * call. Instead, the features will fail silently with the error field set in + * the corresponding SuggestionResult. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 7; + * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndUserSuggestionResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); + $this->end_user_suggestion_results = $arr; + + return $this; + } + + /** + * Indicates the parameters of DTMF. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 9; + * @return \Google\Cloud\Dialogflow\V2\DtmfParameters|null + */ + public function getDtmfParameters() + { + return $this->dtmf_parameters; + } + + public function hasDtmfParameters() + { + return isset($this->dtmf_parameters); + } + + public function clearDtmfParameters() + { + unset($this->dtmf_parameters); + } + + /** + * Indicates the parameters of DTMF. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 9; + * @param \Google\Cloud\Dialogflow\V2\DtmfParameters $var + * @return $this + */ + public function setDtmfParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\DtmfParameters::class); + $this->dtmf_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnnotatedMessagePart.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnnotatedMessagePart.php new file mode 100644 index 000000000000..932abff578cc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnnotatedMessagePart.php @@ -0,0 +1,195 @@ +google.cloud.dialogflow.v2.AnnotatedMessagePart + */ +class AnnotatedMessagePart extends \Google\Protobuf\Internal\Message +{ + /** + * A part of a message possibly annotated with an entity. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * The [Dialogflow system entity + * type](https://cloud.google.com/dialogflow/docs/reference/system-entities) + * of this message part. If this is empty, Dialogflow could not annotate the + * phrase part with a system entity. + * + * Generated from protobuf field string entity_type = 2; + */ + protected $entity_type = ''; + /** + * The [Dialogflow system entity formatted value + * ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of + * this message part. For example for a system entity of type + * `@sys.unit-currency`, this may contain: + *
+     * {
+     *   "amount": 5,
+     *   "currency": "USD"
+     * }
+     * 
+ * + * Generated from protobuf field .google.protobuf.Value formatted_value = 3; + */ + protected $formatted_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * A part of a message possibly annotated with an entity. + * @type string $entity_type + * The [Dialogflow system entity + * type](https://cloud.google.com/dialogflow/docs/reference/system-entities) + * of this message part. If this is empty, Dialogflow could not annotate the + * phrase part with a system entity. + * @type \Google\Protobuf\Value $formatted_value + * The [Dialogflow system entity formatted value + * ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of + * this message part. For example for a system entity of type + * `@sys.unit-currency`, this may contain: + *
+     *           {
+     *             "amount": 5,
+     *             "currency": "USD"
+     *           }
+     *           
+ * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * A part of a message possibly annotated with an entity. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * A part of a message possibly annotated with an entity. + * + * 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 [Dialogflow system entity + * type](https://cloud.google.com/dialogflow/docs/reference/system-entities) + * of this message part. If this is empty, Dialogflow could not annotate the + * phrase part with a system entity. + * + * Generated from protobuf field string entity_type = 2; + * @return string + */ + public function getEntityType() + { + return $this->entity_type; + } + + /** + * The [Dialogflow system entity + * type](https://cloud.google.com/dialogflow/docs/reference/system-entities) + * of this message part. If this is empty, Dialogflow could not annotate the + * phrase part with a system entity. + * + * Generated from protobuf field string entity_type = 2; + * @param string $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkString($var, True); + $this->entity_type = $var; + + return $this; + } + + /** + * The [Dialogflow system entity formatted value + * ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of + * this message part. For example for a system entity of type + * `@sys.unit-currency`, this may contain: + *
+     * {
+     *   "amount": 5,
+     *   "currency": "USD"
+     * }
+     * 
+ * + * Generated from protobuf field .google.protobuf.Value formatted_value = 3; + * @return \Google\Protobuf\Value|null + */ + public function getFormattedValue() + { + return $this->formatted_value; + } + + public function hasFormattedValue() + { + return isset($this->formatted_value); + } + + public function clearFormattedValue() + { + unset($this->formatted_value); + } + + /** + * The [Dialogflow system entity formatted value + * ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of + * this message part. For example for a system entity of type + * `@sys.unit-currency`, this may contain: + *
+     * {
+     *   "amount": 5,
+     *   "currency": "USD"
+     * }
+     * 
+ * + * Generated from protobuf field .google.protobuf.Value formatted_value = 3; + * @param \Google\Protobuf\Value $var + * @return $this + */ + public function setFormattedValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); + $this->formatted_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback.php new file mode 100644 index 000000000000..fd0fcc0f850b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback.php @@ -0,0 +1,274 @@ +google.cloud.dialogflow.v2.AnswerFeedback + */ +class AnswerFeedback extends \Google\Protobuf\Internal\Message +{ + /** + * The correctness level of the specific answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel correctness_level = 1; + */ + protected $correctness_level = 0; + /** + * Indicates whether the answer/item was clicked by the human agent + * or not. Default to false. + * + * Generated from protobuf field bool clicked = 3; + */ + protected $clicked = false; + /** + * Time when the answer/item was clicked. + * + * Generated from protobuf field .google.protobuf.Timestamp click_time = 5; + */ + protected $click_time = null; + /** + * Indicates whether the answer/item was displayed to the human + * agent in the agent desktop UI. Default to false. + * + * Generated from protobuf field bool displayed = 4; + */ + protected $displayed = false; + /** + * Time when the answer/item was displayed. + * + * Generated from protobuf field .google.protobuf.Timestamp display_time = 6; + */ + protected $display_time = null; + protected $detail_feedback; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $correctness_level + * The correctness level of the specific answer. + * @type \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback $agent_assistant_detail_feedback + * Detail feedback of agent assist suggestions. + * @type bool $clicked + * Indicates whether the answer/item was clicked by the human agent + * or not. Default to false. + * @type \Google\Protobuf\Timestamp $click_time + * Time when the answer/item was clicked. + * @type bool $displayed + * Indicates whether the answer/item was displayed to the human + * agent in the agent desktop UI. Default to false. + * @type \Google\Protobuf\Timestamp $display_time + * Time when the answer/item was displayed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); + parent::__construct($data); + } + + /** + * The correctness level of the specific answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel correctness_level = 1; + * @return int + */ + public function getCorrectnessLevel() + { + return $this->correctness_level; + } + + /** + * The correctness level of the specific answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel correctness_level = 1; + * @param int $var + * @return $this + */ + public function setCorrectnessLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AnswerFeedback\CorrectnessLevel::class); + $this->correctness_level = $var; + + return $this; + } + + /** + * Detail feedback of agent assist suggestions. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback agent_assistant_detail_feedback = 2; + * @return \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback|null + */ + public function getAgentAssistantDetailFeedback() + { + return $this->readOneof(2); + } + + public function hasAgentAssistantDetailFeedback() + { + return $this->hasOneof(2); + } + + /** + * Detail feedback of agent assist suggestions. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback agent_assistant_detail_feedback = 2; + * @param \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback $var + * @return $this + */ + public function setAgentAssistantDetailFeedback($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Indicates whether the answer/item was clicked by the human agent + * or not. Default to false. + * + * Generated from protobuf field bool clicked = 3; + * @return bool + */ + public function getClicked() + { + return $this->clicked; + } + + /** + * Indicates whether the answer/item was clicked by the human agent + * or not. Default to false. + * + * Generated from protobuf field bool clicked = 3; + * @param bool $var + * @return $this + */ + public function setClicked($var) + { + GPBUtil::checkBool($var); + $this->clicked = $var; + + return $this; + } + + /** + * Time when the answer/item was clicked. + * + * Generated from protobuf field .google.protobuf.Timestamp click_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getClickTime() + { + return $this->click_time; + } + + public function hasClickTime() + { + return isset($this->click_time); + } + + public function clearClickTime() + { + unset($this->click_time); + } + + /** + * Time when the answer/item was clicked. + * + * Generated from protobuf field .google.protobuf.Timestamp click_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setClickTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->click_time = $var; + + return $this; + } + + /** + * Indicates whether the answer/item was displayed to the human + * agent in the agent desktop UI. Default to false. + * + * Generated from protobuf field bool displayed = 4; + * @return bool + */ + public function getDisplayed() + { + return $this->displayed; + } + + /** + * Indicates whether the answer/item was displayed to the human + * agent in the agent desktop UI. Default to false. + * + * Generated from protobuf field bool displayed = 4; + * @param bool $var + * @return $this + */ + public function setDisplayed($var) + { + GPBUtil::checkBool($var); + $this->displayed = $var; + + return $this; + } + + /** + * Time when the answer/item was displayed. + * + * Generated from protobuf field .google.protobuf.Timestamp display_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDisplayTime() + { + return $this->display_time; + } + + public function hasDisplayTime() + { + return isset($this->display_time); + } + + public function clearDisplayTime() + { + unset($this->display_time); + } + + /** + * Time when the answer/item was displayed. + * + * Generated from protobuf field .google.protobuf.Timestamp display_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDisplayTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->display_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getDetailFeedback() + { + return $this->whichOneof("detail_feedback"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback/CorrectnessLevel.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback/CorrectnessLevel.php new file mode 100644 index 000000000000..638d5f1b0759 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback/CorrectnessLevel.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.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\Dialogflow\V2\AnswerFeedback_CorrectnessLevel::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback_CorrectnessLevel.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback_CorrectnessLevel.php new file mode 100644 index 000000000000..c532415ef10f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback_CorrectnessLevel.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.AnswerRecord + */ +class AnswerRecord extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of this answer record. + * Format: `projects//locations//answerRecords/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The AnswerFeedback for this record. You can set this with + * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] + * in order to give us feedback about this answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback answer_feedback = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $answer_feedback = null; + protected $record; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of this answer record. + * Format: `projects//locations//answerRecords/`. + * @type \Google\Cloud\Dialogflow\V2\AnswerFeedback $answer_feedback + * Required. The AnswerFeedback for this record. You can set this with + * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] + * in order to give us feedback about this answer. + * @type \Google\Cloud\Dialogflow\V2\AgentAssistantRecord $agent_assistant_record + * Output only. The record for human agent assistant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of this answer record. + * Format: `projects//locations//answerRecords/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of this answer record. + * Format: `projects//locations//answerRecords/`. + * + * 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; + } + + /** + * Required. The AnswerFeedback for this record. You can set this with + * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] + * in order to give us feedback about this answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback answer_feedback = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\AnswerFeedback|null + */ + public function getAnswerFeedback() + { + return $this->answer_feedback; + } + + public function hasAnswerFeedback() + { + return isset($this->answer_feedback); + } + + public function clearAnswerFeedback() + { + unset($this->answer_feedback); + } + + /** + * Required. The AnswerFeedback for this record. You can set this with + * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] + * in order to give us feedback about this answer. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback answer_feedback = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\AnswerFeedback $var + * @return $this + */ + public function setAnswerFeedback($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AnswerFeedback::class); + $this->answer_feedback = $var; + + return $this; + } + + /** + * Output only. The record for human agent assistant. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantRecord agent_assistant_record = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\AgentAssistantRecord|null + */ + public function getAgentAssistantRecord() + { + return $this->readOneof(4); + } + + public function hasAgentAssistantRecord() + { + return $this->hasOneof(4); + } + + /** + * Output only. The record for human agent assistant. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantRecord agent_assistant_record = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\AgentAssistantRecord $var + * @return $this + */ + public function setAgentAssistantRecord($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AgentAssistantRecord::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getRecord() + { + return $this->whichOneof("record"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecordsGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecordsGrpcClient.php new file mode 100644 index 000000000000..2adc9fa6702f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecordsGrpcClient.php @@ -0,0 +1,67 @@ +_simpleRequest('/google.cloud.dialogflow.v2.AnswerRecords/ListAnswerRecords', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListAnswerRecordsResponse', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified answer record. + * @param \Google\Cloud\Dialogflow\V2\UpdateAnswerRecordRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateAnswerRecord(\Google\Cloud\Dialogflow\V2\UpdateAnswerRecordRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.AnswerRecords/UpdateAnswerRecord', + $argument, + ['\Google\Cloud\Dialogflow\V2\AnswerRecord', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleAnswer.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleAnswer.php new file mode 100644 index 000000000000..ecbdd73bdf6a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleAnswer.php @@ -0,0 +1,261 @@ +google.cloud.dialogflow.v2.ArticleAnswer + */ +class ArticleAnswer extends \Google\Protobuf\Internal\Message +{ + /** + * The article title. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * The article URI. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Article snippets. + * + * Generated from protobuf field repeated string snippets = 3; + */ + private $snippets; + /** + * Article match confidence. + * The system's confidence score that this article is a good match for this + * conversation, as a value from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + /** + * A map that contains metadata about the answer and the + * document from which it originates. + * + * Generated from protobuf field map metadata = 5; + */ + private $metadata; + /** + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * + * Generated from protobuf field string answer_record = 6; + */ + protected $answer_record = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * The article title. + * @type string $uri + * The article URI. + * @type array|\Google\Protobuf\Internal\RepeatedField $snippets + * Article snippets. + * @type float $confidence + * Article match confidence. + * The system's confidence score that this article is a good match for this + * conversation, as a value from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * @type array|\Google\Protobuf\Internal\MapField $metadata + * A map that contains metadata about the answer and the + * document from which it originates. + * @type string $answer_record + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * The article title. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The 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; + } + + /** + * The article URI. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The 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; + } + + /** + * Article snippets. + * + * Generated from protobuf field repeated string snippets = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSnippets() + { + return $this->snippets; + } + + /** + * Article snippets. + * + * Generated from protobuf field repeated string snippets = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSnippets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->snippets = $arr; + + return $this; + } + + /** + * Article match confidence. + * The system's confidence score that this article is a good match for this + * conversation, as a value from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Article match confidence. + * The system's confidence score that this article is a good match for this + * conversation, as a value from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * A map that contains metadata about the answer and the + * document from which it originates. + * + * Generated from protobuf field map metadata = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * A map that contains metadata about the answer and the + * document from which it originates. + * + * Generated from protobuf field map metadata = 5; + * @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 answer record, in the format of + * "projects//locations//answerRecords/" + * + * Generated from protobuf field string answer_record = 6; + * @return string + */ + public function getAnswerRecord() + { + return $this->answer_record; + } + + /** + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * + * Generated from protobuf field string answer_record = 6; + * @param string $var + * @return $this + */ + public function setAnswerRecord($var) + { + GPBUtil::checkString($var, True); + $this->answer_record = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleSuggestionModelMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleSuggestionModelMetadata.php new file mode 100644 index 000000000000..615d7a2cde86 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleSuggestionModelMetadata.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + */ +class ArticleSuggestionModelMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Type of the article suggestion model. If not provided, model_type + * is used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $training_model_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $training_model_type + * Optional. Type of the article suggestion model. If not provided, model_type + * is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Type of the article suggestion model. If not provided, model_type + * is used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTrainingModelType() + { + return $this->training_model_type; + } + + /** + * Optional. Type of the article suggestion model. If not provided, model_type + * is used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTrainingModelType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationModel\ModelType::class); + $this->training_model_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AssistQueryParameters.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AssistQueryParameters.php new file mode 100644 index 000000000000..2deb569bf5cd --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AssistQueryParameters.php @@ -0,0 +1,131 @@ +google.cloud.dialogflow.v2.AssistQueryParameters + */ +class AssistQueryParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Key-value filters on the metadata of documents returned by article + * suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * values for a metadata key should be concatenated by comma. For example, + * filters to match all documents that have 'US' or 'CA' in their market + * metadata values and 'agent' in their user metadata values will be + * ``` + * documents_metadata_filters { + * key: "market" + * value: "US,CA" + * } + * documents_metadata_filters { + * key: "user" + * value: "agent" + * } + * ``` + * + * Generated from protobuf field map documents_metadata_filters = 1; + */ + private $documents_metadata_filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $documents_metadata_filters + * Key-value filters on the metadata of documents returned by article + * suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * values for a metadata key should be concatenated by comma. For example, + * filters to match all documents that have 'US' or 'CA' in their market + * metadata values and 'agent' in their user metadata values will be + * ``` + * documents_metadata_filters { + * key: "market" + * value: "US,CA" + * } + * documents_metadata_filters { + * key: "user" + * value: "agent" + * } + * ``` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Key-value filters on the metadata of documents returned by article + * suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * values for a metadata key should be concatenated by comma. For example, + * filters to match all documents that have 'US' or 'CA' in their market + * metadata values and 'agent' in their user metadata values will be + * ``` + * documents_metadata_filters { + * key: "market" + * value: "US,CA" + * } + * documents_metadata_filters { + * key: "user" + * value: "agent" + * } + * ``` + * + * Generated from protobuf field map documents_metadata_filters = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDocumentsMetadataFilters() + { + return $this->documents_metadata_filters; + } + + /** + * Key-value filters on the metadata of documents returned by article + * suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * values for a metadata key should be concatenated by comma. For example, + * filters to match all documents that have 'US' or 'CA' in their market + * metadata values and 'agent' in their user metadata values will be + * ``` + * documents_metadata_filters { + * key: "market" + * value: "US,CA" + * } + * documents_metadata_filters { + * key: "user" + * value: "agent" + * } + * ``` + * + * Generated from protobuf field map documents_metadata_filters = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDocumentsMetadataFilters($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->documents_metadata_filters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AudioEncoding.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AudioEncoding.php new file mode 100644 index 000000000000..ee0084582a04 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AudioEncoding.php @@ -0,0 +1,118 @@ +google.cloud.dialogflow.v2.AudioEncoding + */ +class AudioEncoding +{ + /** + * Not specified. + * + * Generated from protobuf enum AUDIO_ENCODING_UNSPECIFIED = 0; + */ + const AUDIO_ENCODING_UNSPECIFIED = 0; + /** + * Uncompressed 16-bit signed little-endian samples (Linear PCM). + * + * Generated from protobuf enum AUDIO_ENCODING_LINEAR_16 = 1; + */ + const AUDIO_ENCODING_LINEAR_16 = 1; + /** + * [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio + * Codec) is the recommended encoding because it is lossless (therefore + * recognition is not compromised) and requires only about half the + * bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and + * 24-bit samples, however, not all fields in `STREAMINFO` are supported. + * + * Generated from protobuf enum AUDIO_ENCODING_FLAC = 2; + */ + const AUDIO_ENCODING_FLAC = 2; + /** + * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + * + * Generated from protobuf enum AUDIO_ENCODING_MULAW = 3; + */ + const AUDIO_ENCODING_MULAW = 3; + /** + * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + * + * Generated from protobuf enum AUDIO_ENCODING_AMR = 4; + */ + const AUDIO_ENCODING_AMR = 4; + /** + * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + * + * Generated from protobuf enum AUDIO_ENCODING_AMR_WB = 5; + */ + const AUDIO_ENCODING_AMR_WB = 5; + /** + * Opus encoded audio frames in Ogg container + * ([OggOpus](https://wiki.xiph.org/OggOpus)). + * `sample_rate_hertz` must be 16000. + * + * Generated from protobuf enum AUDIO_ENCODING_OGG_OPUS = 6; + */ + const AUDIO_ENCODING_OGG_OPUS = 6; + /** + * Although the use of lossy encodings is not recommended, if a very low + * bitrate encoding is required, `OGG_OPUS` is highly preferred over + * Speex encoding. The [Speex](https://speex.org/) encoding supported by + * Dialogflow API has a header byte in each block, as in MIME type + * `audio/x-speex-with-header-byte`. + * It is a variant of the RTP Speex encoding defined in + * [RFC 5574](https://tools.ietf.org/html/rfc5574). + * The stream is a sequence of blocks, one block per RTP packet. Each block + * starts with a byte containing the length of the block, in bytes, followed + * by one or more frames of Speex data, padded to an integral number of + * bytes (octets) as specified in RFC 5574. In other words, each RTP header + * is replaced with a single byte containing the block length. Only Speex + * wideband is supported. `sample_rate_hertz` must be 16000. + * + * Generated from protobuf enum AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; + */ + const AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; + + private static $valueToName = [ + self::AUDIO_ENCODING_UNSPECIFIED => 'AUDIO_ENCODING_UNSPECIFIED', + self::AUDIO_ENCODING_LINEAR_16 => 'AUDIO_ENCODING_LINEAR_16', + self::AUDIO_ENCODING_FLAC => 'AUDIO_ENCODING_FLAC', + self::AUDIO_ENCODING_MULAW => 'AUDIO_ENCODING_MULAW', + self::AUDIO_ENCODING_AMR => 'AUDIO_ENCODING_AMR', + self::AUDIO_ENCODING_AMR_WB => 'AUDIO_ENCODING_AMR_WB', + self::AUDIO_ENCODING_OGG_OPUS => 'AUDIO_ENCODING_OGG_OPUS', + self::AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE => 'AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE', + ]; + + 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentConfig.php new file mode 100644 index 000000000000..47b38e2db2d6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentConfig.php @@ -0,0 +1,119 @@ +google.cloud.dialogflow.v2.AutomatedAgentConfig + */ +class AutomatedAgentConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. ID of the Dialogflow agent environment to use. + * This project needs to either be the same project as the conversation or you + * need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API + * Service Agent` role in this project. + * - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not + * specified, the default `draft` environment is used. Refer to + * [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) + * for more details. + * - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment + * is used. + * + * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $agent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agent + * Required. ID of the Dialogflow agent environment to use. + * This project needs to either be the same project as the conversation or you + * need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API + * Service Agent` role in this project. + * - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not + * specified, the default `draft` environment is used. Refer to + * [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) + * for more details. + * - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment + * is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. ID of the Dialogflow agent environment to use. + * This project needs to either be the same project as the conversation or you + * need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API + * Service Agent` role in this project. + * - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not + * specified, the default `draft` environment is used. Refer to + * [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) + * for more details. + * - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment + * is used. + * + * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAgent() + { + return $this->agent; + } + + /** + * Required. ID of the Dialogflow agent environment to use. + * This project needs to either be the same project as the conversation or you + * need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API + * Service Agent` role in this project. + * - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not + * specified, the default `draft` environment is used. Refer to + * [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) + * for more details. + * - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment + * is used. + * + * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAgent($var) + { + GPBUtil::checkString($var, True); + $this->agent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply.php new file mode 100644 index 000000000000..a7eb6d7bb899 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply.php @@ -0,0 +1,203 @@ +google.cloud.dialogflow.v2.AutomatedAgentReply + */ +class AutomatedAgentReply extends \Google\Protobuf\Internal\Message +{ + /** + * Response of the Dialogflow + * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] + * call. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.DetectIntentResponse detect_intent_response = 1; + */ + protected $detect_intent_response = null; + /** + * AutomatedAgentReply type. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType automated_agent_reply_type = 7; + */ + protected $automated_agent_reply_type = 0; + /** + * Indicates whether the partial automated agent reply is interruptible when a + * later reply message arrives. e.g. if the agent specified some music as + * partial response, it can be cancelled. + * + * Generated from protobuf field bool allow_cancellation = 8; + */ + protected $allow_cancellation = false; + /** + * The unique identifier of the current Dialogflow CX conversation page. + * Format: `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string cx_current_page = 11; + */ + protected $cx_current_page = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\DetectIntentResponse $detect_intent_response + * Response of the Dialogflow + * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] + * call. + * @type int $automated_agent_reply_type + * AutomatedAgentReply type. + * @type bool $allow_cancellation + * Indicates whether the partial automated agent reply is interruptible when a + * later reply message arrives. e.g. if the agent specified some music as + * partial response, it can be cancelled. + * @type string $cx_current_page + * The unique identifier of the current Dialogflow CX conversation page. + * Format: `projects//locations//agents//flows//pages/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Response of the Dialogflow + * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] + * call. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.DetectIntentResponse detect_intent_response = 1; + * @return \Google\Cloud\Dialogflow\V2\DetectIntentResponse|null + */ + public function getDetectIntentResponse() + { + return $this->detect_intent_response; + } + + public function hasDetectIntentResponse() + { + return isset($this->detect_intent_response); + } + + public function clearDetectIntentResponse() + { + unset($this->detect_intent_response); + } + + /** + * Response of the Dialogflow + * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] + * call. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.DetectIntentResponse detect_intent_response = 1; + * @param \Google\Cloud\Dialogflow\V2\DetectIntentResponse $var + * @return $this + */ + public function setDetectIntentResponse($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\DetectIntentResponse::class); + $this->detect_intent_response = $var; + + return $this; + } + + /** + * AutomatedAgentReply type. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType automated_agent_reply_type = 7; + * @return int + */ + public function getAutomatedAgentReplyType() + { + return $this->automated_agent_reply_type; + } + + /** + * AutomatedAgentReply type. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType automated_agent_reply_type = 7; + * @param int $var + * @return $this + */ + public function setAutomatedAgentReplyType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AutomatedAgentReply\AutomatedAgentReplyType::class); + $this->automated_agent_reply_type = $var; + + return $this; + } + + /** + * Indicates whether the partial automated agent reply is interruptible when a + * later reply message arrives. e.g. if the agent specified some music as + * partial response, it can be cancelled. + * + * Generated from protobuf field bool allow_cancellation = 8; + * @return bool + */ + public function getAllowCancellation() + { + return $this->allow_cancellation; + } + + /** + * Indicates whether the partial automated agent reply is interruptible when a + * later reply message arrives. e.g. if the agent specified some music as + * partial response, it can be cancelled. + * + * Generated from protobuf field bool allow_cancellation = 8; + * @param bool $var + * @return $this + */ + public function setAllowCancellation($var) + { + GPBUtil::checkBool($var); + $this->allow_cancellation = $var; + + return $this; + } + + /** + * The unique identifier of the current Dialogflow CX conversation page. + * Format: `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string cx_current_page = 11; + * @return string + */ + public function getCxCurrentPage() + { + return $this->cx_current_page; + } + + /** + * The unique identifier of the current Dialogflow CX conversation page. + * Format: `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string cx_current_page = 11; + * @param string $var + * @return $this + */ + public function setCxCurrentPage($var) + { + GPBUtil::checkString($var, True); + $this->cx_current_page = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply/AutomatedAgentReplyType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply/AutomatedAgentReplyType.php new file mode 100644 index 000000000000..a82ee1df28e1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply/AutomatedAgentReplyType.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType + */ +class AutomatedAgentReplyType +{ + /** + * Not specified. This should never happen. + * + * Generated from protobuf enum AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0; + */ + const AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0; + /** + * Partial reply. e.g. Aggregated responses in a `Fulfillment` that enables + * `return_partial_response` can be returned as partial reply. + * WARNING: partial reply is not eligible for barge-in. + * + * Generated from protobuf enum PARTIAL = 1; + */ + const PARTIAL = 1; + /** + * Final reply. + * + * Generated from protobuf enum FINAL = 2; + */ + const PBFINAL = 2; + + private static $valueToName = [ + self::AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED => 'AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED', + self::PARTIAL => 'PARTIAL', + self::PBFINAL => 'FINAL', + ]; + + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AutomatedAgentReplyType::class, \Google\Cloud\Dialogflow\V2\AutomatedAgentReply_AutomatedAgentReplyType::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply_AutomatedAgentReplyType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply_AutomatedAgentReplyType.php new file mode 100644 index 000000000000..58030c17cea4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply_AutomatedAgentReplyType.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.BatchCreateEntitiesRequest + */ +class BatchCreateEntitiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entity type to create entities in. Format: + * `projects//agent/entityTypes/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The entities to create. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entities; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the entity type to create entities in. Format: + * `projects//agent/entityTypes/`. + * @type array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * Required. The entities to create. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entity type to create entities in. Format: + * `projects//agent/entityTypes/`. + * + * 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 name of the entity type to create entities in. Format: + * `projects//agent/entityTypes/`. + * + * 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 entities to create. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * Required. The entities to create. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntitiesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntitiesRequest.php new file mode 100644 index 000000000000..1b081609fde4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntitiesRequest.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest + */ +class BatchDeleteEntitiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entity type to delete entries for. Format: + * `projects//agent/entityTypes/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The reference `values` of the entities to delete. Note that + * these are not fully-qualified names, i.e. they don't start with + * `projects/`. + * + * Generated from protobuf field repeated string entity_values = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entity_values; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the entity type to delete entries for. Format: + * `projects//agent/entityTypes/`. + * @type array|\Google\Protobuf\Internal\RepeatedField $entity_values + * Required. The reference `values` of the entities to delete. Note that + * these are not fully-qualified names, i.e. they don't start with + * `projects/`. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entity type to delete entries for. Format: + * `projects//agent/entityTypes/`. + * + * 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 name of the entity type to delete entries for. Format: + * `projects//agent/entityTypes/`. + * + * 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 reference `values` of the entities to delete. Note that + * these are not fully-qualified names, i.e. they don't start with + * `projects/`. + * + * Generated from protobuf field repeated string entity_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityValues() + { + return $this->entity_values; + } + + /** + * Required. The reference `values` of the entities to delete. Note that + * these are not fully-qualified names, i.e. they don't start with + * `projects/`. + * + * Generated from protobuf field repeated string entity_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->entity_values = $arr; + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntityTypesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntityTypesRequest.php new file mode 100644 index 000000000000..0a43822ed8ec --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntityTypesRequest.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest + */ +class BatchDeleteEntityTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent to delete all entities types for. Format: + * `projects//agent`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The names entity types to delete. All names must point to the + * same agent as `parent`. + * + * Generated from protobuf field repeated string entity_type_names = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entity_type_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the agent to delete all entities types for. Format: + * `projects//agent`. + * @type array|\Google\Protobuf\Internal\RepeatedField $entity_type_names + * Required. The names entity types to delete. All names must point to the + * same agent as `parent`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent to delete all entities types for. Format: + * `projects//agent`. + * + * 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 name of the agent to delete all entities types for. Format: + * `projects//agent`. + * + * 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 names entity types to delete. All names must point to the + * same agent as `parent`. + * + * Generated from protobuf field repeated string entity_type_names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityTypeNames() + { + return $this->entity_type_names; + } + + /** + * Required. The names entity types to delete. All names must point to the + * same agent as `parent`. + * + * Generated from protobuf field repeated string entity_type_names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityTypeNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->entity_type_names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteIntentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteIntentsRequest.php new file mode 100644 index 000000000000..1618e46fffae --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteIntentsRequest.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.BatchDeleteIntentsRequest + */ +class BatchDeleteIntentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent to delete all entities types for. Format: + * `projects//agent`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The collection of intents to delete. Only intent `name` must be + * filled in. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $intents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the agent to delete all entities types for. Format: + * `projects//agent`. + * @type array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents + * Required. The collection of intents to delete. Only intent `name` must be + * filled in. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent to delete all entities types for. Format: + * `projects//agent`. + * + * 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 name of the agent to delete all entities types for. Format: + * `projects//agent`. + * + * 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 collection of intents to delete. Only intent `name` must be + * filled in. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntents() + { + return $this->intents; + } + + /** + * Required. The collection of intents to delete. Only intent `name` must be + * filled in. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); + $this->intents = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntitiesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntitiesRequest.php new file mode 100644 index 000000000000..5f7e4287caf9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntitiesRequest.php @@ -0,0 +1,200 @@ +google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest + */ +class BatchUpdateEntitiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entity type to update or create entities in. + * Format: `projects//agent/entityTypes/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The entities to update or create. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entities; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the entity type to update or create entities in. + * Format: `projects//agent/entityTypes/`. + * @type array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * Required. The entities to update or create. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entity type to update or create entities in. + * Format: `projects//agent/entityTypes/`. + * + * 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 name of the entity type to update or create entities in. + * Format: `projects//agent/entityTypes/`. + * + * 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 entities to update or create. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * Required. The entities to update or create. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesRequest.php new file mode 100644 index 000000000000..6a281fc67777 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesRequest.php @@ -0,0 +1,250 @@ +google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest + */ +class BatchUpdateEntityTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent to update or create entity types in. + * Format: `projects//agent`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + protected $entity_type_batch; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the agent to update or create entity types in. + * Format: `projects//agent`. + * @type string $entity_type_batch_uri + * The URI to a Google Cloud Storage file containing entity types to update + * or create. The file format can either be a serialized proto (of + * EntityBatch type) or a JSON object. Note: The URI must start with + * "gs://". + * @type \Google\Cloud\Dialogflow\V2\EntityTypeBatch $entity_type_batch_inline + * The collection of entity types to update or create. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent to update or create entity types in. + * Format: `projects//agent`. + * + * 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 name of the agent to update or create entity types in. + * Format: `projects//agent`. + * + * 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 URI to a Google Cloud Storage file containing entity types to update + * or create. The file format can either be a serialized proto (of + * EntityBatch type) or a JSON object. Note: The URI must start with + * "gs://". + * + * Generated from protobuf field string entity_type_batch_uri = 2; + * @return string + */ + public function getEntityTypeBatchUri() + { + return $this->readOneof(2); + } + + public function hasEntityTypeBatchUri() + { + return $this->hasOneof(2); + } + + /** + * The URI to a Google Cloud Storage file containing entity types to update + * or create. The file format can either be a serialized proto (of + * EntityBatch type) or a JSON object. Note: The URI must start with + * "gs://". + * + * Generated from protobuf field string entity_type_batch_uri = 2; + * @param string $var + * @return $this + */ + public function setEntityTypeBatchUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The collection of entity types to update or create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityTypeBatch entity_type_batch_inline = 3; + * @return \Google\Cloud\Dialogflow\V2\EntityTypeBatch|null + */ + public function getEntityTypeBatchInline() + { + return $this->readOneof(3); + } + + public function hasEntityTypeBatchInline() + { + return $this->hasOneof(3); + } + + /** + * The collection of entity types to update or create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityTypeBatch entity_type_batch_inline = 3; + * @param \Google\Cloud\Dialogflow\V2\EntityTypeBatch $var + * @return $this + */ + public function setEntityTypeBatchInline($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EntityTypeBatch::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * @return string + */ + public function getEntityTypeBatch() + { + return $this->whichOneof("entity_type_batch"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesResponse.php new file mode 100644 index 000000000000..b73eca89fee6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesResponse.php @@ -0,0 +1,68 @@ +google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse + */ +class BatchUpdateEntityTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The collection of updated or created entity types. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; + */ + private $entity_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types + * The collection of updated or created entity types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * The collection of updated or created entity types. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityTypes() + { + return $this->entity_types; + } + + /** + * The collection of updated or created entity types. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; + * @param array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType::class); + $this->entity_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsRequest.php new file mode 100644 index 000000000000..da1c3823fa38 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsRequest.php @@ -0,0 +1,278 @@ +google.cloud.dialogflow.v2.BatchUpdateIntentsRequest + */ +class BatchUpdateIntentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent to update or create intents in. + * Format: `projects//agent`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $intent_view = 0; + protected $intent_batch; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the agent to update or create intents in. + * Format: `projects//agent`. + * @type string $intent_batch_uri + * The URI to a Google Cloud Storage file containing intents to update or + * create. The file format can either be a serialized proto (of IntentBatch + * type) or JSON object. Note: The URI must start with "gs://". + * @type \Google\Cloud\Dialogflow\V2\IntentBatch $intent_batch_inline + * The collection of intents to update or create. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields get updated. + * @type int $intent_view + * Optional. The resource view to apply to the returned intent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent to update or create intents in. + * Format: `projects//agent`. + * + * 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 name of the agent to update or create intents in. + * Format: `projects//agent`. + * + * 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 URI to a Google Cloud Storage file containing intents to update or + * create. The file format can either be a serialized proto (of IntentBatch + * type) or JSON object. Note: The URI must start with "gs://". + * + * Generated from protobuf field string intent_batch_uri = 2; + * @return string + */ + public function getIntentBatchUri() + { + return $this->readOneof(2); + } + + public function hasIntentBatchUri() + { + return $this->hasOneof(2); + } + + /** + * The URI to a Google Cloud Storage file containing intents to update or + * create. The file format can either be a serialized proto (of IntentBatch + * type) or JSON object. Note: The URI must start with "gs://". + * + * Generated from protobuf field string intent_batch_uri = 2; + * @param string $var + * @return $this + */ + public function setIntentBatchUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The collection of intents to update or create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentBatch intent_batch_inline = 3; + * @return \Google\Cloud\Dialogflow\V2\IntentBatch|null + */ + public function getIntentBatchInline() + { + return $this->readOneof(3); + } + + public function hasIntentBatchInline() + { + return $this->hasOneof(3); + } + + /** + * The collection of intents to update or create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentBatch intent_batch_inline = 3; + * @param \Google\Cloud\Dialogflow\V2\IntentBatch $var + * @return $this + */ + public function setIntentBatchInline($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\IntentBatch::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIntentView() + { + return $this->intent_view; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIntentView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); + $this->intent_view = $var; + + return $this; + } + + /** + * @return string + */ + public function getIntentBatch() + { + return $this->whichOneof("intent_batch"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsResponse.php new file mode 100644 index 000000000000..fe289de698ad --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsResponse.php @@ -0,0 +1,68 @@ +google.cloud.dialogflow.v2.BatchUpdateIntentsResponse + */ +class BatchUpdateIntentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The collection of updated or created intents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; + */ + private $intents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents + * The collection of updated or created intents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * The collection of updated or created intents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntents() + { + return $this->intents; + } + + /** + * The collection of updated or created intents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); + $this->intents = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigOperationMetadata.php new file mode 100644 index 000000000000..ffff95f24c72 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigOperationMetadata.php @@ -0,0 +1,192 @@ +google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + */ +class ClearSuggestionFeatureConfigOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the conversation profile. Format: + * `projects//locations//conversationProfiles/` + * + * Generated from protobuf field string conversation_profile = 1; + */ + protected $conversation_profile = ''; + /** + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $participant_role = 0; + /** + * Required. The type of the suggestion feature to remove. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $suggestion_feature_type = 0; + /** + * Timestamp whe the request was created. The time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_profile + * The resource name of the conversation profile. Format: + * `projects//locations//conversationProfiles/` + * @type int $participant_role + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * @type int $suggestion_feature_type + * Required. The type of the suggestion feature to remove. + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp whe the request was created. The time is measured on server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the conversation profile. Format: + * `projects//locations//conversationProfiles/` + * + * Generated from protobuf field string conversation_profile = 1; + * @return string + */ + public function getConversationProfile() + { + return $this->conversation_profile; + } + + /** + * The resource name of the conversation profile. Format: + * `projects//locations//conversationProfiles/` + * + * Generated from protobuf field string conversation_profile = 1; + * @param string $var + * @return $this + */ + public function setConversationProfile($var) + { + GPBUtil::checkString($var, True); + $this->conversation_profile = $var; + + return $this; + } + + /** + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getParticipantRole() + { + return $this->participant_role; + } + + /** + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setParticipantRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); + $this->participant_role = $var; + + return $this; + } + + /** + * Required. The type of the suggestion feature to remove. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSuggestionFeatureType() + { + return $this->suggestion_feature_type; + } + + /** + * Required. The type of the suggestion feature to remove. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSuggestionFeatureType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type::class); + $this->suggestion_feature_type = $var; + + return $this; + } + + /** + * Timestamp whe the request was created. The time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @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); + } + + /** + * Timestamp whe the request was created. The time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigRequest.php new file mode 100644 index 000000000000..9e7620502ba8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigRequest.php @@ -0,0 +1,147 @@ +google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + */ +class ClearSuggestionFeatureConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation_profile = ''; + /** + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $participant_role = 0; + /** + * Required. The type of the suggestion feature to remove. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $suggestion_feature_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_profile + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * @type int $participant_role + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * @type int $suggestion_feature_type + * Required. The type of the suggestion feature to remove. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getConversationProfile() + { + return $this->conversation_profile; + } + + /** + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setConversationProfile($var) + { + GPBUtil::checkString($var, True); + $this->conversation_profile = $var; + + return $this; + } + + /** + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getParticipantRole() + { + return $this->participant_role; + } + + /** + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setParticipantRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); + $this->participant_role = $var; + + return $this; + } + + /** + * Required. The type of the suggestion feature to remove. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSuggestionFeatureType() + { + return $this->suggestion_feature_type; + } + + /** + * Required. The type of the suggestion feature to remove. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSuggestionFeatureType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type::class); + $this->suggestion_feature_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CompleteConversationRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CompleteConversationRequest.php new file mode 100644 index 000000000000..91fcdccb640d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CompleteConversationRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.CompleteConversationRequest + */ +class CompleteConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource identifier of the conversation to close. + * Format: `projects//locations//conversations/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource identifier of the conversation to close. + * Format: `projects//locations//conversations/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource identifier of the conversation to close. + * Format: `projects//locations//conversations/`. + * + * 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. Resource identifier of the conversation to close. + * Format: `projects//locations//conversations/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Context.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Context.php new file mode 100644 index 000000000000..08daebb8c022 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Context.php @@ -0,0 +1,269 @@ +google.cloud.dialogflow.v2.Context + */ +class Context extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the context. Format: + * `projects//agent/sessions//contexts/`, + * or `projects//agent/environments//users//sessions//contexts/`. + * The `Context ID` is always converted to lowercase, may only contain + * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * The following context names are reserved for internal use by Dialogflow. + * You should not use these contexts or create contexts with these names: + * * `__system_counters__` + * * `*_id_dialog_context` + * * `*_dialog_params_size` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. The number of conversational query requests after which the + * context expires. The default is `0`. If set to `0`, the context expires + * immediately. Contexts expire automatically after 20 minutes if there + * are no matching queries. + * + * Generated from protobuf field int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $lifespan_count = 0; + /** + * Optional. The collection of parameters associated with this context. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * + * Generated from protobuf field .google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique identifier of the context. Format: + * `projects//agent/sessions//contexts/`, + * or `projects//agent/environments//users//sessions//contexts/`. + * The `Context ID` is always converted to lowercase, may only contain + * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * The following context names are reserved for internal use by Dialogflow. + * You should not use these contexts or create contexts with these names: + * * `__system_counters__` + * * `*_id_dialog_context` + * * `*_dialog_params_size` + * @type int $lifespan_count + * Optional. The number of conversational query requests after which the + * context expires. The default is `0`. If set to `0`, the context expires + * immediately. Contexts expire automatically after 20 minutes if there + * are no matching queries. + * @type \Google\Protobuf\Struct $parameters + * Optional. The collection of parameters associated with this context. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the context. Format: + * `projects//agent/sessions//contexts/`, + * or `projects//agent/environments//users//sessions//contexts/`. + * The `Context ID` is always converted to lowercase, may only contain + * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * The following context names are reserved for internal use by Dialogflow. + * You should not use these contexts or create contexts with these names: + * * `__system_counters__` + * * `*_id_dialog_context` + * * `*_dialog_params_size` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique identifier of the context. Format: + * `projects//agent/sessions//contexts/`, + * or `projects//agent/environments//users//sessions//contexts/`. + * The `Context ID` is always converted to lowercase, may only contain + * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * The following context names are reserved for internal use by Dialogflow. + * You should not use these contexts or create contexts with these names: + * * `__system_counters__` + * * `*_id_dialog_context` + * * `*_dialog_params_size` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The number of conversational query requests after which the + * context expires. The default is `0`. If set to `0`, the context expires + * immediately. Contexts expire automatically after 20 minutes if there + * are no matching queries. + * + * Generated from protobuf field int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getLifespanCount() + { + return $this->lifespan_count; + } + + /** + * Optional. The number of conversational query requests after which the + * context expires. The default is `0`. If set to `0`, the context expires + * immediately. Contexts expire automatically after 20 minutes if there + * are no matching queries. + * + * Generated from protobuf field int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setLifespanCount($var) + { + GPBUtil::checkInt32($var); + $this->lifespan_count = $var; + + return $this; + } + + /** + * Optional. The collection of parameters associated with this context. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * + * Generated from protobuf field .google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getParameters() + { + return $this->parameters; + } + + public function hasParameters() + { + return isset($this->parameters); + } + + public function clearParameters() + { + unset($this->parameters); + } + + /** + * Optional. The collection of parameters associated with this context. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * + * Generated from protobuf field .google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ContextsGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ContextsGrpcClient.php new file mode 100644 index 000000000000..42ac71299fca --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ContextsGrpcClient.php @@ -0,0 +1,127 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Contexts/ListContexts', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListContextsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified context. + * @param \Google\Cloud\Dialogflow\V2\GetContextRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetContext(\Google\Cloud\Dialogflow\V2\GetContextRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/GetContext', + $argument, + ['\Google\Cloud\Dialogflow\V2\Context', 'decode'], + $metadata, $options); + } + + /** + * Creates a context. + * + * If the specified context already exists, overrides the context. + * @param \Google\Cloud\Dialogflow\V2\CreateContextRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateContext(\Google\Cloud\Dialogflow\V2\CreateContextRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/CreateContext', + $argument, + ['\Google\Cloud\Dialogflow\V2\Context', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified context. + * @param \Google\Cloud\Dialogflow\V2\UpdateContextRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateContext(\Google\Cloud\Dialogflow\V2\UpdateContextRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/UpdateContext', + $argument, + ['\Google\Cloud\Dialogflow\V2\Context', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified context. + * @param \Google\Cloud\Dialogflow\V2\DeleteContextRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteContext(\Google\Cloud\Dialogflow\V2\DeleteContextRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/DeleteContext', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Deletes all active contexts in the specified session. + * @param \Google\Cloud\Dialogflow\V2\DeleteAllContextsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteAllContexts(\Google\Cloud\Dialogflow\V2\DeleteAllContextsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/DeleteAllContexts', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation.php new file mode 100644 index 000000000000..618526d0cb82 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation.php @@ -0,0 +1,380 @@ +google.cloud.dialogflow.v2.Conversation + */ +class Conversation extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique identifier of this conversation. + * Format: `projects//locations//conversations/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The current state of the Conversation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $lifecycle_state = 0; + /** + * Required. The Conversation Profile to be used to configure this + * Conversation. This field cannot be updated. + * Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $conversation_profile = ''; + /** + * Output only. It will not be empty if the conversation is to be connected + * over telephony. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $phone_number = null; + /** + * Output only. The time the conversation was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The time the conversation was finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * The stage of a conversation. It indicates whether the virtual agent or a + * human agent is handling the conversation. + * If the conversation is created with the conversation profile that has + * Dialogflow config set, defaults to + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; + * Otherwise, defaults to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. + * If the conversation is created with the conversation profile that has + * Dialogflow config set but explicitly sets conversation_stage to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], + * it skips + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] + * stage and directly goes to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7; + */ + protected $conversation_stage = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique identifier of this conversation. + * Format: `projects//locations//conversations/`. + * @type int $lifecycle_state + * Output only. The current state of the Conversation. + * @type string $conversation_profile + * Required. The Conversation Profile to be used to configure this + * Conversation. This field cannot be updated. + * Format: `projects//locations//conversationProfiles/`. + * @type \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber $phone_number + * Output only. It will not be empty if the conversation is to be connected + * over telephony. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time the conversation was started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the conversation was finished. + * @type int $conversation_stage + * The stage of a conversation. It indicates whether the virtual agent or a + * human agent is handling the conversation. + * If the conversation is created with the conversation profile that has + * Dialogflow config set, defaults to + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; + * Otherwise, defaults to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. + * If the conversation is created with the conversation profile that has + * Dialogflow config set but explicitly sets conversation_stage to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], + * it skips + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] + * stage and directly goes to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique identifier of this conversation. + * Format: `projects//locations//conversations/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique identifier of this conversation. + * Format: `projects//locations//conversations/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The current state of the Conversation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLifecycleState() + { + return $this->lifecycle_state; + } + + /** + * Output only. The current state of the Conversation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLifecycleState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Conversation\LifecycleState::class); + $this->lifecycle_state = $var; + + return $this; + } + + /** + * Required. The Conversation Profile to be used to configure this + * Conversation. This field cannot be updated. + * Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getConversationProfile() + { + return $this->conversation_profile; + } + + /** + * Required. The Conversation Profile to be used to configure this + * Conversation. This field cannot be updated. + * Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setConversationProfile($var) + { + GPBUtil::checkString($var, True); + $this->conversation_profile = $var; + + return $this; + } + + /** + * Output only. It will not be empty if the conversation is to be connected + * over telephony. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber|null + */ + public function getPhoneNumber() + { + return $this->phone_number; + } + + public function hasPhoneNumber() + { + return isset($this->phone_number); + } + + public function clearPhoneNumber() + { + unset($this->phone_number); + } + + /** + * Output only. It will not be empty if the conversation is to be connected + * over telephony. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber $var + * @return $this + */ + public function setPhoneNumber($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber::class); + $this->phone_number = $var; + + return $this; + } + + /** + * Output only. The time the conversation was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The time the conversation was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The time the conversation was finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.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 conversation was finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.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 stage of a conversation. It indicates whether the virtual agent or a + * human agent is handling the conversation. + * If the conversation is created with the conversation profile that has + * Dialogflow config set, defaults to + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; + * Otherwise, defaults to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. + * If the conversation is created with the conversation profile that has + * Dialogflow config set but explicitly sets conversation_stage to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], + * it skips + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] + * stage and directly goes to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7; + * @return int + */ + public function getConversationStage() + { + return $this->conversation_stage; + } + + /** + * The stage of a conversation. It indicates whether the virtual agent or a + * human agent is handling the conversation. + * If the conversation is created with the conversation profile that has + * Dialogflow config set, defaults to + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; + * Otherwise, defaults to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. + * If the conversation is created with the conversation profile that has + * Dialogflow config set but explicitly sets conversation_stage to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], + * it skips + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] + * stage and directly goes to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7; + * @param int $var + * @return $this + */ + public function setConversationStage($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Conversation\ConversationStage::class); + $this->conversation_stage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/ConversationStage.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/ConversationStage.php new file mode 100644 index 000000000000..f2c3504ddeb6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/ConversationStage.php @@ -0,0 +1,69 @@ +google.cloud.dialogflow.v2.Conversation.ConversationStage + */ +class ConversationStage +{ + /** + * Unknown. Should never be used after a conversation is successfully + * created. + * + * Generated from protobuf enum CONVERSATION_STAGE_UNSPECIFIED = 0; + */ + const CONVERSATION_STAGE_UNSPECIFIED = 0; + /** + * The conversation should return virtual agent responses into the + * conversation. + * + * Generated from protobuf enum VIRTUAL_AGENT_STAGE = 1; + */ + const VIRTUAL_AGENT_STAGE = 1; + /** + * The conversation should not provide responses, just listen and provide + * suggestions. + * + * Generated from protobuf enum HUMAN_ASSIST_STAGE = 2; + */ + const HUMAN_ASSIST_STAGE = 2; + + private static $valueToName = [ + self::CONVERSATION_STAGE_UNSPECIFIED => 'CONVERSATION_STAGE_UNSPECIFIED', + self::VIRTUAL_AGENT_STAGE => 'VIRTUAL_AGENT_STAGE', + self::HUMAN_ASSIST_STAGE => 'HUMAN_ASSIST_STAGE', + ]; + + 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(ConversationStage::class, \Google\Cloud\Dialogflow\V2\Conversation_ConversationStage::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/LifecycleState.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/LifecycleState.php new file mode 100644 index 000000000000..5f851d42bcbe --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/LifecycleState.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.v2.Conversation.LifecycleState + */ +class LifecycleState +{ + /** + * Unknown. + * + * Generated from protobuf enum LIFECYCLE_STATE_UNSPECIFIED = 0; + */ + const LIFECYCLE_STATE_UNSPECIFIED = 0; + /** + * Conversation is currently open for media analysis. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * Conversation has been completed. + * + * Generated from protobuf enum COMPLETED = 2; + */ + const COMPLETED = 2; + + private static $valueToName = [ + self::LIFECYCLE_STATE_UNSPECIFIED => 'LIFECYCLE_STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::COMPLETED => 'COMPLETED', + ]; + + 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(LifecycleState::class, \Google\Cloud\Dialogflow\V2\Conversation_LifecycleState::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDataset.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDataset.php new file mode 100644 index 000000000000..7d2a3590cc7a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDataset.php @@ -0,0 +1,316 @@ +google.cloud.dialogflow.v2.ConversationDataset + */ +class ConversationDataset extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. ConversationDataset resource name. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. The display name of the dataset. Maximum of 64 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. The description of the dataset. Maximum of 10000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Creation time of this dataset. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Input configurations set during conversation data import. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $input_config = null; + /** + * Output only. Metadata set during conversation data import. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationInfo conversation_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $conversation_info = null; + /** + * Output only. The number of conversations this conversation dataset + * contains. + * + * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $conversation_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. ConversationDataset resource name. Format: + * `projects//locations//conversationDatasets/` + * @type string $display_name + * Required. The display name of the dataset. Maximum of 64 bytes. + * @type string $description + * Optional. The description of the dataset. Maximum of 10000 bytes. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this dataset. + * @type \Google\Cloud\Dialogflow\V2\InputConfig $input_config + * Output only. Input configurations set during conversation data import. + * @type \Google\Cloud\Dialogflow\V2\ConversationInfo $conversation_info + * Output only. Metadata set during conversation data import. + * @type int|string $conversation_count + * Output only. The number of conversations this conversation dataset + * contains. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * Output only. ConversationDataset resource name. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. ConversationDataset resource name. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The display name of the dataset. Maximum of 64 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the dataset. Maximum of 64 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. The description of the dataset. Maximum of 10000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the dataset. Maximum of 10000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Creation time of this dataset. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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. Creation time of this dataset. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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. Input configurations set during conversation data import. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Output only. Input configurations set during conversation data import. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Output only. Metadata set during conversation data import. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationInfo conversation_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\ConversationInfo|null + */ + public function getConversationInfo() + { + return $this->conversation_info; + } + + public function hasConversationInfo() + { + return isset($this->conversation_info); + } + + public function clearConversationInfo() + { + unset($this->conversation_info); + } + + /** + * Output only. Metadata set during conversation data import. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationInfo conversation_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\ConversationInfo $var + * @return $this + */ + public function setConversationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationInfo::class); + $this->conversation_info = $var; + + return $this; + } + + /** + * Output only. The number of conversations this conversation dataset + * contains. + * + * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getConversationCount() + { + return $this->conversation_count; + } + + /** + * Output only. The number of conversations this conversation dataset + * contains. + * + * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setConversationCount($var) + { + GPBUtil::checkInt64($var); + $this->conversation_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDatasetsGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDatasetsGrpcClient.php new file mode 100644 index 000000000000..48470b0e87ec --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDatasetsGrpcClient.php @@ -0,0 +1,143 @@ +_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/CreateConversationDataset', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified conversation dataset. + * @param \Google\Cloud\Dialogflow\V2\GetConversationDatasetRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetConversationDataset(\Google\Cloud\Dialogflow\V2\GetConversationDatasetRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/GetConversationDataset', + $argument, + ['\Google\Cloud\Dialogflow\V2\ConversationDataset', 'decode'], + $metadata, $options); + } + + /** + * Returns the list of all conversation datasets in the specified + * project and location. + * @param \Google\Cloud\Dialogflow\V2\ListConversationDatasetsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListConversationDatasets(\Google\Cloud\Dialogflow\V2\ListConversationDatasetsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/ListConversationDatasets', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListConversationDatasetsResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified conversation dataset. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * @param \Google\Cloud\Dialogflow\V2\DeleteConversationDatasetRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteConversationDataset(\Google\Cloud\Dialogflow\V2\DeleteConversationDatasetRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/DeleteConversationDataset', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Import data into the specified conversation dataset. Note that it + * is not allowed to import data to a conversation dataset that + * already has data in it. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata] + * - `response`: + * [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse] + * @param \Google\Cloud\Dialogflow\V2\ImportConversationDataRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ImportConversationData(\Google\Cloud\Dialogflow\V2\ImportConversationDataRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/ImportConversationData', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent.php new file mode 100644 index 000000000000..4a557d0712c2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent.php @@ -0,0 +1,200 @@ +google.cloud.dialogflow.v2.ConversationEvent + */ +class ConversationEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the conversation this notification + * refers to. + * Format: `projects//conversations/`. + * + * Generated from protobuf field string conversation = 1; + */ + protected $conversation = ''; + /** + * The type of the event that this notification refers to. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationEvent.Type type = 2; + */ + protected $type = 0; + /** + * More detailed information about an error. Only set for type + * UNRECOVERABLE_ERROR_IN_PHONE_CALL. + * + * Generated from protobuf field .google.rpc.Status error_status = 3; + */ + protected $error_status = null; + protected $payload; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation + * The unique identifier of the conversation this notification + * refers to. + * Format: `projects//conversations/`. + * @type int $type + * The type of the event that this notification refers to. + * @type \Google\Rpc\Status $error_status + * More detailed information about an error. Only set for type + * UNRECOVERABLE_ERROR_IN_PHONE_CALL. + * @type \Google\Cloud\Dialogflow\V2\Message $new_message_payload + * Payload of NEW_MESSAGE event. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationEvent::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the conversation this notification + * refers to. + * Format: `projects//conversations/`. + * + * Generated from protobuf field string conversation = 1; + * @return string + */ + public function getConversation() + { + return $this->conversation; + } + + /** + * The unique identifier of the conversation this notification + * refers to. + * Format: `projects//conversations/`. + * + * Generated from protobuf field string conversation = 1; + * @param string $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkString($var, True); + $this->conversation = $var; + + return $this; + } + + /** + * The type of the event that this notification refers to. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationEvent.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the event that this notification refers to. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationEvent.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationEvent\Type::class); + $this->type = $var; + + return $this; + } + + /** + * More detailed information about an error. Only set for type + * UNRECOVERABLE_ERROR_IN_PHONE_CALL. + * + * Generated from protobuf field .google.rpc.Status error_status = 3; + * @return \Google\Rpc\Status|null + */ + public function getErrorStatus() + { + return $this->error_status; + } + + public function hasErrorStatus() + { + return isset($this->error_status); + } + + public function clearErrorStatus() + { + unset($this->error_status); + } + + /** + * More detailed information about an error. Only set for type + * UNRECOVERABLE_ERROR_IN_PHONE_CALL. + * + * Generated from protobuf field .google.rpc.Status error_status = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setErrorStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error_status = $var; + + return $this; + } + + /** + * Payload of NEW_MESSAGE event. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Message new_message_payload = 4; + * @return \Google\Cloud\Dialogflow\V2\Message|null + */ + public function getNewMessagePayload() + { + return $this->readOneof(4); + } + + public function hasNewMessagePayload() + { + return $this->hasOneof(4); + } + + /** + * Payload of NEW_MESSAGE event. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Message new_message_payload = 4; + * @param \Google\Cloud\Dialogflow\V2\Message $var + * @return $this + */ + public function setNewMessagePayload($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Message::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getPayload() + { + return $this->whichOneof("payload"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent/Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent/Type.php new file mode 100644 index 000000000000..528852c42e6f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent/Type.php @@ -0,0 +1,96 @@ +google.cloud.dialogflow.v2.ConversationEvent.Type + */ +class Type +{ + /** + * Type not set. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * A new conversation has been opened. This is fired when a telephone call + * is answered, or a conversation is created via the API. + * + * Generated from protobuf enum CONVERSATION_STARTED = 1; + */ + const CONVERSATION_STARTED = 1; + /** + * An existing conversation has closed. This is fired when a telephone call + * is terminated, or a conversation is closed via the API. + * + * Generated from protobuf enum CONVERSATION_FINISHED = 2; + */ + const CONVERSATION_FINISHED = 2; + /** + * An existing conversation has received notification from Dialogflow that + * human intervention is required. + * + * Generated from protobuf enum HUMAN_INTERVENTION_NEEDED = 3; + */ + const HUMAN_INTERVENTION_NEEDED = 3; + /** + * An existing conversation has received a new message, either from API or + * telephony. It is configured in + * [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2.ConversationProfile.new_message_event_notification_config] + * + * Generated from protobuf enum NEW_MESSAGE = 5; + */ + const NEW_MESSAGE = 5; + /** + * Unrecoverable error during a telephone call. + * In general non-recoverable errors only occur if something was + * misconfigured in the ConversationProfile corresponding to the call. After + * a non-recoverable error, Dialogflow may stop responding. + * We don't fire this event: + * * in an API call because we can directly return the error, or, + * * when we can recover from an error. + * + * Generated from protobuf enum UNRECOVERABLE_ERROR = 4; + */ + const UNRECOVERABLE_ERROR = 4; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::CONVERSATION_STARTED => 'CONVERSATION_STARTED', + self::CONVERSATION_FINISHED => 'CONVERSATION_FINISHED', + self::HUMAN_INTERVENTION_NEEDED => 'HUMAN_INTERVENTION_NEEDED', + self::NEW_MESSAGE => 'NEW_MESSAGE', + self::UNRECOVERABLE_ERROR => 'UNRECOVERABLE_ERROR', + ]; + + 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\Dialogflow\V2\ConversationEvent_Type::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent_Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent_Type.php new file mode 100644 index 000000000000..d97b4ab2ee73 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent_Type.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.ConversationInfo + */ +class ConversationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The language code of the conversation data within this dataset. + * See https://cloud.google.com/apis/design/standard_fields for more + * information. Supports all UTF-8 languages. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * Optional. The language code of the conversation data within this dataset. + * See https://cloud.google.com/apis/design/standard_fields for more + * information. Supports all UTF-8 languages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The language code of the conversation data within this dataset. + * See https://cloud.google.com/apis/design/standard_fields for more + * information. Supports all UTF-8 languages. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language code of the conversation data within this dataset. + * See https://cloud.google.com/apis/design/standard_fields for more + * information. Supports all UTF-8 languages. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel.php new file mode 100644 index 000000000000..411295745a1d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel.php @@ -0,0 +1,346 @@ +google.cloud.dialogflow.v2.ConversationModel + */ +class ConversationModel extends \Google\Protobuf\Internal\Message +{ + /** + * ConversationModel resource name. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The display name of the model. At most 64 bytes long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Output only. Creation time of this model. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Required. Datasets used to create model. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $datasets; + /** + * Output only. State of the model. A model can only serve prediction requests + * after it gets deployed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Language code for the conversation model. If not specified, the language + * is en-US. Language at ConversationModel should be set for all non en-us + * languages. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * + * Generated from protobuf field string language_code = 19; + */ + protected $language_code = ''; + protected $model_metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * ConversationModel resource name. Format: + * `projects//conversationModels/` + * @type string $display_name + * Required. The display name of the model. At most 64 bytes long. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this model. + * @type array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $datasets + * Required. Datasets used to create model. + * @type int $state + * Output only. State of the model. A model can only serve prediction requests + * after it gets deployed. + * @type string $language_code + * Language code for the conversation model. If not specified, the language + * is en-US. Language at ConversationModel should be set for all non en-us + * languages. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * @type \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata $article_suggestion_model_metadata + * Metadata for article suggestion models. + * @type \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata $smart_reply_model_metadata + * Metadata for smart reply models. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * ConversationModel resource name. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * ConversationModel resource name. Format: + * `projects//conversationModels/` + * + * 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; + } + + /** + * Required. The display name of the model. At most 64 bytes long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the model. At most 64 bytes long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Creation time of this model. + * + * 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. Creation time of this model. + * + * 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; + } + + /** + * Required. Datasets used to create model. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatasets() + { + return $this->datasets; + } + + /** + * Required. Datasets used to create model. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatasets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\InputDataset::class); + $this->datasets = $arr; + + return $this; + } + + /** + * Output only. State of the model. A model can only serve prediction requests + * after it gets deployed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the model. A model can only serve prediction requests + * after it gets deployed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationModel\State::class); + $this->state = $var; + + return $this; + } + + /** + * Language code for the conversation model. If not specified, the language + * is en-US. Language at ConversationModel should be set for all non en-us + * languages. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * + * Generated from protobuf field string language_code = 19; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Language code for the conversation model. If not specified, the language + * is en-US. Language at ConversationModel should be set for all non en-us + * languages. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * + * Generated from protobuf field string language_code = 19; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Metadata for article suggestion models. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata article_suggestion_model_metadata = 8; + * @return \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata|null + */ + public function getArticleSuggestionModelMetadata() + { + return $this->readOneof(8); + } + + public function hasArticleSuggestionModelMetadata() + { + return $this->hasOneof(8); + } + + /** + * Metadata for article suggestion models. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata article_suggestion_model_metadata = 8; + * @param \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata $var + * @return $this + */ + public function setArticleSuggestionModelMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Metadata for smart reply models. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SmartReplyModelMetadata smart_reply_model_metadata = 9; + * @return \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata|null + */ + public function getSmartReplyModelMetadata() + { + return $this->readOneof(9); + } + + public function hasSmartReplyModelMetadata() + { + return $this->hasOneof(9); + } + + /** + * Metadata for smart reply models. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SmartReplyModelMetadata smart_reply_model_metadata = 9; + * @param \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata $var + * @return $this + */ + public function setSmartReplyModelMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getModelMetadata() + { + return $this->whichOneof("model_metadata"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/ModelType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/ModelType.php new file mode 100644 index 000000000000..e18b5e917760 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/ModelType.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.v2.ConversationModel.ModelType + */ +class ModelType +{ + /** + * ModelType unspecified. + * + * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; + */ + const MODEL_TYPE_UNSPECIFIED = 0; + /** + * ModelType smart reply dual encoder model. + * + * Generated from protobuf enum SMART_REPLY_DUAL_ENCODER_MODEL = 2; + */ + const SMART_REPLY_DUAL_ENCODER_MODEL = 2; + /** + * ModelType smart reply bert model. + * + * Generated from protobuf enum SMART_REPLY_BERT_MODEL = 6; + */ + const SMART_REPLY_BERT_MODEL = 6; + + private static $valueToName = [ + self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', + self::SMART_REPLY_DUAL_ENCODER_MODEL => 'SMART_REPLY_DUAL_ENCODER_MODEL', + self::SMART_REPLY_BERT_MODEL => 'SMART_REPLY_BERT_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(ModelType::class, \Google\Cloud\Dialogflow\V2\ConversationModel_ModelType::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/State.php new file mode 100644 index 000000000000..fcfa0dcd49b4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/State.php @@ -0,0 +1,108 @@ +google.cloud.dialogflow.v2.ConversationModel.State + */ +class State +{ + /** + * Should not be used, an un-set enum has this value by default. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Model being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Model is not deployed but ready to deploy. + * + * Generated from protobuf enum UNDEPLOYED = 2; + */ + const UNDEPLOYED = 2; + /** + * Model is deploying. + * + * Generated from protobuf enum DEPLOYING = 3; + */ + const DEPLOYING = 3; + /** + * Model is deployed and ready to use. + * + * Generated from protobuf enum DEPLOYED = 4; + */ + const DEPLOYED = 4; + /** + * Model is undeploying. + * + * Generated from protobuf enum UNDEPLOYING = 5; + */ + const UNDEPLOYING = 5; + /** + * Model is deleting. + * + * Generated from protobuf enum DELETING = 6; + */ + const DELETING = 6; + /** + * Model is in error state. Not ready to deploy and use. + * + * Generated from protobuf enum FAILED = 7; + */ + const FAILED = 7; + /** + * Model is being created but the training has not started, + * The model may remain in this state until there is enough capacity to + * start training. + * + * Generated from protobuf enum PENDING = 8; + */ + const PENDING = 8; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::UNDEPLOYED => 'UNDEPLOYED', + self::DEPLOYING => 'DEPLOYING', + self::DEPLOYED => 'DEPLOYED', + self::UNDEPLOYING => 'UNDEPLOYING', + self::DELETING => 'DELETING', + self::FAILED => 'FAILED', + self::PENDING => 'PENDING', + ]; + + 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\Dialogflow\V2\ConversationModel_State::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelEvaluation.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelEvaluation.php new file mode 100644 index 000000000000..a1a91b98b37c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelEvaluation.php @@ -0,0 +1,329 @@ +google.cloud.dialogflow.v2.ConversationModelEvaluation + */ +class ConversationModelEvaluation extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the evaluation. Format: + * `projects//conversationModels//evaluations/` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. The display name of the model evaluation. At most 64 bytes long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. The configuration of the evaluation task. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig evaluation_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $evaluation_config = null; + /** + * Output only. Creation time of this model. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Human eval template in csv format. + * It tooks real-world conversations provided through input dataset, generates + * example suggestions for customer to verify quality of the model. + * For Smart Reply, the generated csv file contains columns of + * Context, (Suggestions,Q1,Q2)*3, Actual reply. + * Context contains at most 10 latest messages in the conversation prior to + * the current suggestion. + * Q1: "Would you send it as the next message of agent?" + * Evaluated based on whether the suggest is appropriate to be sent by + * agent in current context. + * Q2: "Does the suggestion move the conversation closer to resolution?" + * Evaluated based on whether the suggestion provide solutions, or answers + * customer's question or collect information from customer to resolve the + * customer's issue. + * Actual reply column contains the actual agent reply sent in the context. + * + * Generated from protobuf field string raw_human_eval_template_csv = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $raw_human_eval_template_csv = ''; + protected $metrics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the evaluation. Format: + * `projects//conversationModels//evaluations/` + * @type string $display_name + * Optional. The display name of the model evaluation. At most 64 bytes long. + * @type \Google\Cloud\Dialogflow\V2\EvaluationConfig $evaluation_config + * Optional. The configuration of the evaluation task. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this model. + * @type \Google\Cloud\Dialogflow\V2\SmartReplyMetrics $smart_reply_metrics + * Output only. Only available when model is for smart reply. + * @type string $raw_human_eval_template_csv + * Output only. Human eval template in csv format. + * It tooks real-world conversations provided through input dataset, generates + * example suggestions for customer to verify quality of the model. + * For Smart Reply, the generated csv file contains columns of + * Context, (Suggestions,Q1,Q2)*3, Actual reply. + * Context contains at most 10 latest messages in the conversation prior to + * the current suggestion. + * Q1: "Would you send it as the next message of agent?" + * Evaluated based on whether the suggest is appropriate to be sent by + * agent in current context. + * Q2: "Does the suggestion move the conversation closer to resolution?" + * Evaluated based on whether the suggestion provide solutions, or answers + * customer's question or collect information from customer to resolve the + * customer's issue. + * Actual reply column contains the actual agent reply sent in the context. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the evaluation. Format: + * `projects//conversationModels//evaluations/` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the evaluation. Format: + * `projects//conversationModels//evaluations/` + * + * 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; + } + + /** + * Optional. The display name of the model evaluation. At most 64 bytes long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. The display name of the model evaluation. At most 64 bytes long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. The configuration of the evaluation task. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig evaluation_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\EvaluationConfig|null + */ + public function getEvaluationConfig() + { + return $this->evaluation_config; + } + + public function hasEvaluationConfig() + { + return isset($this->evaluation_config); + } + + public function clearEvaluationConfig() + { + unset($this->evaluation_config); + } + + /** + * Optional. The configuration of the evaluation task. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig evaluation_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\EvaluationConfig $var + * @return $this + */ + public function setEvaluationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EvaluationConfig::class); + $this->evaluation_config = $var; + + return $this; + } + + /** + * Output only. Creation time of this model. + * + * 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. Creation time of this model. + * + * 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. Only available when model is for smart reply. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SmartReplyMetrics smart_reply_metrics = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\SmartReplyMetrics|null + */ + public function getSmartReplyMetrics() + { + return $this->readOneof(5); + } + + public function hasSmartReplyMetrics() + { + return $this->hasOneof(5); + } + + /** + * Output only. Only available when model is for smart reply. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SmartReplyMetrics smart_reply_metrics = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\SmartReplyMetrics $var + * @return $this + */ + public function setSmartReplyMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SmartReplyMetrics::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. Human eval template in csv format. + * It tooks real-world conversations provided through input dataset, generates + * example suggestions for customer to verify quality of the model. + * For Smart Reply, the generated csv file contains columns of + * Context, (Suggestions,Q1,Q2)*3, Actual reply. + * Context contains at most 10 latest messages in the conversation prior to + * the current suggestion. + * Q1: "Would you send it as the next message of agent?" + * Evaluated based on whether the suggest is appropriate to be sent by + * agent in current context. + * Q2: "Does the suggestion move the conversation closer to resolution?" + * Evaluated based on whether the suggestion provide solutions, or answers + * customer's question or collect information from customer to resolve the + * customer's issue. + * Actual reply column contains the actual agent reply sent in the context. + * + * Generated from protobuf field string raw_human_eval_template_csv = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRawHumanEvalTemplateCsv() + { + return $this->raw_human_eval_template_csv; + } + + /** + * Output only. Human eval template in csv format. + * It tooks real-world conversations provided through input dataset, generates + * example suggestions for customer to verify quality of the model. + * For Smart Reply, the generated csv file contains columns of + * Context, (Suggestions,Q1,Q2)*3, Actual reply. + * Context contains at most 10 latest messages in the conversation prior to + * the current suggestion. + * Q1: "Would you send it as the next message of agent?" + * Evaluated based on whether the suggest is appropriate to be sent by + * agent in current context. + * Q2: "Does the suggestion move the conversation closer to resolution?" + * Evaluated based on whether the suggestion provide solutions, or answers + * customer's question or collect information from customer to resolve the + * customer's issue. + * Actual reply column contains the actual agent reply sent in the context. + * + * Generated from protobuf field string raw_human_eval_template_csv = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRawHumanEvalTemplateCsv($var) + { + GPBUtil::checkString($var, True); + $this->raw_human_eval_template_csv = $var; + + return $this; + } + + /** + * @return string + */ + public function getMetrics() + { + return $this->whichOneof("metrics"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_ModelType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_ModelType.php new file mode 100644 index 000000000000..e2d40dcac67d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_ModelType.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/CreateConversationModel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets conversation model. + * @param \Google\Cloud\Dialogflow\V2\GetConversationModelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetConversationModel(\Google\Cloud\Dialogflow\V2\GetConversationModelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/GetConversationModel', + $argument, + ['\Google\Cloud\Dialogflow\V2\ConversationModel', 'decode'], + $metadata, $options); + } + + /** + * Lists conversation models. + * @param \Google\Cloud\Dialogflow\V2\ListConversationModelsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListConversationModels(\Google\Cloud\Dialogflow\V2\ListConversationModelsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/ListConversationModels', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListConversationModelsResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes a model. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * @param \Google\Cloud\Dialogflow\V2\DeleteConversationModelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteConversationModel(\Google\Cloud\Dialogflow\V2\DeleteConversationModelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/DeleteConversationModel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deploys a model. If a model is already deployed, deploying it + * has no effect. A model can only serve prediction requests after it gets + * deployed. For article suggestion, custom model will not be used unless + * it is deployed. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * @param \Google\Cloud\Dialogflow\V2\DeployConversationModelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeployConversationModel(\Google\Cloud\Dialogflow\V2\DeployConversationModelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/DeployConversationModel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Undeploys a model. If the model is not deployed this method has no effect. + * If the model is currently being used: + * - For article suggestion, article suggestion will fallback to the default + * model if model is undeployed. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * @param \Google\Cloud\Dialogflow\V2\UndeployConversationModelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UndeployConversationModel(\Google\Cloud\Dialogflow\V2\UndeployConversationModelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/UndeployConversationModel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets an evaluation of conversation model. + * @param \Google\Cloud\Dialogflow\V2\GetConversationModelEvaluationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetConversationModelEvaluation(\Google\Cloud\Dialogflow\V2\GetConversationModelEvaluationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/GetConversationModelEvaluation', + $argument, + ['\Google\Cloud\Dialogflow\V2\ConversationModelEvaluation', 'decode'], + $metadata, $options); + } + + /** + * Lists evaluations of a conversation model. + * @param \Google\Cloud\Dialogflow\V2\ListConversationModelEvaluationsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListConversationModelEvaluations(\Google\Cloud\Dialogflow\V2\ListConversationModelEvaluationsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/ListConversationModelEvaluations', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListConversationModelEvaluationsResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates evaluation of a conversation model. + * @param \Google\Cloud\Dialogflow\V2\CreateConversationModelEvaluationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateConversationModelEvaluation(\Google\Cloud\Dialogflow\V2\CreateConversationModelEvaluationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/CreateConversationModelEvaluation', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationPhoneNumber.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationPhoneNumber.php new file mode 100644 index 000000000000..64e096436091 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationPhoneNumber.php @@ -0,0 +1,68 @@ +google.cloud.dialogflow.v2.ConversationPhoneNumber + */ +class ConversationPhoneNumber extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The phone number to connect to this conversation. + * + * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $phone_number = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $phone_number + * Output only. The phone number to connect to this conversation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The phone number to connect to this conversation. + * + * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPhoneNumber() + { + return $this->phone_number; + } + + /** + * Output only. The phone number to connect to this conversation. + * + * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPhoneNumber($var) + { + GPBUtil::checkString($var, True); + $this->phone_number = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfile.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfile.php new file mode 100644 index 000000000000..339bb74d51a8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfile.php @@ -0,0 +1,651 @@ +google.cloud.dialogflow.v2.ConversationProfile + */ +class ConversationProfile extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of this conversation profile. + * Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. Human readable name for this profile. Max length 1024 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Output only. Create time of the conversation profile. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update time of the conversation profile. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Configuration for an automated agent to use with this profile. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentConfig automated_agent_config = 3; + */ + protected $automated_agent_config = null; + /** + * Configuration for agent assistance to use with this profile. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig human_agent_assistant_config = 4; + */ + protected $human_agent_assistant_config = null; + /** + * Configuration for connecting to a live agent. + * Currently, this feature is not general available, please contact Google + * to get access. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig human_agent_handoff_config = 5; + */ + protected $human_agent_handoff_config = null; + /** + * Configuration for publishing conversation lifecycle events. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 6; + */ + protected $notification_config = null; + /** + * Configuration for logging conversation lifecycle events. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.LoggingConfig logging_config = 7; + */ + protected $logging_config = null; + /** + * Configuration for publishing new message events. Event will be sent in + * format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig new_message_event_notification_config = 8; + */ + protected $new_message_event_notification_config = null; + /** + * Settings for speech transcription. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechToTextConfig stt_config = 9; + */ + protected $stt_config = null; + /** + * Language code for the conversation profile. If not specified, the language + * is en-US. Language at ConversationProfile should be set for all non en-US + * languages. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * + * Generated from protobuf field string language_code = 10; + */ + protected $language_code = ''; + /** + * The time zone of this conversational profile from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. Defaults to America/New_York. + * + * Generated from protobuf field string time_zone = 14; + */ + protected $time_zone = ''; + /** + * Name of the CX SecuritySettings reference for the agent. + * Format: `projects//locations//securitySettings/`. + * + * Generated from protobuf field string security_settings = 13 [(.google.api.resource_reference) = { + */ + protected $security_settings = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of this conversation profile. + * Format: `projects//locations//conversationProfiles/`. + * @type string $display_name + * Required. Human readable name for this profile. Max length 1024 bytes. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the conversation profile. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update time of the conversation profile. + * @type \Google\Cloud\Dialogflow\V2\AutomatedAgentConfig $automated_agent_config + * Configuration for an automated agent to use with this profile. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig $human_agent_assistant_config + * Configuration for agent assistance to use with this profile. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig $human_agent_handoff_config + * Configuration for connecting to a live agent. + * Currently, this feature is not general available, please contact Google + * to get access. + * @type \Google\Cloud\Dialogflow\V2\NotificationConfig $notification_config + * Configuration for publishing conversation lifecycle events. + * @type \Google\Cloud\Dialogflow\V2\LoggingConfig $logging_config + * Configuration for logging conversation lifecycle events. + * @type \Google\Cloud\Dialogflow\V2\NotificationConfig $new_message_event_notification_config + * Configuration for publishing new message events. Event will be sent in + * format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] + * @type \Google\Cloud\Dialogflow\V2\SpeechToTextConfig $stt_config + * Settings for speech transcription. + * @type string $language_code + * Language code for the conversation profile. If not specified, the language + * is en-US. Language at ConversationProfile should be set for all non en-US + * languages. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * @type string $time_zone + * The time zone of this conversational profile from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. Defaults to America/New_York. + * @type string $security_settings + * Name of the CX SecuritySettings reference for the agent. + * Format: `projects//locations//securitySettings/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of this conversation profile. + * Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of this conversation profile. + * Format: `projects//locations//conversationProfiles/`. + * + * 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; + } + + /** + * Required. Human readable name for this profile. Max length 1024 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Human readable name for this profile. Max length 1024 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Create time of the conversation profile. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. Create time of the conversation profile. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. Update time of the conversation profile. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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. Update time of the conversation profile. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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; + } + + /** + * Configuration for an automated agent to use with this profile. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentConfig automated_agent_config = 3; + * @return \Google\Cloud\Dialogflow\V2\AutomatedAgentConfig|null + */ + public function getAutomatedAgentConfig() + { + return $this->automated_agent_config; + } + + public function hasAutomatedAgentConfig() + { + return isset($this->automated_agent_config); + } + + public function clearAutomatedAgentConfig() + { + unset($this->automated_agent_config); + } + + /** + * Configuration for an automated agent to use with this profile. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentConfig automated_agent_config = 3; + * @param \Google\Cloud\Dialogflow\V2\AutomatedAgentConfig $var + * @return $this + */ + public function setAutomatedAgentConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AutomatedAgentConfig::class); + $this->automated_agent_config = $var; + + return $this; + } + + /** + * Configuration for agent assistance to use with this profile. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig human_agent_assistant_config = 4; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig|null + */ + public function getHumanAgentAssistantConfig() + { + return $this->human_agent_assistant_config; + } + + public function hasHumanAgentAssistantConfig() + { + return isset($this->human_agent_assistant_config); + } + + public function clearHumanAgentAssistantConfig() + { + unset($this->human_agent_assistant_config); + } + + /** + * Configuration for agent assistance to use with this profile. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig human_agent_assistant_config = 4; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig $var + * @return $this + */ + public function setHumanAgentAssistantConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig::class); + $this->human_agent_assistant_config = $var; + + return $this; + } + + /** + * Configuration for connecting to a live agent. + * Currently, this feature is not general available, please contact Google + * to get access. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig human_agent_handoff_config = 5; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig|null + */ + public function getHumanAgentHandoffConfig() + { + return $this->human_agent_handoff_config; + } + + public function hasHumanAgentHandoffConfig() + { + return isset($this->human_agent_handoff_config); + } + + public function clearHumanAgentHandoffConfig() + { + unset($this->human_agent_handoff_config); + } + + /** + * Configuration for connecting to a live agent. + * Currently, this feature is not general available, please contact Google + * to get access. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig human_agent_handoff_config = 5; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig $var + * @return $this + */ + public function setHumanAgentHandoffConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig::class); + $this->human_agent_handoff_config = $var; + + return $this; + } + + /** + * Configuration for publishing conversation lifecycle events. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 6; + * @return \Google\Cloud\Dialogflow\V2\NotificationConfig|null + */ + public function getNotificationConfig() + { + return $this->notification_config; + } + + public function hasNotificationConfig() + { + return isset($this->notification_config); + } + + public function clearNotificationConfig() + { + unset($this->notification_config); + } + + /** + * Configuration for publishing conversation lifecycle events. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 6; + * @param \Google\Cloud\Dialogflow\V2\NotificationConfig $var + * @return $this + */ + public function setNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\NotificationConfig::class); + $this->notification_config = $var; + + return $this; + } + + /** + * Configuration for logging conversation lifecycle events. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.LoggingConfig logging_config = 7; + * @return \Google\Cloud\Dialogflow\V2\LoggingConfig|null + */ + public function getLoggingConfig() + { + return $this->logging_config; + } + + public function hasLoggingConfig() + { + return isset($this->logging_config); + } + + public function clearLoggingConfig() + { + unset($this->logging_config); + } + + /** + * Configuration for logging conversation lifecycle events. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.LoggingConfig logging_config = 7; + * @param \Google\Cloud\Dialogflow\V2\LoggingConfig $var + * @return $this + */ + public function setLoggingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\LoggingConfig::class); + $this->logging_config = $var; + + return $this; + } + + /** + * Configuration for publishing new message events. Event will be sent in + * format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig new_message_event_notification_config = 8; + * @return \Google\Cloud\Dialogflow\V2\NotificationConfig|null + */ + public function getNewMessageEventNotificationConfig() + { + return $this->new_message_event_notification_config; + } + + public function hasNewMessageEventNotificationConfig() + { + return isset($this->new_message_event_notification_config); + } + + public function clearNewMessageEventNotificationConfig() + { + unset($this->new_message_event_notification_config); + } + + /** + * Configuration for publishing new message events. Event will be sent in + * format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig new_message_event_notification_config = 8; + * @param \Google\Cloud\Dialogflow\V2\NotificationConfig $var + * @return $this + */ + public function setNewMessageEventNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\NotificationConfig::class); + $this->new_message_event_notification_config = $var; + + return $this; + } + + /** + * Settings for speech transcription. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechToTextConfig stt_config = 9; + * @return \Google\Cloud\Dialogflow\V2\SpeechToTextConfig|null + */ + public function getSttConfig() + { + return $this->stt_config; + } + + public function hasSttConfig() + { + return isset($this->stt_config); + } + + public function clearSttConfig() + { + unset($this->stt_config); + } + + /** + * Settings for speech transcription. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechToTextConfig stt_config = 9; + * @param \Google\Cloud\Dialogflow\V2\SpeechToTextConfig $var + * @return $this + */ + public function setSttConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SpeechToTextConfig::class); + $this->stt_config = $var; + + return $this; + } + + /** + * Language code for the conversation profile. If not specified, the language + * is en-US. Language at ConversationProfile should be set for all non en-US + * languages. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * + * Generated from protobuf field string language_code = 10; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Language code for the conversation profile. If not specified, the language + * is en-US. Language at ConversationProfile should be set for all non en-US + * languages. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * + * 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; + } + + /** + * The time zone of this conversational profile from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. Defaults to America/New_York. + * + * Generated from protobuf field string time_zone = 14; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * The time zone of this conversational profile from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. Defaults to America/New_York. + * + * Generated from protobuf field string time_zone = 14; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Name of the CX SecuritySettings reference for the agent. + * Format: `projects//locations//securitySettings/`. + * + * Generated from protobuf field string security_settings = 13 [(.google.api.resource_reference) = { + * @return string + */ + public function getSecuritySettings() + { + return $this->security_settings; + } + + /** + * Name of the CX SecuritySettings reference for the agent. + * Format: `projects//locations//securitySettings/`. + * + * Generated from protobuf field string security_settings = 13 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecuritySettings($var) + { + GPBUtil::checkString($var, True); + $this->security_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfilesGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfilesGrpcClient.php new file mode 100644 index 000000000000..e192f24bb23f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfilesGrpcClient.php @@ -0,0 +1,178 @@ +_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/ListConversationProfiles', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListConversationProfilesResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified conversation profile. + * @param \Google\Cloud\Dialogflow\V2\GetConversationProfileRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetConversationProfile(\Google\Cloud\Dialogflow\V2\GetConversationProfileRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/GetConversationProfile', + $argument, + ['\Google\Cloud\Dialogflow\V2\ConversationProfile', 'decode'], + $metadata, $options); + } + + /** + * Creates a conversation profile in the specified project. + * + * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] + * aren't populated in the response. You can retrieve them via + * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] + * API. + * @param \Google\Cloud\Dialogflow\V2\CreateConversationProfileRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateConversationProfile(\Google\Cloud\Dialogflow\V2\CreateConversationProfileRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/CreateConversationProfile', + $argument, + ['\Google\Cloud\Dialogflow\V2\ConversationProfile', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified conversation profile. + * + * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] + * aren't populated in the response. You can retrieve them via + * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] + * API. + * @param \Google\Cloud\Dialogflow\V2\UpdateConversationProfileRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateConversationProfile(\Google\Cloud\Dialogflow\V2\UpdateConversationProfileRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/UpdateConversationProfile', + $argument, + ['\Google\Cloud\Dialogflow\V2\ConversationProfile', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified conversation profile. + * @param \Google\Cloud\Dialogflow\V2\DeleteConversationProfileRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteConversationProfile(\Google\Cloud\Dialogflow\V2\DeleteConversationProfileRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/DeleteConversationProfile', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Adds or updates a suggestion feature in a conversation profile. + * If the conversation profile contains the type of suggestion feature for + * the participant role, it will update it. Otherwise it will insert the + * suggestion feature. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata] + * - `response`: + * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] + * + * If a long running operation to add or update suggestion feature + * config for the same conversation profile, participant role and suggestion + * feature type exists, please cancel the existing long running operation + * before sending such request, otherwise the request will be rejected. + * @param \Google\Cloud\Dialogflow\V2\SetSuggestionFeatureConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetSuggestionFeatureConfig(\Google\Cloud\Dialogflow\V2\SetSuggestionFeatureConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/SetSuggestionFeatureConfig', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Clears a suggestion feature from a conversation profile for the given + * participant role. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata] + * - `response`: + * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] + * @param \Google\Cloud\Dialogflow\V2\ClearSuggestionFeatureConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ClearSuggestionFeatureConfig(\Google\Cloud\Dialogflow\V2\ClearSuggestionFeatureConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/ClearSuggestionFeatureConfig', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_ConversationStage.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_ConversationStage.php new file mode 100644 index 000000000000..58067f8bf7d6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_ConversationStage.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Conversations/CreateConversation', + $argument, + ['\Google\Cloud\Dialogflow\V2\Conversation', 'decode'], + $metadata, $options); + } + + /** + * Returns the list of all conversations in the specified project. + * @param \Google\Cloud\Dialogflow\V2\ListConversationsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListConversations(\Google\Cloud\Dialogflow\V2\ListConversationsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/ListConversations', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListConversationsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specific conversation. + * @param \Google\Cloud\Dialogflow\V2\GetConversationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetConversation(\Google\Cloud\Dialogflow\V2\GetConversationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/GetConversation', + $argument, + ['\Google\Cloud\Dialogflow\V2\Conversation', 'decode'], + $metadata, $options); + } + + /** + * Completes the specified conversation. Finished conversations are purged + * from the database after 30 days. + * @param \Google\Cloud\Dialogflow\V2\CompleteConversationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CompleteConversation(\Google\Cloud\Dialogflow\V2\CompleteConversationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/CompleteConversation', + $argument, + ['\Google\Cloud\Dialogflow\V2\Conversation', 'decode'], + $metadata, $options); + } + + /** + * Lists messages that belong to a given conversation. + * `messages` are ordered by `create_time` in descending order. To fetch + * updates without duplication, send request with filter + * `create_time_epoch_microseconds > + * [first item's create_time of previous request]` and empty page_token. + * @param \Google\Cloud\Dialogflow\V2\ListMessagesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListMessages(\Google\Cloud\Dialogflow\V2\ListMessagesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/ListMessages', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListMessagesResponse', 'decode'], + $metadata, $options); + } + + /** + * Suggests summary for a conversation based on specific historical messages. + * The range of the messages to be used for summary can be specified in the + * request. + * @param \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SuggestConversationSummary(\Google\Cloud\Dialogflow\V2\SuggestConversationSummaryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/SuggestConversationSummary', + $argument, + ['\Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateContextRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateContextRequest.php new file mode 100644 index 000000000000..381f163a11e7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateContextRequest.php @@ -0,0 +1,132 @@ +google.cloud.dialogflow.v2.CreateContextRequest + */ +class CreateContextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The session to create a context for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The context to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The session to create a context for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @type \Google\Cloud\Dialogflow\V2\Context $context + * Required. The context to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); + parent::__construct($data); + } + + /** + * Required. The session to create a context for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 session to create a context for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 context to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Context|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Required. The context to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Context $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Context::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetOperationMetadata.php new file mode 100644 index 000000000000..2ef96b057c10 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetOperationMetadata.php @@ -0,0 +1,75 @@ +google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata + */ +class CreateConversationDatasetOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the conversation dataset that will be created. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { + */ + protected $conversation_dataset = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_dataset + * The resource name of the conversation dataset that will be created. Format: + * `projects//locations//conversationDatasets/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the conversation dataset that will be created. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getConversationDataset() + { + return $this->conversation_dataset; + } + + /** + * The resource name of the conversation dataset that will be created. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setConversationDataset($var) + { + GPBUtil::checkString($var, True); + $this->conversation_dataset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetRequest.php new file mode 100644 index 000000000000..0f58113bf857 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetRequest.php @@ -0,0 +1,116 @@ +google.cloud.dialogflow.v2.CreateConversationDatasetRequest + */ +class CreateConversationDatasetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to create conversation dataset for. Format: + * `projects//locations/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The conversation dataset to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationDataset conversation_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation_dataset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to create conversation dataset for. Format: + * `projects//locations/` + * @type \Google\Cloud\Dialogflow\V2\ConversationDataset $conversation_dataset + * Required. The conversation dataset to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to create conversation dataset for. Format: + * `projects//locations/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project to create conversation dataset for. Format: + * `projects//locations/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The conversation dataset to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationDataset conversation_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\ConversationDataset|null + */ + public function getConversationDataset() + { + return $this->conversation_dataset; + } + + public function hasConversationDataset() + { + return isset($this->conversation_dataset); + } + + public function clearConversationDataset() + { + unset($this->conversation_dataset); + } + + /** + * Required. The conversation dataset to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationDataset conversation_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\ConversationDataset $var + * @return $this + */ + public function setConversationDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationDataset::class); + $this->conversation_dataset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata.php new file mode 100644 index 000000000000..1de934923f8f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata.php @@ -0,0 +1,201 @@ +google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + */ +class CreateConversationModelEvaluationOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the conversation model. Format: + * `projects//locations//conversationModels//evaluations/` + * + * Generated from protobuf field string conversation_model_evaluation = 1; + */ + protected $conversation_model_evaluation = ''; + /** + * The resource name of the conversation model. Format: + * `projects//locations//conversationModels/` + * + * Generated from protobuf field string conversation_model = 4; + */ + protected $conversation_model = ''; + /** + * State of CreateConversationModel operation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State state = 2; + */ + protected $state = 0; + /** + * Timestamp when the request to create conversation model was submitted. The + * time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_model_evaluation + * The resource name of the conversation model. Format: + * `projects//locations//conversationModels//evaluations/` + * @type string $conversation_model + * The resource name of the conversation model. Format: + * `projects//locations//conversationModels/` + * @type int $state + * State of CreateConversationModel operation. + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp when the request to create conversation model was submitted. The + * time is measured on server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the conversation model. Format: + * `projects//locations//conversationModels//evaluations/` + * + * Generated from protobuf field string conversation_model_evaluation = 1; + * @return string + */ + public function getConversationModelEvaluation() + { + return $this->conversation_model_evaluation; + } + + /** + * The resource name of the conversation model. Format: + * `projects//locations//conversationModels//evaluations/` + * + * Generated from protobuf field string conversation_model_evaluation = 1; + * @param string $var + * @return $this + */ + public function setConversationModelEvaluation($var) + { + GPBUtil::checkString($var, True); + $this->conversation_model_evaluation = $var; + + return $this; + } + + /** + * The resource name of the conversation model. Format: + * `projects//locations//conversationModels/` + * + * Generated from protobuf field string conversation_model = 4; + * @return string + */ + public function getConversationModel() + { + return $this->conversation_model; + } + + /** + * The resource name of the conversation model. Format: + * `projects//locations//conversationModels/` + * + * Generated from protobuf field string conversation_model = 4; + * @param string $var + * @return $this + */ + public function setConversationModel($var) + { + GPBUtil::checkString($var, True); + $this->conversation_model = $var; + + return $this; + } + + /** + * State of CreateConversationModel operation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of CreateConversationModel operation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\CreateConversationModelEvaluationOperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * Timestamp when the request to create conversation model was submitted. The + * time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @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); + } + + /** + * Timestamp when the request to create conversation model was submitted. The + * time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata/State.php new file mode 100644 index 000000000000..f4ccf021f2f8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata/State.php @@ -0,0 +1,85 @@ +google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State + */ +class State +{ + /** + * Operation status not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The operation is being prepared. + * + * Generated from protobuf enum INITIALIZING = 1; + */ + const INITIALIZING = 1; + /** + * The operation is running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The operation is cancelled. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * The operation has succeeded. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * The operation has failed. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::INITIALIZING => 'INITIALIZING', + self::RUNNING => 'RUNNING', + self::CANCELLED => 'CANCELLED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + 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\Dialogflow\V2\CreateConversationModelEvaluationOperationMetadata_State::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata_State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata_State.php new file mode 100644 index 000000000000..c126c91cf89b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata_State.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + */ +class CreateConversationModelEvaluationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation model resource name. Format: + * `projects//locations//conversationModels/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The conversation model evaluation to be created. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation_model_evaluation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The conversation model resource name. Format: + * `projects//locations//conversationModels/` + * @type \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation $conversation_model_evaluation + * Required. The conversation model evaluation to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation model resource name. Format: + * `projects//locations//conversationModels/` + * + * 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 conversation model resource name. Format: + * `projects//locations//conversationModels/` + * + * 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 model evaluation to be created. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation|null + */ + public function getConversationModelEvaluation() + { + return $this->conversation_model_evaluation; + } + + public function hasConversationModelEvaluation() + { + return isset($this->conversation_model_evaluation); + } + + public function clearConversationModelEvaluation() + { + unset($this->conversation_model_evaluation); + } + + /** + * Required. The conversation model evaluation to be created. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation $var + * @return $this + */ + public function setConversationModelEvaluation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation::class); + $this->conversation_model_evaluation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata.php new file mode 100644 index 000000000000..3ec1f691d67a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata.php @@ -0,0 +1,155 @@ +google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + */ +class CreateConversationModelOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + */ + protected $conversation_model = ''; + /** + * State of CreateConversationModel operation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State state = 2; + */ + protected $state = 0; + /** + * Timestamp when the request to create conversation model is submitted. The + * time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_model + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * @type int $state + * State of CreateConversationModel operation. + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp when the request to create conversation model is submitted. The + * time is measured on server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + * @return string + */ + public function getConversationModel() + { + return $this->conversation_model; + } + + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + * @param string $var + * @return $this + */ + public function setConversationModel($var) + { + GPBUtil::checkString($var, True); + $this->conversation_model = $var; + + return $this; + } + + /** + * State of CreateConversationModel operation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of CreateConversationModel operation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\CreateConversationModelOperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * Timestamp when the request to create conversation model is submitted. The + * time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @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); + } + + /** + * Timestamp when the request to create conversation model is submitted. The + * time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata/State.php new file mode 100644 index 000000000000..798f8671039b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata/State.php @@ -0,0 +1,94 @@ +google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is submitted, but training has not started yet. + * The model may remain in this state until there is enough capacity to + * start training. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The training has succeeded. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The training has succeeded. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The training has been cancelled. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + /** + * The training is in cancelling state. + * + * Generated from protobuf enum CANCELLING = 5; + */ + const CANCELLING = 5; + /** + * Custom model is training. + * + * Generated from protobuf enum TRAINING = 6; + */ + const TRAINING = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + self::CANCELLING => 'CANCELLING', + self::TRAINING => 'TRAINING', + ]; + + 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\Dialogflow\V2\CreateConversationModelOperationMetadata_State::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata_State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata_State.php new file mode 100644 index 000000000000..5f10b51ca1e5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata_State.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.CreateConversationModelRequest + */ +class CreateConversationModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The project to create conversation model for. Format: + * `projects/` + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * Required. The conversation model to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel conversation_model = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation_model = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The project to create conversation model for. Format: + * `projects/` + * @type \Google\Cloud\Dialogflow\V2\ConversationModel $conversation_model + * Required. The conversation model to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The project to create conversation model for. Format: + * `projects/` + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The project to create conversation model for. Format: + * `projects/` + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The conversation model to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel conversation_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\ConversationModel|null + */ + public function getConversationModel() + { + return $this->conversation_model; + } + + public function hasConversationModel() + { + return isset($this->conversation_model); + } + + public function clearConversationModel() + { + unset($this->conversation_model); + } + + /** + * Required. The conversation model to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel conversation_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\ConversationModel $var + * @return $this + */ + public function setConversationModel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationModel::class); + $this->conversation_model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationProfileRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationProfileRequest.php new file mode 100644 index 000000000000..5366e38f60b4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationProfileRequest.php @@ -0,0 +1,116 @@ +google.cloud.dialogflow.v2.CreateConversationProfileRequest + */ +class CreateConversationProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to create a conversation profile for. + * Format: `projects//locations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The conversation profile to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation_profile = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to create a conversation profile for. + * Format: `projects//locations/`. + * @type \Google\Cloud\Dialogflow\V2\ConversationProfile $conversation_profile + * Required. The conversation profile to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to create a conversation profile for. + * Format: `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 project to create a conversation profile for. + * Format: `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 conversation profile to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\ConversationProfile|null + */ + public function getConversationProfile() + { + return $this->conversation_profile; + } + + public function hasConversationProfile() + { + return isset($this->conversation_profile); + } + + public function clearConversationProfile() + { + unset($this->conversation_profile); + } + + /** + * Required. The conversation profile to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\ConversationProfile $var + * @return $this + */ + public function setConversationProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationProfile::class); + $this->conversation_profile = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationRequest.php new file mode 100644 index 000000000000..f647fe15b59f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationRequest.php @@ -0,0 +1,182 @@ +google.cloud.dialogflow.v2.CreateConversationRequest + */ +class CreateConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource identifier of the project creating the conversation. + * Format: `projects//locations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The conversation to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation = null; + /** + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a + * auto-generated one to you. + * The conversation ID must be compliant with the regression fomula + * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. + * If the field is provided, the caller is resposible for + * 1. the uniqueness of the ID, otherwise the request will be rejected. + * 2. the consistency for whether to use custom ID or not under a project to + * better ensure uniqueness. + * + * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $conversation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource identifier of the project creating the conversation. + * Format: `projects//locations/`. + * @type \Google\Cloud\Dialogflow\V2\Conversation $conversation + * Required. The conversation to create. + * @type string $conversation_id + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a + * auto-generated one to you. + * The conversation ID must be compliant with the regression fomula + * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. + * If the field is provided, the caller is resposible for + * 1. the uniqueness of the ID, otherwise the request will be rejected. + * 2. the consistency for whether to use custom ID or not under a project to + * better ensure uniqueness. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource identifier of the project creating the conversation. + * Format: `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. Resource identifier of the project creating the conversation. + * Format: `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 conversation to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Conversation|null + */ + public function getConversation() + { + return $this->conversation; + } + + public function hasConversation() + { + return isset($this->conversation); + } + + public function clearConversation() + { + unset($this->conversation); + } + + /** + * Required. The conversation to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Conversation $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Conversation::class); + $this->conversation = $var; + + return $this; + } + + /** + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a + * auto-generated one to you. + * The conversation ID must be compliant with the regression fomula + * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. + * If the field is provided, the caller is resposible for + * 1. the uniqueness of the ID, otherwise the request will be rejected. + * 2. the consistency for whether to use custom ID or not under a project to + * better ensure uniqueness. + * + * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getConversationId() + { + return $this->conversation_id; + } + + /** + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a + * auto-generated one to you. + * The conversation ID must be compliant with the regression fomula + * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. + * If the field is provided, the caller is resposible for + * 1. the uniqueness of the ID, otherwise the request will be rejected. + * 2. the consistency for whether to use custom ID or not under a project to + * better ensure uniqueness. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateDocumentRequest.php new file mode 100644 index 000000000000..29adcf74cb60 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateDocumentRequest.php @@ -0,0 +1,120 @@ +google.cloud.dialogflow.v2.CreateDocumentRequest + */ +class CreateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The knowledge base to create a document for. + * Format: `projects//locations//knowledgeBases/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The document to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The knowledge base to create a document for. + * Format: `projects//locations//knowledgeBases/`. + * @type \Google\Cloud\Dialogflow\V2\Document $document + * Required. The document to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The knowledge base to create a document for. + * Format: `projects//locations//knowledgeBases/`. + * + * 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 knowledge base to create a document for. + * Format: `projects//locations//knowledgeBases/`. + * + * 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 document to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The document to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Document::class); + $this->document = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEntityTypeRequest.php new file mode 100644 index 000000000000..9c80cfb76b73 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEntityTypeRequest.php @@ -0,0 +1,166 @@ +google.cloud.dialogflow.v2.CreateEntityTypeRequest + */ +class CreateEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create a entity type for. + * Format: `projects//agent`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The entity type to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_type = null; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create a entity type for. + * Format: `projects//agent`. + * @type \Google\Cloud\Dialogflow\V2\EntityType $entity_type + * Required. The entity type to create. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create a entity type for. + * Format: `projects//agent`. + * + * 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 agent to create a entity type for. + * Format: `projects//agent`. + * + * 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 entity type to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\EntityType|null + */ + public function getEntityType() + { + return $this->entity_type; + } + + public function hasEntityType() + { + return isset($this->entity_type); + } + + public function clearEntityType() + { + unset($this->entity_type); + } + + /** + * Required. The entity type to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\EntityType $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EntityType::class); + $this->entity_type = $var; + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEnvironmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEnvironmentRequest.php new file mode 100644 index 000000000000..44e1ccca9286 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEnvironmentRequest.php @@ -0,0 +1,158 @@ +google.cloud.dialogflow.v2.CreateEnvironmentRequest + */ +class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create an environment for. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The environment to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment = null; + /** + * Required. The unique id of the new environment. + * + * Generated from protobuf field string environment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create an environment for. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * @type \Google\Cloud\Dialogflow\V2\Environment $environment + * Required. The environment to create. + * @type string $environment_id + * Required. The unique id of the new environment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create an environment for. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * + * 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 agent to create an environment for. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * + * 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 environment to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Required. The environment to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Environment::class); + $this->environment = $var; + + return $this; + } + + /** + * Required. The unique id of the new environment. + * + * Generated from protobuf field string environment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEnvironmentId() + { + return $this->environment_id; + } + + /** + * Required. The unique id of the new environment. + * + * Generated from protobuf field string environment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEnvironmentId($var) + { + GPBUtil::checkString($var, True); + $this->environment_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateIntentRequest.php new file mode 100644 index 000000000000..1694d3a61ac7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateIntentRequest.php @@ -0,0 +1,200 @@ +google.cloud.dialogflow.v2.CreateIntentRequest + */ +class CreateIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create a intent for. + * Format: `projects//agent`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The intent to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intent = null; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $intent_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create a intent for. + * Format: `projects//agent`. + * @type \Google\Cloud\Dialogflow\V2\Intent $intent + * Required. The intent to create. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type int $intent_view + * Optional. The resource view to apply to the returned intent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create a intent for. + * Format: `projects//agent`. + * + * 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 agent to create a intent for. + * Format: `projects//agent`. + * + * 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 intent to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Intent|null + */ + public function getIntent() + { + return $this->intent; + } + + public function hasIntent() + { + return isset($this->intent); + } + + public function clearIntent() + { + unset($this->intent); + } + + /** + * Required. The intent to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Intent $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent::class); + $this->intent = $var; + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIntentView() + { + return $this->intent_view; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIntentView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); + $this->intent_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateKnowledgeBaseRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateKnowledgeBaseRequest.php new file mode 100644 index 000000000000..e5eeb073de18 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateKnowledgeBaseRequest.php @@ -0,0 +1,116 @@ +google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest + */ +class CreateKnowledgeBaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to create a knowledge base for. + * Format: `projects//locations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The knowledge base to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $knowledge_base = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to create a knowledge base for. + * Format: `projects//locations/`. + * @type \Google\Cloud\Dialogflow\V2\KnowledgeBase $knowledge_base + * Required. The knowledge base to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to create a knowledge base for. + * Format: `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 project to create a knowledge base for. + * Format: `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 knowledge base to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\KnowledgeBase|null + */ + public function getKnowledgeBase() + { + return $this->knowledge_base; + } + + public function hasKnowledgeBase() + { + return isset($this->knowledge_base); + } + + public function clearKnowledgeBase() + { + unset($this->knowledge_base); + } + + /** + * Required. The knowledge base to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\KnowledgeBase $var + * @return $this + */ + public function setKnowledgeBase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\KnowledgeBase::class); + $this->knowledge_base = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateParticipantRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateParticipantRequest.php new file mode 100644 index 000000000000..8c0b12acfa47 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateParticipantRequest.php @@ -0,0 +1,120 @@ +google.cloud.dialogflow.v2.CreateParticipantRequest + */ +class CreateParticipantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource identifier of the conversation adding the participant. + * Format: `projects//locations//conversations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The participant to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $participant = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource identifier of the conversation adding the participant. + * Format: `projects//locations//conversations/`. + * @type \Google\Cloud\Dialogflow\V2\Participant $participant + * Required. The participant to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource identifier of the conversation adding the participant. + * Format: `projects//locations//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. Resource identifier of the conversation adding the participant. + * Format: `projects//locations//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; + } + + /** + * Required. The participant to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Participant|null + */ + public function getParticipant() + { + return $this->participant; + } + + public function hasParticipant() + { + return isset($this->participant); + } + + public function clearParticipant() + { + unset($this->participant); + } + + /** + * Required. The participant to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Participant $var + * @return $this + */ + public function setParticipant($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Participant::class); + $this->participant = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateSessionEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateSessionEntityTypeRequest.php new file mode 100644 index 000000000000..5c2b2a422583 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateSessionEntityTypeRequest.php @@ -0,0 +1,132 @@ +google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest + */ +class CreateSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The session to create a session entity type for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The session entity type to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session_entity_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The session to create a session entity type for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @type \Google\Cloud\Dialogflow\V2\SessionEntityType $session_entity_type + * Required. The session entity type to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The session to create a session entity type for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 session to create a session entity type for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 session entity type to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\SessionEntityType|null + */ + public function getSessionEntityType() + { + return $this->session_entity_type; + } + + public function hasSessionEntityType() + { + return isset($this->session_entity_type); + } + + public function clearSessionEntityType() + { + unset($this->session_entity_type); + } + + /** + * Required. The session entity type to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\SessionEntityType $var + * @return $this + */ + public function setSessionEntityType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); + $this->session_entity_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateVersionRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateVersionRequest.php new file mode 100644 index 000000000000..3d3c91dffc0c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateVersionRequest.php @@ -0,0 +1,124 @@ +google.cloud.dialogflow.v2.CreateVersionRequest + */ +class CreateVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create a version for. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The version to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create a version for. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * @type \Google\Cloud\Dialogflow\V2\Version $version + * Required. The version to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create a version for. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * + * 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 agent to create a version for. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * + * 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 version to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Version|null + */ + public function getVersion() + { + return $this->version; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * Required. The version to create. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Version $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Version::class); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAgentRequest.php new file mode 100644 index 000000000000..6b1cd54033e9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAgentRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.DeleteAgentRequest + */ +class DeleteAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that the agent to delete is associated with. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project that the agent to delete is associated with. + * Format: `projects/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that the agent to delete is associated with. + * Format: `projects/`. + * + * 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 project that the agent to delete is associated with. + * Format: `projects/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAllContextsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAllContextsRequest.php new file mode 100644 index 000000000000..707d66c4d4cf --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAllContextsRequest.php @@ -0,0 +1,88 @@ +google.cloud.dialogflow.v2.DeleteAllContextsRequest + */ +class DeleteAllContextsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session to delete all contexts from. Format: + * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified we assume default 'draft' environment. + * If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the session to delete all contexts from. Format: + * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified we assume default 'draft' environment. + * If `User ID` is not specified, we assume default '-' user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session to delete all contexts from. Format: + * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified we assume default 'draft' environment. + * If `User ID` is not specified, we assume default '-' user. + * + * 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 name of the session to delete all contexts from. Format: + * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified we assume default 'draft' environment. + * If `User ID` is not specified, we assume default '-' user. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteContextRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteContextRequest.php new file mode 100644 index 000000000000..a5e2e38b9056 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteContextRequest.php @@ -0,0 +1,88 @@ +google.cloud.dialogflow.v2.DeleteContextRequest + */ +class DeleteContextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the context to delete. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the context to delete. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the context to delete. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 context to delete. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetOperationMetadata.php new file mode 100644 index 000000000000..5fb0b3ce7894 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetOperationMetadata.php @@ -0,0 +1,33 @@ +google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata + */ +class DeleteConversationDatasetOperationMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetRequest.php new file mode 100644 index 000000000000..f5524623fac6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + */ +class DeleteConversationDatasetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation dataset to delete. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The conversation dataset to delete. Format: + * `projects//locations//conversationDatasets/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation dataset to delete. Format: + * `projects//locations//conversationDatasets/` + * + * 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 conversation dataset to delete. Format: + * `projects//locations//conversationDatasets/` + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelOperationMetadata.php new file mode 100644 index 000000000000..30cc0069d1d4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelOperationMetadata.php @@ -0,0 +1,121 @@ +google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + */ +class DeleteConversationModelOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + */ + protected $conversation_model = ''; + /** + * Timestamp when delete conversation model request was created. The time is + * measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_model + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp when delete conversation model request was created. The time is + * measured on server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + * @return string + */ + public function getConversationModel() + { + return $this->conversation_model; + } + + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + * @param string $var + * @return $this + */ + public function setConversationModel($var) + { + GPBUtil::checkString($var, True); + $this->conversation_model = $var; + + return $this; + } + + /** + * Timestamp when delete conversation model request was created. The time is + * measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @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); + } + + /** + * Timestamp when delete conversation model request was created. The time is + * measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelRequest.php new file mode 100644 index 000000000000..7545b3cd3cb2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.DeleteConversationModelRequest + */ +class DeleteConversationModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation model to delete. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The conversation model to delete. Format: + * `projects//conversationModels/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation model to delete. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The conversation model to delete. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationProfileRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationProfileRequest.php new file mode 100644 index 000000000000..88bef673b252 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationProfileRequest.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.v2.DeleteConversationProfileRequest + */ +class DeleteConversationProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the conversation profile to delete. + * Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the conversation profile to delete. + * Format: `projects//locations//conversationProfiles/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the conversation profile to delete. + * Format: `projects//locations//conversationProfiles/`. + * + * 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 profile to delete. + * Format: `projects//locations//conversationProfiles/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteDocumentRequest.php new file mode 100644 index 000000000000..f56614d719ef --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteDocumentRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.DeleteDocumentRequest + */ +class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the document to delete. + * Format: `projects//locations//knowledgeBases//documents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the document to delete. + * Format: `projects//locations//knowledgeBases//documents/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the document to delete. + * Format: `projects//locations//knowledgeBases//documents/`. + * + * 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 document to delete. + * Format: `projects//locations//knowledgeBases//documents/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEntityTypeRequest.php new file mode 100644 index 000000000000..3f2bd0508abe --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEntityTypeRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.DeleteEntityTypeRequest + */ +class DeleteEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entity type to delete. + * Format: `projects//agent/entityTypes/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entity type to delete. + * Format: `projects//agent/entityTypes/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entity type to delete. + * Format: `projects//agent/entityTypes/`. + * + * 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 entity type to delete. + * Format: `projects//agent/entityTypes/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEnvironmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEnvironmentRequest.php new file mode 100644 index 000000000000..4ff70b6dccd5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEnvironmentRequest.php @@ -0,0 +1,88 @@ +google.cloud.dialogflow.v2.DeleteEnvironmentRequest + */ +class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the environment to delete. + * / Format: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the environment to delete. + * / Format: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the environment to delete. + * / Format: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * 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 environment to delete. + * / Format: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteIntentRequest.php new file mode 100644 index 000000000000..eb30399e5bc9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteIntentRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.DeleteIntentRequest + */ +class DeleteIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the intent to delete. If this intent has direct or + * indirect followup intents, we also delete them. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the intent to delete. If this intent has direct or + * indirect followup intents, we also delete them. + * Format: `projects//agent/intents/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the intent to delete. If this intent has direct or + * indirect followup intents, we also delete them. + * Format: `projects//agent/intents/`. + * + * 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 intent to delete. If this intent has direct or + * indirect followup intents, we also delete them. + * Format: `projects//agent/intents/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteKnowledgeBaseRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteKnowledgeBaseRequest.php new file mode 100644 index 000000000000..7d322f674750 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteKnowledgeBaseRequest.php @@ -0,0 +1,114 @@ +google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest + */ +class DeleteKnowledgeBaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the knowledge base to delete. + * Format: `projects//locations//knowledgeBases/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Force deletes the knowledge base. When set to true, any documents + * in the knowledge base are also deleted. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the knowledge base to delete. + * Format: `projects//locations//knowledgeBases/`. + * @type bool $force + * Optional. Force deletes the knowledge base. When set to true, any documents + * in the knowledge base are also deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the knowledge base to delete. + * Format: `projects//locations//knowledgeBases/`. + * + * 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 knowledge base to delete. + * Format: `projects//locations//knowledgeBases/`. + * + * 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; + } + + /** + * Optional. Force deletes the knowledge base. When set to true, any documents + * in the knowledge base are also deleted. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. Force deletes the knowledge base. When set to true, any documents + * in the knowledge base are also deleted. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteSessionEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteSessionEntityTypeRequest.php new file mode 100644 index 000000000000..669b5a3411cb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteSessionEntityTypeRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest + */ +class DeleteSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entity type to delete. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entity type to delete. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entity type to delete. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 entity type to delete. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteVersionRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteVersionRequest.php new file mode 100644 index 000000000000..5c06dd31709c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteVersionRequest.php @@ -0,0 +1,84 @@ +google.cloud.dialogflow.v2.DeleteVersionRequest + */ +class DeleteVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the version to delete. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the version to delete. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the version to delete. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * 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 version to delete. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelOperationMetadata.php new file mode 100644 index 000000000000..fd4a874258f5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelOperationMetadata.php @@ -0,0 +1,121 @@ +google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + */ +class DeployConversationModelOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + */ + protected $conversation_model = ''; + /** + * Timestamp when request to deploy conversation model was submitted. The time + * is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_model + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp when request to deploy conversation model was submitted. The time + * is measured on server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + * @return string + */ + public function getConversationModel() + { + return $this->conversation_model; + } + + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + * @param string $var + * @return $this + */ + public function setConversationModel($var) + { + GPBUtil::checkString($var, True); + $this->conversation_model = $var; + + return $this; + } + + /** + * Timestamp when request to deploy conversation model was submitted. The time + * is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @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); + } + + /** + * Timestamp when request to deploy conversation model was submitted. The time + * is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelRequest.php new file mode 100644 index 000000000000..13c3d0a67d6d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.DeployConversationModelRequest + */ +class DeployConversationModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation model to deploy. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The conversation model to deploy. Format: + * `projects//conversationModels/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation model to deploy. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The conversation model to deploy. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentRequest.php new file mode 100644 index 000000000000..c20750031180 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentRequest.php @@ -0,0 +1,389 @@ +google.cloud.dialogflow.v2.DetectIntentRequest + */ +class DetectIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session this query is sent to. Format: + * `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment (`Environment ID` might be referred to as + * environment name at some places). If `User ID` is not specified, we are + * using "-". It's up to the API caller to choose an appropriate `Session ID` + * and `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $session = ''; + /** + * The parameters of this query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; + */ + protected $query_params = null; + /** + * Required. The input specification. It can be set to: + * 1. an audio config + * which instructs the speech recognizer how to process the speech audio, + * 2. a conversational query in the form of text, or + * 3. an event that specifies which intent to trigger. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query_input = null; + /** + * Instructs the speech synthesizer how to generate the output + * audio. If this field is not set and agent-level speech synthesizer is not + * configured, no output audio is generated. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 4; + */ + protected $output_audio_config = null; + /** + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. + * + * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; + */ + protected $output_audio_config_mask = null; + /** + * The natural language speech audio to be processed. This field + * should be populated iff `query_input` is set to an input audio config. + * A single request can contain up to 1 minute of speech audio data. + * + * Generated from protobuf field bytes input_audio = 5; + */ + protected $input_audio = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $session + * Required. The name of the session this query is sent to. Format: + * `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment (`Environment ID` might be referred to as + * environment name at some places). If `User ID` is not specified, we are + * using "-". It's up to the API caller to choose an appropriate `Session ID` + * and `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @type \Google\Cloud\Dialogflow\V2\QueryParameters $query_params + * The parameters of this query. + * @type \Google\Cloud\Dialogflow\V2\QueryInput $query_input + * Required. The input specification. It can be set to: + * 1. an audio config + * which instructs the speech recognizer how to process the speech audio, + * 2. a conversational query in the form of text, or + * 3. an event that specifies which intent to trigger. + * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $output_audio_config + * Instructs the speech synthesizer how to generate the output + * audio. If this field is not set and agent-level speech synthesizer is not + * configured, no output audio is generated. + * @type \Google\Protobuf\FieldMask $output_audio_config_mask + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. + * @type string $input_audio + * The natural language speech audio to be processed. This field + * should be populated iff `query_input` is set to an input audio config. + * A single request can contain up to 1 minute of speech audio data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session this query is sent to. Format: + * `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment (`Environment ID` might be referred to as + * environment name at some places). If `User ID` is not specified, we are + * using "-". It's up to the API caller to choose an appropriate `Session ID` + * and `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * Required. The name of the session this query is sent to. Format: + * `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment (`Environment ID` might be referred to as + * environment name at some places). If `User ID` is not specified, we are + * using "-". It's up to the API caller to choose an appropriate `Session ID` + * and `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + + /** + * The parameters of this query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; + * @return \Google\Cloud\Dialogflow\V2\QueryParameters|null + */ + public function getQueryParams() + { + return $this->query_params; + } + + public function hasQueryParams() + { + return isset($this->query_params); + } + + public function clearQueryParams() + { + unset($this->query_params); + } + + /** + * The parameters of this query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; + * @param \Google\Cloud\Dialogflow\V2\QueryParameters $var + * @return $this + */ + public function setQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class); + $this->query_params = $var; + + return $this; + } + + /** + * Required. The input specification. It can be set to: + * 1. an audio config + * which instructs the speech recognizer how to process the speech audio, + * 2. a conversational query in the form of text, or + * 3. an event that specifies which intent to trigger. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\QueryInput|null + */ + public function getQueryInput() + { + return $this->query_input; + } + + public function hasQueryInput() + { + return isset($this->query_input); + } + + public function clearQueryInput() + { + unset($this->query_input); + } + + /** + * Required. The input specification. It can be set to: + * 1. an audio config + * which instructs the speech recognizer how to process the speech audio, + * 2. a conversational query in the form of text, or + * 3. an event that specifies which intent to trigger. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\QueryInput $var + * @return $this + */ + public function setQueryInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryInput::class); + $this->query_input = $var; + + return $this; + } + + /** + * Instructs the speech synthesizer how to generate the output + * audio. If this field is not set and agent-level speech synthesizer is not + * configured, no output audio is generated. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 4; + * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null + */ + public function getOutputAudioConfig() + { + return $this->output_audio_config; + } + + public function hasOutputAudioConfig() + { + return isset($this->output_audio_config); + } + + public function clearOutputAudioConfig() + { + unset($this->output_audio_config); + } + + /** + * Instructs the speech synthesizer how to generate the output + * audio. If this field is not set and agent-level speech synthesizer is not + * configured, no output audio is generated. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 4; + * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var + * @return $this + */ + public function setOutputAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); + $this->output_audio_config = $var; + + return $this; + } + + /** + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. + * + * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; + * @return \Google\Protobuf\FieldMask|null + */ + public function getOutputAudioConfigMask() + { + return $this->output_audio_config_mask; + } + + public function hasOutputAudioConfigMask() + { + return isset($this->output_audio_config_mask); + } + + public function clearOutputAudioConfigMask() + { + unset($this->output_audio_config_mask); + } + + /** + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. + * + * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setOutputAudioConfigMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->output_audio_config_mask = $var; + + return $this; + } + + /** + * The natural language speech audio to be processed. This field + * should be populated iff `query_input` is set to an input audio config. + * A single request can contain up to 1 minute of speech audio data. + * + * Generated from protobuf field bytes input_audio = 5; + * @return string + */ + public function getInputAudio() + { + return $this->input_audio; + } + + /** + * The natural language speech audio to be processed. This field + * should be populated iff `query_input` is set to an input audio config. + * A single request can contain up to 1 minute of speech audio data. + * + * Generated from protobuf field bytes input_audio = 5; + * @param string $var + * @return $this + */ + public function setInputAudio($var) + { + GPBUtil::checkString($var, False); + $this->input_audio = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentResponse.php new file mode 100644 index 000000000000..8c07c511577f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentResponse.php @@ -0,0 +1,273 @@ +google.cloud.dialogflow.v2.DetectIntentResponse + */ +class DetectIntentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the response. It can be used to + * locate a response in the training example set or for reporting issues. + * + * Generated from protobuf field string response_id = 1; + */ + protected $response_id = ''; + /** + * The selected results of the conversational query or event processing. + * See `alternative_query_results` for additional potential results. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; + */ + protected $query_result = null; + /** + * Specifies the status of the webhook request. + * + * Generated from protobuf field .google.rpc.Status webhook_status = 3; + */ + protected $webhook_status = null; + /** + * The audio data bytes encoded as specified in the request. + * Note: The output audio is generated based on the values of default platform + * text responses found in the `query_result.fulfillment_messages` field. If + * multiple default text responses exist, they will be concatenated when + * generating audio. If no default platform text responses exist, the + * generated audio content will be empty. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field bytes output_audio = 4; + */ + protected $output_audio = ''; + /** + * The config used by the speech synthesizer to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; + */ + protected $output_audio_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $response_id + * The unique identifier of the response. It can be used to + * locate a response in the training example set or for reporting issues. + * @type \Google\Cloud\Dialogflow\V2\QueryResult $query_result + * The selected results of the conversational query or event processing. + * See `alternative_query_results` for additional potential results. + * @type \Google\Rpc\Status $webhook_status + * Specifies the status of the webhook request. + * @type string $output_audio + * The audio data bytes encoded as specified in the request. + * Note: The output audio is generated based on the values of default platform + * text responses found in the `query_result.fulfillment_messages` field. If + * multiple default text responses exist, they will be concatenated when + * generating audio. If no default platform text responses exist, the + * generated audio content will be empty. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $output_audio_config + * The config used by the speech synthesizer to generate the output audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the response. It can be used to + * locate a response in the training example set or for reporting issues. + * + * Generated from protobuf field string response_id = 1; + * @return string + */ + public function getResponseId() + { + return $this->response_id; + } + + /** + * The unique identifier of the response. It can be used to + * locate a response in the training example set or for reporting issues. + * + * Generated from protobuf field string response_id = 1; + * @param string $var + * @return $this + */ + public function setResponseId($var) + { + GPBUtil::checkString($var, True); + $this->response_id = $var; + + return $this; + } + + /** + * The selected results of the conversational query or event processing. + * See `alternative_query_results` for additional potential results. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; + * @return \Google\Cloud\Dialogflow\V2\QueryResult|null + */ + public function getQueryResult() + { + return $this->query_result; + } + + public function hasQueryResult() + { + return isset($this->query_result); + } + + public function clearQueryResult() + { + unset($this->query_result); + } + + /** + * The selected results of the conversational query or event processing. + * See `alternative_query_results` for additional potential results. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; + * @param \Google\Cloud\Dialogflow\V2\QueryResult $var + * @return $this + */ + public function setQueryResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryResult::class); + $this->query_result = $var; + + return $this; + } + + /** + * Specifies the status of the webhook request. + * + * Generated from protobuf field .google.rpc.Status webhook_status = 3; + * @return \Google\Rpc\Status|null + */ + public function getWebhookStatus() + { + return $this->webhook_status; + } + + public function hasWebhookStatus() + { + return isset($this->webhook_status); + } + + public function clearWebhookStatus() + { + unset($this->webhook_status); + } + + /** + * Specifies the status of the webhook request. + * + * Generated from protobuf field .google.rpc.Status webhook_status = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setWebhookStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->webhook_status = $var; + + return $this; + } + + /** + * The audio data bytes encoded as specified in the request. + * Note: The output audio is generated based on the values of default platform + * text responses found in the `query_result.fulfillment_messages` field. If + * multiple default text responses exist, they will be concatenated when + * generating audio. If no default platform text responses exist, the + * generated audio content will be empty. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field bytes output_audio = 4; + * @return string + */ + public function getOutputAudio() + { + return $this->output_audio; + } + + /** + * The audio data bytes encoded as specified in the request. + * Note: The output audio is generated based on the values of default platform + * text responses found in the `query_result.fulfillment_messages` field. If + * multiple default text responses exist, they will be concatenated when + * generating audio. If no default platform text responses exist, the + * generated audio content will be empty. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field bytes output_audio = 4; + * @param string $var + * @return $this + */ + public function setOutputAudio($var) + { + GPBUtil::checkString($var, False); + $this->output_audio = $var; + + return $this; + } + + /** + * The config used by the speech synthesizer to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; + * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null + */ + public function getOutputAudioConfig() + { + return $this->output_audio_config; + } + + public function hasOutputAudioConfig() + { + return isset($this->output_audio_config); + } + + public function clearOutputAudioConfig() + { + unset($this->output_audio_config); + } + + /** + * The config used by the speech synthesizer to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; + * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var + * @return $this + */ + public function setOutputAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); + $this->output_audio_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document.php new file mode 100644 index 000000000000..f7222ebf90e6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document.php @@ -0,0 +1,500 @@ +google.cloud.dialogflow.v2.Document + */ +class Document extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The document resource name. + * The name must be empty when creating a document. + * Format: `projects//locations//knowledgeBases//documents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Required. The display name of the document. The name must be 1024 bytes or + * less; otherwise, the creation request fails. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. The MIME type of this document. + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mime_type = ''; + /** + * Required. The knowledge type of document content. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $knowledge_types; + /** + * Optional. If true, we try to automatically reload the document every day + * (at a time picked by the system). If false or unspecified, we don't try + * to automatically reload the document. + * Currently you can only enable automatic reload for documents sourced from + * a public url, see `source` field for the source types. + * Reload status can be tracked in `latest_reload_status`. If a reload + * fails, we will keep the document unchanged. + * If a reload fails with internal errors, the system will try to reload the + * document on the next day. + * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the + * system will not try to reload the document anymore. You need to manually + * reload the document successfully by calling `ReloadDocument` and clear the + * errors. + * + * Generated from protobuf field bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_auto_reload = false; + /** + * Output only. The time and status of the latest reload. + * This reload may have been triggered automatically or manually + * and may not have succeeded. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_reload_status = null; + /** + * Optional. Metadata for the document. The metadata supports arbitrary + * key-value pairs. Suggested use cases include storing a document's title, + * an external URL distinct from the document's content_uri, etc. + * The max size of a `key` or a `value` of the metadata is 1024 bytes. + * + * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $metadata; + /** + * Output only. The current state of the document. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. The document resource name. + * The name must be empty when creating a document. + * Format: `projects//locations//knowledgeBases//documents/`. + * @type string $display_name + * Required. The display name of the document. The name must be 1024 bytes or + * less; otherwise, the creation request fails. + * @type string $mime_type + * Required. The MIME type of this document. + * @type array|\Google\Protobuf\Internal\RepeatedField $knowledge_types + * Required. The knowledge type of document content. + * @type string $content_uri + * The URI where the file content is located. + * For documents stored in Google Cloud Storage, these URIs must have + * the form `gs:///`. + * NOTE: External URLs must correspond to public webpages, i.e., they must + * be indexed by Google Search. In particular, URLs for showing documents in + * Google Cloud Storage (i.e. the URL in your browser) are not supported. + * Instead use the `gs://` format URI described above. + * @type string $raw_content + * The raw content of the document. This field is only permitted for + * EXTRACTIVE_QA and FAQ knowledge types. + * @type bool $enable_auto_reload + * Optional. If true, we try to automatically reload the document every day + * (at a time picked by the system). If false or unspecified, we don't try + * to automatically reload the document. + * Currently you can only enable automatic reload for documents sourced from + * a public url, see `source` field for the source types. + * Reload status can be tracked in `latest_reload_status`. If a reload + * fails, we will keep the document unchanged. + * If a reload fails with internal errors, the system will try to reload the + * document on the next day. + * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the + * system will not try to reload the document anymore. You need to manually + * reload the document successfully by calling `ReloadDocument` and clear the + * errors. + * @type \Google\Cloud\Dialogflow\V2\Document\ReloadStatus $latest_reload_status + * Output only. The time and status of the latest reload. + * This reload may have been triggered automatically or manually + * and may not have succeeded. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Optional. Metadata for the document. The metadata supports arbitrary + * key-value pairs. Suggested use cases include storing a document's title, + * an external URL distinct from the document's content_uri, etc. + * The max size of a `key` or a `value` of the metadata is 1024 bytes. + * @type int $state + * Output only. The current state of the document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The document resource name. + * The name must be empty when creating a document. + * Format: `projects//locations//knowledgeBases//documents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. The document resource name. + * The name must be empty when creating a document. + * Format: `projects//locations//knowledgeBases//documents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The display name of the document. The name must be 1024 bytes or + * less; otherwise, the creation request fails. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the document. The name must be 1024 bytes or + * less; otherwise, the creation request fails. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The MIME type of this document. + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Required. The MIME type of this document. + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Required. The knowledge type of document content. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKnowledgeTypes() + { + return $this->knowledge_types; + } + + /** + * Required. The knowledge type of document content. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKnowledgeTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\Document\KnowledgeType::class); + $this->knowledge_types = $arr; + + return $this; + } + + /** + * The URI where the file content is located. + * For documents stored in Google Cloud Storage, these URIs must have + * the form `gs:///`. + * NOTE: External URLs must correspond to public webpages, i.e., they must + * be indexed by Google Search. In particular, URLs for showing documents in + * Google Cloud Storage (i.e. the URL in your browser) are not supported. + * Instead use the `gs://` format URI described above. + * + * Generated from protobuf field string content_uri = 5; + * @return string + */ + public function getContentUri() + { + return $this->readOneof(5); + } + + public function hasContentUri() + { + return $this->hasOneof(5); + } + + /** + * The URI where the file content is located. + * For documents stored in Google Cloud Storage, these URIs must have + * the form `gs:///`. + * NOTE: External URLs must correspond to public webpages, i.e., they must + * be indexed by Google Search. In particular, URLs for showing documents in + * Google Cloud Storage (i.e. the URL in your browser) are not supported. + * Instead use the `gs://` format URI described above. + * + * Generated from protobuf field string content_uri = 5; + * @param string $var + * @return $this + */ + public function setContentUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The raw content of the document. This field is only permitted for + * EXTRACTIVE_QA and FAQ knowledge types. + * + * Generated from protobuf field bytes raw_content = 9; + * @return string + */ + public function getRawContent() + { + return $this->readOneof(9); + } + + public function hasRawContent() + { + return $this->hasOneof(9); + } + + /** + * The raw content of the document. This field is only permitted for + * EXTRACTIVE_QA and FAQ knowledge types. + * + * Generated from protobuf field bytes raw_content = 9; + * @param string $var + * @return $this + */ + public function setRawContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Optional. If true, we try to automatically reload the document every day + * (at a time picked by the system). If false or unspecified, we don't try + * to automatically reload the document. + * Currently you can only enable automatic reload for documents sourced from + * a public url, see `source` field for the source types. + * Reload status can be tracked in `latest_reload_status`. If a reload + * fails, we will keep the document unchanged. + * If a reload fails with internal errors, the system will try to reload the + * document on the next day. + * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the + * system will not try to reload the document anymore. You need to manually + * reload the document successfully by calling `ReloadDocument` and clear the + * errors. + * + * Generated from protobuf field bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableAutoReload() + { + return $this->enable_auto_reload; + } + + /** + * Optional. If true, we try to automatically reload the document every day + * (at a time picked by the system). If false or unspecified, we don't try + * to automatically reload the document. + * Currently you can only enable automatic reload for documents sourced from + * a public url, see `source` field for the source types. + * Reload status can be tracked in `latest_reload_status`. If a reload + * fails, we will keep the document unchanged. + * If a reload fails with internal errors, the system will try to reload the + * document on the next day. + * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the + * system will not try to reload the document anymore. You need to manually + * reload the document successfully by calling `ReloadDocument` and clear the + * errors. + * + * Generated from protobuf field bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableAutoReload($var) + { + GPBUtil::checkBool($var); + $this->enable_auto_reload = $var; + + return $this; + } + + /** + * Output only. The time and status of the latest reload. + * This reload may have been triggered automatically or manually + * and may not have succeeded. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\Document\ReloadStatus|null + */ + public function getLatestReloadStatus() + { + return $this->latest_reload_status; + } + + public function hasLatestReloadStatus() + { + return isset($this->latest_reload_status); + } + + public function clearLatestReloadStatus() + { + unset($this->latest_reload_status); + } + + /** + * Output only. The time and status of the latest reload. + * This reload may have been triggered automatically or manually + * and may not have succeeded. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\Document\ReloadStatus $var + * @return $this + */ + public function setLatestReloadStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Document\ReloadStatus::class); + $this->latest_reload_status = $var; + + return $this; + } + + /** + * Optional. Metadata for the document. The metadata supports arbitrary + * key-value pairs. Suggested use cases include storing a document's title, + * an external URL distinct from the document's content_uri, etc. + * The max size of a `key` or a `value` of the metadata is 1024 bytes. + * + * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Optional. Metadata for the document. The metadata supports arbitrary + * key-value pairs. Suggested use cases include storing a document's title, + * an external URL distinct from the document's content_uri, etc. + * The max size of a `key` or a `value` of the metadata is 1024 bytes. + * + * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Output only. The current state of the document. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the document. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Document\State::class); + $this->state = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/KnowledgeType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/KnowledgeType.php new file mode 100644 index 000000000000..4e8437ac0670 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/KnowledgeType.php @@ -0,0 +1,85 @@ +google.cloud.dialogflow.v2.Document.KnowledgeType + */ +class KnowledgeType +{ + /** + * The type is unspecified or arbitrary. + * + * Generated from protobuf enum KNOWLEDGE_TYPE_UNSPECIFIED = 0; + */ + const KNOWLEDGE_TYPE_UNSPECIFIED = 0; + /** + * The document content contains question and answer pairs as either HTML or + * CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats + * may fail to be parsed. + * CSV must have questions in the first column and answers in the second, + * with no header. Because of this explicit format, they are always parsed + * accurately. + * + * Generated from protobuf enum FAQ = 1; + */ + const FAQ = 1; + /** + * Documents for which unstructured text is extracted and used for + * question answering. + * + * Generated from protobuf enum EXTRACTIVE_QA = 2; + */ + const EXTRACTIVE_QA = 2; + /** + * The entire document content as a whole can be used for query results. + * Only for Contact Center Solutions on Dialogflow. + * + * Generated from protobuf enum ARTICLE_SUGGESTION = 3; + */ + const ARTICLE_SUGGESTION = 3; + /** + * The document contains agent-facing Smart Reply entries. + * + * Generated from protobuf enum AGENT_FACING_SMART_REPLY = 4; + */ + const AGENT_FACING_SMART_REPLY = 4; + + private static $valueToName = [ + self::KNOWLEDGE_TYPE_UNSPECIFIED => 'KNOWLEDGE_TYPE_UNSPECIFIED', + self::FAQ => 'FAQ', + self::EXTRACTIVE_QA => 'EXTRACTIVE_QA', + self::ARTICLE_SUGGESTION => 'ARTICLE_SUGGESTION', + self::AGENT_FACING_SMART_REPLY => 'AGENT_FACING_SMART_REPLY', + ]; + + 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(KnowledgeType::class, \Google\Cloud\Dialogflow\V2\Document_KnowledgeType::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/ReloadStatus.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/ReloadStatus.php new file mode 100644 index 000000000000..d54cc82076fb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/ReloadStatus.php @@ -0,0 +1,132 @@ +google.cloud.dialogflow.v2.Document.ReloadStatus + */ +class ReloadStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The time of a reload attempt. + * This reload may have been triggered automatically or manually and may + * not have succeeded. + * + * Generated from protobuf field .google.protobuf.Timestamp time = 1; + */ + protected $time = null; + /** + * The status of a reload attempt or the initial load. + * + * Generated from protobuf field .google.rpc.Status status = 2; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $time + * The time of a reload attempt. + * This reload may have been triggered automatically or manually and may + * not have succeeded. + * @type \Google\Rpc\Status $status + * The status of a reload attempt or the initial load. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * The time of a reload attempt. + * This reload may have been triggered automatically or manually and may + * not have succeeded. + * + * Generated from protobuf field .google.protobuf.Timestamp time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTime() + { + return $this->time; + } + + public function hasTime() + { + return isset($this->time); + } + + public function clearTime() + { + unset($this->time); + } + + /** + * The time of a reload attempt. + * This reload may have been triggered automatically or manually and may + * not have succeeded. + * + * Generated from protobuf field .google.protobuf.Timestamp time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time = $var; + + return $this; + } + + /** + * The status of a reload attempt or the initial load. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The status of a reload attempt or the initial load. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReloadStatus::class, \Google\Cloud\Dialogflow\V2\Document_ReloadStatus::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/State.php new file mode 100644 index 000000000000..ec19452cb6b1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/State.php @@ -0,0 +1,85 @@ +google.cloud.dialogflow.v2.Document.State + */ +class State +{ + /** + * The document state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The document creation is in progress. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The document is active and ready to use. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The document updation is in progress. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The document is reloading. + * + * Generated from protobuf enum RELOADING = 4; + */ + const RELOADING = 4; + /** + * The document deletion is in progress. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::UPDATING => 'UPDATING', + self::RELOADING => 'RELOADING', + 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\Dialogflow\V2\Document_State::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_KnowledgeType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_KnowledgeType.php new file mode 100644 index 000000000000..e514e056999d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_KnowledgeType.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Documents/ListDocuments', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListDocumentsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified document. + * @param \Google\Cloud\Dialogflow\V2\GetDocumentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetDocument(\Google\Cloud\Dialogflow\V2\GetDocumentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/GetDocument', + $argument, + ['\Google\Cloud\Dialogflow\V2\Document', 'decode'], + $metadata, $options); + } + + /** + * Creates a new document. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: [Document][google.cloud.dialogflow.v2.Document] + * @param \Google\Cloud\Dialogflow\V2\CreateDocumentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateDocument(\Google\Cloud\Dialogflow\V2\CreateDocumentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/CreateDocument', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates documents by importing data from external sources. + * Dialogflow supports up to 350 documents in each request. If you try to + * import more, Dialogflow will return an error. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: + * [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse] + * @param \Google\Cloud\Dialogflow\V2\ImportDocumentsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ImportDocuments(\Google\Cloud\Dialogflow\V2\ImportDocumentsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/ImportDocuments', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified document. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * @param \Google\Cloud\Dialogflow\V2\DeleteDocumentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteDocument(\Google\Cloud\Dialogflow\V2\DeleteDocumentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/DeleteDocument', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified document. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: [Document][google.cloud.dialogflow.v2.Document] + * @param \Google\Cloud\Dialogflow\V2\UpdateDocumentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateDocument(\Google\Cloud\Dialogflow\V2\UpdateDocumentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/UpdateDocument', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Reloads the specified document from its specified source, content_uri or + * content. The previously loaded content of the document will be deleted. + * Note: Even when the content of the document has not changed, there still + * may be side effects because of internal implementation changes. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: [Document][google.cloud.dialogflow.v2.Document] + * + * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + * only use `projects.knowledgeBases.documents`. + * @param \Google\Cloud\Dialogflow\V2\ReloadDocumentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ReloadDocument(\Google\Cloud\Dialogflow\V2\ReloadDocumentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/ReloadDocument', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Exports a smart messaging candidate document into the specified + * destination. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: [Document][google.cloud.dialogflow.v2.Document] + * @param \Google\Cloud\Dialogflow\V2\ExportDocumentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ExportDocument(\Google\Cloud\Dialogflow\V2\ExportDocumentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/ExportDocument', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DtmfParameters.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DtmfParameters.php new file mode 100644 index 000000000000..be68501e748b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DtmfParameters.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.v2.DtmfParameters + */ +class DtmfParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates whether DTMF input can be handled in the next request. + * + * Generated from protobuf field bool accepts_dtmf_input = 1; + */ + protected $accepts_dtmf_input = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $accepts_dtmf_input + * Indicates whether DTMF input can be handled in the next request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Indicates whether DTMF input can be handled in the next request. + * + * Generated from protobuf field bool accepts_dtmf_input = 1; + * @return bool + */ + public function getAcceptsDtmfInput() + { + return $this->accepts_dtmf_input; + } + + /** + * Indicates whether DTMF input can be handled in the next request. + * + * Generated from protobuf field bool accepts_dtmf_input = 1; + * @param bool $var + * @return $this + */ + public function setAcceptsDtmfInput($var) + { + GPBUtil::checkBool($var); + $this->accepts_dtmf_input = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType.php new file mode 100644 index 000000000000..2c3f5a2d924b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType.php @@ -0,0 +1,274 @@ +google.cloud.dialogflow.v2.EntityType + */ +class EntityType extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the entity type. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] + * and + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] + * methods. Format: `projects//agent/entityTypes/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The name of the entity type. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. Indicates the kind of entity type. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kind = 0; + /** + * Optional. Indicates whether the entity type can be automatically + * expanded. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $auto_expansion_mode = 0; + /** + * Optional. The collection of entity entries associated with the entity type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $entities; + /** + * Optional. Enables fuzzy entity extraction during classification. + * + * Generated from protobuf field bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_fuzzy_extraction = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the entity type. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] + * and + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] + * methods. Format: `projects//agent/entityTypes/`. + * @type string $display_name + * Required. The name of the entity type. + * @type int $kind + * Required. Indicates the kind of entity type. + * @type int $auto_expansion_mode + * Optional. Indicates whether the entity type can be automatically + * expanded. + * @type array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * Optional. The collection of entity entries associated with the entity type. + * @type bool $enable_fuzzy_extraction + * Optional. Enables fuzzy entity extraction during classification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the entity type. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] + * and + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] + * methods. Format: `projects//agent/entityTypes/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the entity type. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] + * and + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] + * methods. Format: `projects//agent/entityTypes/`. + * + * 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; + } + + /** + * Required. The name of the entity type. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The name of the entity type. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Indicates the kind of entity type. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * Required. Indicates the kind of entity type. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\EntityType\Kind::class); + $this->kind = $var; + + return $this; + } + + /** + * Optional. Indicates whether the entity type can be automatically + * expanded. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAutoExpansionMode() + { + return $this->auto_expansion_mode; + } + + /** + * Optional. Indicates whether the entity type can be automatically + * expanded. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAutoExpansionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\EntityType\AutoExpansionMode::class); + $this->auto_expansion_mode = $var; + + return $this; + } + + /** + * Optional. The collection of entity entries associated with the entity type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * Optional. The collection of entity entries associated with the entity type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * Optional. Enables fuzzy entity extraction during classification. + * + * Generated from protobuf field bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableFuzzyExtraction() + { + return $this->enable_fuzzy_extraction; + } + + /** + * Optional. Enables fuzzy entity extraction during classification. + * + * Generated from protobuf field bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableFuzzyExtraction($var) + { + GPBUtil::checkBool($var); + $this->enable_fuzzy_extraction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/AutoExpansionMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/AutoExpansionMode.php new file mode 100644 index 000000000000..77ac68085257 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/AutoExpansionMode.php @@ -0,0 +1,60 @@ +google.cloud.dialogflow.v2.EntityType.AutoExpansionMode + */ +class AutoExpansionMode +{ + /** + * Auto expansion disabled for the entity. + * + * Generated from protobuf enum AUTO_EXPANSION_MODE_UNSPECIFIED = 0; + */ + const AUTO_EXPANSION_MODE_UNSPECIFIED = 0; + /** + * Allows an agent to recognize values that have not been explicitly + * listed in the entity. + * + * Generated from protobuf enum AUTO_EXPANSION_MODE_DEFAULT = 1; + */ + const AUTO_EXPANSION_MODE_DEFAULT = 1; + + private static $valueToName = [ + self::AUTO_EXPANSION_MODE_UNSPECIFIED => 'AUTO_EXPANSION_MODE_UNSPECIFIED', + self::AUTO_EXPANSION_MODE_DEFAULT => 'AUTO_EXPANSION_MODE_DEFAULT', + ]; + + 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(AutoExpansionMode::class, \Google\Cloud\Dialogflow\V2\EntityType_AutoExpansionMode::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Entity.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Entity.php new file mode 100644 index 000000000000..80fe15446286 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Entity.php @@ -0,0 +1,148 @@ +google.cloud.dialogflow.v2.EntityType.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The primary value associated with this entity entry. + * For example, if the entity type is *vegetable*, the value could be + * *scallions*. + * For `KIND_MAP` entity types: + * * A reference value to be used in place of synonyms. + * For `KIND_LIST` entity types: + * * A string that can contain references to other entity types (with or + * without aliases). + * + * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = ''; + /** + * Required. A collection of value synonyms. For example, if the entity type + * is *vegetable*, and `value` is *scallions*, a synonym could be *green + * onions*. + * For `KIND_LIST` entity types: + * * This collection must contain exactly one synonym equal to `value`. + * + * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $synonyms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * Required. The primary value associated with this entity entry. + * For example, if the entity type is *vegetable*, the value could be + * *scallions*. + * For `KIND_MAP` entity types: + * * A reference value to be used in place of synonyms. + * For `KIND_LIST` entity types: + * * A string that can contain references to other entity types (with or + * without aliases). + * @type array|\Google\Protobuf\Internal\RepeatedField $synonyms + * Required. A collection of value synonyms. For example, if the entity type + * is *vegetable*, and `value` is *scallions*, a synonym could be *green + * onions*. + * For `KIND_LIST` entity types: + * * This collection must contain exactly one synonym equal to `value`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The primary value associated with this entity entry. + * For example, if the entity type is *vegetable*, the value could be + * *scallions*. + * For `KIND_MAP` entity types: + * * A reference value to be used in place of synonyms. + * For `KIND_LIST` entity types: + * * A string that can contain references to other entity types (with or + * without aliases). + * + * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Required. The primary value associated with this entity entry. + * For example, if the entity type is *vegetable*, the value could be + * *scallions*. + * For `KIND_MAP` entity types: + * * A reference value to be used in place of synonyms. + * For `KIND_LIST` entity types: + * * A string that can contain references to other entity types (with or + * without aliases). + * + * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Required. A collection of value synonyms. For example, if the entity type + * is *vegetable*, and `value` is *scallions*, a synonym could be *green + * onions*. + * For `KIND_LIST` entity types: + * * This collection must contain exactly one synonym equal to `value`. + * + * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSynonyms() + { + return $this->synonyms; + } + + /** + * Required. A collection of value synonyms. For example, if the entity type + * is *vegetable*, and `value` is *scallions*, a synonym could be *green + * onions*. + * For `KIND_LIST` entity types: + * * This collection must contain exactly one synonym equal to `value`. + * + * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSynonyms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->synonyms = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Entity::class, \Google\Cloud\Dialogflow\V2\EntityType_Entity::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Kind.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Kind.php new file mode 100644 index 000000000000..51d8c6f0d4e1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Kind.php @@ -0,0 +1,75 @@ +google.cloud.dialogflow.v2.EntityType.Kind + */ +class Kind +{ + /** + * Not specified. This value should be never used. + * + * Generated from protobuf enum KIND_UNSPECIFIED = 0; + */ + const KIND_UNSPECIFIED = 0; + /** + * Map entity types allow mapping of a group of synonyms to a reference + * value. + * + * Generated from protobuf enum KIND_MAP = 1; + */ + const KIND_MAP = 1; + /** + * List entity types contain a set of entries that do not map to reference + * values. However, list entity types can contain references to other entity + * types (with or without aliases). + * + * Generated from protobuf enum KIND_LIST = 2; + */ + const KIND_LIST = 2; + /** + * Regexp entity types allow to specify regular expressions in entries + * values. + * + * Generated from protobuf enum KIND_REGEXP = 3; + */ + const KIND_REGEXP = 3; + + private static $valueToName = [ + self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', + self::KIND_MAP => 'KIND_MAP', + self::KIND_LIST => 'KIND_LIST', + self::KIND_REGEXP => 'KIND_REGEXP', + ]; + + 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(Kind::class, \Google\Cloud\Dialogflow\V2\EntityType_Kind::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypeBatch.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypeBatch.php new file mode 100644 index 000000000000..290c6bec564e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypeBatch.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.v2.EntityTypeBatch + */ +class EntityTypeBatch extends \Google\Protobuf\Internal\Message +{ + /** + * A collection of entity types. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; + */ + private $entity_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types + * A collection of entity types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * A collection of entity types. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityTypes() + { + return $this->entity_types; + } + + /** + * A collection of entity types. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; + * @param array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType::class); + $this->entity_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_AutoExpansionMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_AutoExpansionMode.php new file mode 100644 index 000000000000..941ed2f062d1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_AutoExpansionMode.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/ListEntityTypes', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListEntityTypesResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified entity type. + * @param \Google\Cloud\Dialogflow\V2\GetEntityTypeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetEntityType(\Google\Cloud\Dialogflow\V2\GetEntityTypeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/GetEntityType', + $argument, + ['\Google\Cloud\Dialogflow\V2\EntityType', 'decode'], + $metadata, $options); + } + + /** + * Creates an entity type in the specified agent. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\CreateEntityTypeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateEntityType(\Google\Cloud\Dialogflow\V2\CreateEntityTypeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/CreateEntityType', + $argument, + ['\Google\Cloud\Dialogflow\V2\EntityType', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified entity type. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\UpdateEntityTypeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateEntityType(\Google\Cloud\Dialogflow\V2\UpdateEntityTypeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/UpdateEntityType', + $argument, + ['\Google\Cloud\Dialogflow\V2\EntityType', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified entity type. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\DeleteEntityTypeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteEntityType(\Google\Cloud\Dialogflow\V2\DeleteEntityTypeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/DeleteEntityType', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Updates/Creates multiple entity types in the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: + * [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse] + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\BatchUpdateEntityTypesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchUpdateEntityTypes(\Google\Cloud\Dialogflow\V2\BatchUpdateEntityTypesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchUpdateEntityTypes', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes entity types in the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\BatchDeleteEntityTypesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchDeleteEntityTypes(\Google\Cloud\Dialogflow\V2\BatchDeleteEntityTypesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntityTypes', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates multiple new entities in the specified entity type. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\BatchCreateEntitiesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchCreateEntities(\Google\Cloud\Dialogflow\V2\BatchCreateEntitiesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchCreateEntities', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates or creates multiple entities in the specified entity type. This + * method does not affect entities in the entity type that aren't explicitly + * specified in the request. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * @param \Google\Cloud\Dialogflow\V2\BatchUpdateEntitiesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchUpdateEntities(\Google\Cloud\Dialogflow\V2\BatchUpdateEntitiesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchUpdateEntities', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes entities in the specified entity type. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\BatchDeleteEntitiesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchDeleteEntities(\Google\Cloud\Dialogflow\V2\BatchDeleteEntitiesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntities', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment.php new file mode 100644 index 000000000000..89d14a767203 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment.php @@ -0,0 +1,362 @@ +google.cloud.dialogflow.v2.Environment + */ +class Environment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique identifier of this agent environment. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. The developer-provided description for this environment. + * The maximum length is 500 characters. If exceeded, the request is rejected. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. The agent version loaded into this environment. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $agent_version = ''; + /** + * Output only. The state of this environment. This field is read-only, i.e., + * it cannot be set by create and update methods. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The last update time of this environment. This field is + * read-only, i.e., it cannot be set by create and update methods. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Text to speech settings for this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $text_to_speech_settings = null; + /** + * Optional. The fulfillment settings to use for this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $fulfillment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique identifier of this agent environment. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * @type string $description + * Optional. The developer-provided description for this environment. + * The maximum length is 500 characters. If exceeded, the request is rejected. + * @type string $agent_version + * Optional. The agent version loaded into this environment. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * @type int $state + * Output only. The state of this environment. This field is read-only, i.e., + * it cannot be set by create and update methods. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update time of this environment. This field is + * read-only, i.e., it cannot be set by create and update methods. + * @type \Google\Cloud\Dialogflow\V2\TextToSpeechSettings $text_to_speech_settings + * Optional. Text to speech settings for this environment. + * @type \Google\Cloud\Dialogflow\V2\Fulfillment $fulfillment + * Optional. The fulfillment settings to use for this environment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique identifier of this agent environment. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique identifier of this agent environment. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The developer-provided description for this environment. + * The maximum length is 500 characters. If exceeded, the request is rejected. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The developer-provided description for this environment. + * The maximum length is 500 characters. If exceeded, the request is rejected. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. The agent version loaded into this environment. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAgentVersion() + { + return $this->agent_version; + } + + /** + * Optional. The agent version loaded into this environment. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAgentVersion($var) + { + GPBUtil::checkString($var, True); + $this->agent_version = $var; + + return $this; + } + + /** + * Output only. The state of this environment. This field is read-only, i.e., + * it cannot be set by create and update methods. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of this environment. This field is read-only, i.e., + * it cannot be set by create and update methods. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Environment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The last update time of this environment. This field is + * read-only, i.e., it cannot be set by create and update methods. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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 last update time of this environment. This field is + * read-only, i.e., it cannot be set by create and update methods. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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; + } + + /** + * Optional. Text to speech settings for this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\TextToSpeechSettings|null + */ + public function getTextToSpeechSettings() + { + return $this->text_to_speech_settings; + } + + public function hasTextToSpeechSettings() + { + return isset($this->text_to_speech_settings); + } + + public function clearTextToSpeechSettings() + { + unset($this->text_to_speech_settings); + } + + /** + * Optional. Text to speech settings for this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\TextToSpeechSettings $var + * @return $this + */ + public function setTextToSpeechSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextToSpeechSettings::class); + $this->text_to_speech_settings = $var; + + return $this; + } + + /** + * Optional. The fulfillment settings to use for this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\Fulfillment|null + */ + public function getFulfillment() + { + return $this->fulfillment; + } + + public function hasFulfillment() + { + return isset($this->fulfillment); + } + + public function clearFulfillment() + { + unset($this->fulfillment); + } + + /** + * Optional. The fulfillment settings to use for this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\Fulfillment $var + * @return $this + */ + public function setFulfillment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Fulfillment::class); + $this->fulfillment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment/State.php new file mode 100644 index 000000000000..6e41c7c1bc9b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment/State.php @@ -0,0 +1,75 @@ +google.cloud.dialogflow.v2.Environment.State + */ +class State +{ + /** + * Not specified. This value is not used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Stopped. + * + * Generated from protobuf enum STOPPED = 1; + */ + const STOPPED = 1; + /** + * Loading. + * + * Generated from protobuf enum LOADING = 2; + */ + const LOADING = 2; + /** + * Running. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STOPPED => 'STOPPED', + self::LOADING => 'LOADING', + self::RUNNING => 'RUNNING', + ]; + + 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\Dialogflow\V2\Environment_State::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory.php new file mode 100644 index 000000000000..103f60872d39 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.v2.EnvironmentHistory + */ +class EnvironmentHistory extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the environment this history is for. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $parent = ''; + /** + * Output only. The list of agent environments. There will be a maximum number + * of items returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $entries; + /** + * Output only. Token to retrieve the next page of results, or empty if there + * are no more results in the list. + * + * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Output only. The name of the environment this history is for. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * @type array<\Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry>|\Google\Protobuf\Internal\RepeatedField $entries + * Output only. The list of agent environments. There will be a maximum number + * of items returned based on the page_size field in the request. + * @type string $next_page_token + * Output only. Token to retrieve the next page of results, or empty if there + * are no more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the environment this history is for. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Output only. The name of the environment this history is for. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Output only. The list of agent environments. There will be a maximum number + * of items returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Output only. The list of agent environments. There will be a maximum number + * of items returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry::class); + $this->entries = $arr; + + return $this; + } + + /** + * Output only. Token to retrieve the next page of results, or empty if there + * are no more results in the list. + * + * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. Token to retrieve the next page of results, or empty if there + * are no more results in the list. + * + * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory/Entry.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory/Entry.php new file mode 100644 index 000000000000..4f71c3339858 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory/Entry.php @@ -0,0 +1,148 @@ +google.cloud.dialogflow.v2.EnvironmentHistory.Entry + */ +class Entry extends \Google\Protobuf\Internal\Message +{ + /** + * The agent version loaded into this environment history entry. + * + * Generated from protobuf field string agent_version = 1; + */ + protected $agent_version = ''; + /** + * The developer-provided description for this environment history entry. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * The creation time of this environment history entry. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agent_version + * The agent version loaded into this environment history entry. + * @type string $description + * The developer-provided description for this environment history entry. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of this environment history entry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The agent version loaded into this environment history entry. + * + * Generated from protobuf field string agent_version = 1; + * @return string + */ + public function getAgentVersion() + { + return $this->agent_version; + } + + /** + * The agent version loaded into this environment history entry. + * + * Generated from protobuf field string agent_version = 1; + * @param string $var + * @return $this + */ + public function setAgentVersion($var) + { + GPBUtil::checkString($var, True); + $this->agent_version = $var; + + return $this; + } + + /** + * The developer-provided description for this environment history entry. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The developer-provided description for this environment history entry. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The creation time of this environment history entry. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @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 creation time of this environment history entry. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Entry::class, \Google\Cloud\Dialogflow\V2\EnvironmentHistory_Entry::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory_Entry.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory_Entry.php new file mode 100644 index 000000000000..f7ecb9e7c985 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory_Entry.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Environments/ListEnvironments', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListEnvironmentsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified agent environment. + * @param \Google\Cloud\Dialogflow\V2\GetEnvironmentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetEnvironment(\Google\Cloud\Dialogflow\V2\GetEnvironmentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/GetEnvironment', + $argument, + ['\Google\Cloud\Dialogflow\V2\Environment', 'decode'], + $metadata, $options); + } + + /** + * Creates an agent environment. + * @param \Google\Cloud\Dialogflow\V2\CreateEnvironmentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateEnvironment(\Google\Cloud\Dialogflow\V2\CreateEnvironmentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/CreateEnvironment', + $argument, + ['\Google\Cloud\Dialogflow\V2\Environment', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified agent environment. + * + * This method allows you to deploy new agent versions into the environment. + * When an environment is pointed to a new agent version by setting + * `environment.agent_version`, the environment is temporarily set to the + * `LOADING` state. During that time, the environment continues serving the + * previous version of the agent. After the new agent version is done loading, + * the environment is set back to the `RUNNING` state. + * You can use "-" as Environment ID in environment name to update an agent + * version in the default environment. WARNING: this will negate all recent + * changes to the draft agent and can't be undone. You may want to save the + * draft agent to a version before calling this method. + * @param \Google\Cloud\Dialogflow\V2\UpdateEnvironmentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateEnvironment(\Google\Cloud\Dialogflow\V2\UpdateEnvironmentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/UpdateEnvironment', + $argument, + ['\Google\Cloud\Dialogflow\V2\Environment', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified agent environment. + * @param \Google\Cloud\Dialogflow\V2\DeleteEnvironmentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteEnvironment(\Google\Cloud\Dialogflow\V2\DeleteEnvironmentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/DeleteEnvironment', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Gets the history of the specified environment. + * @param \Google\Cloud\Dialogflow\V2\GetEnvironmentHistoryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetEnvironmentHistory(\Google\Cloud\Dialogflow\V2\GetEnvironmentHistoryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/GetEnvironmentHistory', + $argument, + ['\Google\Cloud\Dialogflow\V2\EnvironmentHistory', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig.php new file mode 100644 index 000000000000..316467a477c0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig.php @@ -0,0 +1,142 @@ +google.cloud.dialogflow.v2.EvaluationConfig + */ +class EvaluationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Datasets used for evaluation. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $datasets; + protected $model_specific_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $datasets + * Required. Datasets used for evaluation. + * @type \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig $smart_reply_config + * Configuration for smart reply model evalution. + * @type \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig $smart_compose_config + * Configuration for smart compose model evalution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. Datasets used for evaluation. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatasets() + { + return $this->datasets; + } + + /** + * Required. Datasets used for evaluation. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatasets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\InputDataset::class); + $this->datasets = $arr; + + return $this; + } + + /** + * Configuration for smart reply model evalution. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig smart_reply_config = 2; + * @return \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig|null + */ + public function getSmartReplyConfig() + { + return $this->readOneof(2); + } + + public function hasSmartReplyConfig() + { + return $this->hasOneof(2); + } + + /** + * Configuration for smart reply model evalution. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig smart_reply_config = 2; + * @param \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig $var + * @return $this + */ + public function setSmartReplyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Configuration for smart compose model evalution. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig smart_compose_config = 4; + * @return \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig|null + */ + public function getSmartComposeConfig() + { + return $this->readOneof(4); + } + + public function hasSmartComposeConfig() + { + return $this->hasOneof(4); + } + + /** + * Configuration for smart compose model evalution. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig smart_compose_config = 4; + * @param \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig $var + * @return $this + */ + public function setSmartComposeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getModelSpecificConfig() + { + return $this->whichOneof("model_specific_config"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartComposeConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartComposeConfig.php new file mode 100644 index 000000000000..1dc54f0c1349 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartComposeConfig.php @@ -0,0 +1,124 @@ +google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + */ +class SmartComposeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The allowlist document resource name. + * Format: `projects//knowledgeBases//documents/`. Only used for smart compose model. + * + * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { + */ + protected $allowlist_document = ''; + /** + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. + * + * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_result_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $allowlist_document + * The allowlist document resource name. + * Format: `projects//knowledgeBases//documents/`. Only used for smart compose model. + * @type int $max_result_count + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The allowlist document resource name. + * Format: `projects//knowledgeBases//documents/`. Only used for smart compose model. + * + * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getAllowlistDocument() + { + return $this->allowlist_document; + } + + /** + * The allowlist document resource name. + * Format: `projects//knowledgeBases//documents/`. Only used for smart compose model. + * + * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAllowlistDocument($var) + { + GPBUtil::checkString($var, True); + $this->allowlist_document = $var; + + return $this; + } + + /** + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. + * + * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMaxResultCount() + { + return $this->max_result_count; + } + + /** + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. + * + * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMaxResultCount($var) + { + GPBUtil::checkInt32($var); + $this->max_result_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SmartComposeConfig::class, \Google\Cloud\Dialogflow\V2\EvaluationConfig_SmartComposeConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartReplyConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartReplyConfig.php new file mode 100644 index 000000000000..81d493a47cd9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartReplyConfig.php @@ -0,0 +1,124 @@ +google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + */ +class SmartReplyConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The allowlist document resource name. + * Format: `projects//knowledgeBases//documents/`. Only used for smart reply model. + * + * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { + */ + protected $allowlist_document = ''; + /** + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. + * + * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_result_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $allowlist_document + * The allowlist document resource name. + * Format: `projects//knowledgeBases//documents/`. Only used for smart reply model. + * @type int $max_result_count + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The allowlist document resource name. + * Format: `projects//knowledgeBases//documents/`. Only used for smart reply model. + * + * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getAllowlistDocument() + { + return $this->allowlist_document; + } + + /** + * The allowlist document resource name. + * Format: `projects//knowledgeBases//documents/`. Only used for smart reply model. + * + * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAllowlistDocument($var) + { + GPBUtil::checkString($var, True); + $this->allowlist_document = $var; + + return $this; + } + + /** + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. + * + * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMaxResultCount() + { + return $this->max_result_count; + } + + /** + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. + * + * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMaxResultCount($var) + { + GPBUtil::checkInt32($var); + $this->max_result_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SmartReplyConfig::class, \Google\Cloud\Dialogflow\V2\EvaluationConfig_SmartReplyConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartComposeConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartComposeConfig.php new file mode 100644 index 000000000000..fcd7cd240c81 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartComposeConfig.php @@ -0,0 +1,16 @@ +` can trigger a personalized welcome response. + * The parameter `name` may be used by the agent in the response: + * `"Hello #welcome_event.name! What can I do for you today?"`. + * + * Generated from protobuf message google.cloud.dialogflow.v2.EventInput + */ +class EventInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the event. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The collection of parameters associated with the event. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * + * Generated from protobuf field .google.protobuf.Struct parameters = 2; + */ + protected $parameters = null; + /** + * Required. The language of this query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * This field is ignored when used in the context of a + * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] + * field, because the language was already defined in the originating detect + * intent request. + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique identifier of the event. + * @type \Google\Protobuf\Struct $parameters + * The collection of parameters associated with the event. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * @type string $language_code + * Required. The language of this query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * This field is ignored when used in the context of a + * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] + * field, because the language was already defined in the originating detect + * intent request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the event. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique identifier of the event. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The collection of parameters associated with the event. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * + * Generated from protobuf field .google.protobuf.Struct parameters = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getParameters() + { + return $this->parameters; + } + + public function hasParameters() + { + return isset($this->parameters); + } + + public function clearParameters() + { + unset($this->parameters); + } + + /** + * The collection of parameters associated with the event. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * + * Generated from protobuf field .google.protobuf.Struct parameters = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->parameters = $var; + + return $this; + } + + /** + * Required. The language of this query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * This field is ignored when used in the context of a + * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] + * field, because the language was already defined in the originating detect + * intent request. + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Required. The language of this query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * This field is ignored when used in the context of a + * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] + * field, because the language was already defined in the originating detect + * intent request. + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentRequest.php new file mode 100644 index 000000000000..020a846c675a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentRequest.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.v2.ExportAgentRequest + */ +class ExportAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that the agent to export is associated with. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * + * Generated from protobuf field string agent_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $agent_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project that the agent to export is associated with. + * Format: `projects/`. + * @type string $agent_uri + * Required. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that the agent to export is associated with. + * Format: `projects/`. + * + * 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 project that the agent to export is associated with. + * Format: `projects/`. + * + * 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 [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * + * Generated from protobuf field string agent_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAgentUri() + { + return $this->agent_uri; + } + + /** + * Required. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * + * Generated from protobuf field string agent_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAgentUri($var) + { + GPBUtil::checkString($var, True); + $this->agent_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentResponse.php new file mode 100644 index 000000000000..0568ef0c383c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentResponse.php @@ -0,0 +1,112 @@ +google.cloud.dialogflow.v2.ExportAgentResponse + */ +class ExportAgentResponse extends \Google\Protobuf\Internal\Message +{ + protected $agent; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agent_uri + * The URI to a file containing the exported agent. This field is populated + * only if `agent_uri` is specified in `ExportAgentRequest`. + * @type string $agent_content + * Zip compressed raw byte content for agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * The URI to a file containing the exported agent. This field is populated + * only if `agent_uri` is specified in `ExportAgentRequest`. + * + * Generated from protobuf field string agent_uri = 1; + * @return string + */ + public function getAgentUri() + { + return $this->readOneof(1); + } + + public function hasAgentUri() + { + return $this->hasOneof(1); + } + + /** + * The URI to a file containing the exported agent. This field is populated + * only if `agent_uri` is specified in `ExportAgentRequest`. + * + * Generated from protobuf field string agent_uri = 1; + * @param string $var + * @return $this + */ + public function setAgentUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Zip compressed raw byte content for agent. + * + * Generated from protobuf field bytes agent_content = 2; + * @return string + */ + public function getAgentContent() + { + return $this->readOneof(2); + } + + public function hasAgentContent() + { + return $this->hasOneof(2); + } + + /** + * Zip compressed raw byte content for agent. + * + * Generated from protobuf field bytes agent_content = 2; + * @param string $var + * @return $this + */ + public function setAgentContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getAgent() + { + return $this->whichOneof("agent"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportDocumentRequest.php new file mode 100644 index 000000000000..84bd5410682c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportDocumentRequest.php @@ -0,0 +1,194 @@ +google.cloud.dialogflow.v2.ExportDocumentRequest + */ +class ExportDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the document to export. + * Format: `projects//locations//knowledgeBases//documents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * When enabled, export the full content of the document including empirical + * probability. + * + * Generated from protobuf field bool export_full_content = 3; + */ + protected $export_full_content = false; + /** + * When enabled, export the smart messaging allowlist document for partial + * update. + * + * Generated from protobuf field bool smart_messaging_partial_update = 5; + */ + protected $smart_messaging_partial_update = false; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the document to export. + * Format: `projects//locations//knowledgeBases//documents/`. + * @type \Google\Cloud\Dialogflow\V2\GcsDestination $gcs_destination + * Cloud Storage file path to export the document. + * @type bool $export_full_content + * When enabled, export the full content of the document including empirical + * probability. + * @type bool $smart_messaging_partial_update + * When enabled, export the smart messaging allowlist document for partial + * update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the document to export. + * Format: `projects//locations//knowledgeBases//documents/`. + * + * 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 document to export. + * Format: `projects//locations//knowledgeBases//documents/`. + * + * 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; + } + + /** + * Cloud Storage file path to export the document. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + * @return \Google\Cloud\Dialogflow\V2\GcsDestination|null + */ + public function getGcsDestination() + { + return $this->readOneof(2); + } + + public function hasGcsDestination() + { + return $this->hasOneof(2); + } + + /** + * Cloud Storage file path to export the document. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + * @param \Google\Cloud\Dialogflow\V2\GcsDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsDestination::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * When enabled, export the full content of the document including empirical + * probability. + * + * Generated from protobuf field bool export_full_content = 3; + * @return bool + */ + public function getExportFullContent() + { + return $this->export_full_content; + } + + /** + * When enabled, export the full content of the document including empirical + * probability. + * + * Generated from protobuf field bool export_full_content = 3; + * @param bool $var + * @return $this + */ + public function setExportFullContent($var) + { + GPBUtil::checkBool($var); + $this->export_full_content = $var; + + return $this; + } + + /** + * When enabled, export the smart messaging allowlist document for partial + * update. + * + * Generated from protobuf field bool smart_messaging_partial_update = 5; + * @return bool + */ + public function getSmartMessagingPartialUpdate() + { + return $this->smart_messaging_partial_update; + } + + /** + * When enabled, export the smart messaging allowlist document for partial + * update. + * + * Generated from protobuf field bool smart_messaging_partial_update = 5; + * @param bool $var + * @return $this + */ + public function setSmartMessagingPartialUpdate($var) + { + GPBUtil::checkBool($var); + $this->smart_messaging_partial_update = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportOperationMetadata.php new file mode 100644 index 000000000000..146257008327 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportOperationMetadata.php @@ -0,0 +1,77 @@ +google.cloud.dialogflow.v2.ExportOperationMetadata + */ +class ExportOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Storage file path of the exported data. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination exported_gcs_destination = 1; + */ + protected $exported_gcs_destination = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\GcsDestination $exported_gcs_destination + * Cloud Storage file path of the exported data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage file path of the exported data. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination exported_gcs_destination = 1; + * @return \Google\Cloud\Dialogflow\V2\GcsDestination|null + */ + public function getExportedGcsDestination() + { + return $this->exported_gcs_destination; + } + + public function hasExportedGcsDestination() + { + return isset($this->exported_gcs_destination); + } + + public function clearExportedGcsDestination() + { + unset($this->exported_gcs_destination); + } + + /** + * Cloud Storage file path of the exported data. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination exported_gcs_destination = 1; + * @param \Google\Cloud\Dialogflow\V2\GcsDestination $var + * @return $this + */ + public function setExportedGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsDestination::class); + $this->exported_gcs_destination = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FaqAnswer.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FaqAnswer.php new file mode 100644 index 000000000000..c8d2453ee36a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FaqAnswer.php @@ -0,0 +1,269 @@ +google.cloud.dialogflow.v2.FaqAnswer + */ +class FaqAnswer 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 Knowledge answer is a good match + * for this conversational query, range from 0.0 (completely uncertain) + * to 1.0 (completely certain). + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + /** + * The corresponding FAQ question. + * + * Generated from protobuf field string question = 3; + */ + protected $question = ''; + /** + * Indicates which Knowledge Document this answer was extracted + * from. + * Format: `projects//locations//agent/knowledgeBases//documents/`. + * + * Generated from protobuf field string source = 4; + */ + protected $source = ''; + /** + * A map that contains metadata about the answer and the + * document from which it originates. + * + * Generated from protobuf field map metadata = 5; + */ + private $metadata; + /** + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * + * Generated from protobuf field string answer_record = 6; + */ + protected $answer_record = ''; + + /** + * 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 + * The system's confidence score that this Knowledge answer is a good match + * for this conversational query, range from 0.0 (completely uncertain) + * to 1.0 (completely certain). + * @type string $question + * The corresponding FAQ question. + * @type string $source + * Indicates which Knowledge Document this answer was extracted + * from. + * Format: `projects//locations//agent/knowledgeBases//documents/`. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * A map that contains metadata about the answer and the + * document from which it originates. + * @type string $answer_record + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::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 Knowledge answer is a good match + * for this conversational query, range 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 system's confidence score that this Knowledge answer is a good match + * for this conversational query, range 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; + } + + /** + * 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; + } + + /** + * Indicates which Knowledge Document this answer was extracted + * from. + * Format: `projects//locations//agent/knowledgeBases//documents/`. + * + * Generated from protobuf field string source = 4; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Indicates which Knowledge Document this answer was extracted + * from. + * Format: `projects//locations//agent/knowledgeBases//documents/`. + * + * Generated from protobuf field string source = 4; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * A map that contains metadata about the answer and the + * document from which it originates. + * + * Generated from protobuf field map metadata = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * A map that contains metadata about the answer and the + * document from which it originates. + * + * Generated from protobuf field map metadata = 5; + * @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 answer record, in the format of + * "projects//locations//answerRecords/" + * + * Generated from protobuf field string answer_record = 6; + * @return string + */ + public function getAnswerRecord() + { + return $this->answer_record; + } + + /** + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * + * Generated from protobuf field string answer_record = 6; + * @param string $var + * @return $this + */ + public function setAnswerRecord($var) + { + GPBUtil::checkString($var, True); + $this->answer_record = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment.php new file mode 100644 index 000000000000..5284053b6d8f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment.php @@ -0,0 +1,247 @@ +google.cloud.dialogflow.v2.Fulfillment + */ +class Fulfillment extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the fulfillment. + * Supported formats: + * - `projects//agent/fulfillment` + * - `projects//locations//agent/fulfillment` + * This field is not used for Fulfillment in an Environment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. The human-readable name of the fulfillment, unique within the + * agent. + * This field is not used for Fulfillment in an Environment. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. Whether fulfillment is enabled. + * + * Generated from protobuf field bool enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enabled = false; + /** + * Optional. The field defines whether the fulfillment is enabled for certain + * features. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $features; + protected $fulfillment; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique identifier of the fulfillment. + * Supported formats: + * - `projects//agent/fulfillment` + * - `projects//locations//agent/fulfillment` + * This field is not used for Fulfillment in an Environment. + * @type string $display_name + * Optional. The human-readable name of the fulfillment, unique within the + * agent. + * This field is not used for Fulfillment in an Environment. + * @type \Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService $generic_web_service + * Configuration for a generic web service. + * @type bool $enabled + * Optional. Whether fulfillment is enabled. + * @type array<\Google\Cloud\Dialogflow\V2\Fulfillment\Feature>|\Google\Protobuf\Internal\RepeatedField $features + * Optional. The field defines whether the fulfillment is enabled for certain + * features. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the fulfillment. + * Supported formats: + * - `projects//agent/fulfillment` + * - `projects//locations//agent/fulfillment` + * This field is not used for Fulfillment in an Environment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique identifier of the fulfillment. + * Supported formats: + * - `projects//agent/fulfillment` + * - `projects//locations//agent/fulfillment` + * This field is not used for Fulfillment in an Environment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The human-readable name of the fulfillment, unique within the + * agent. + * This field is not used for Fulfillment in an Environment. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. The human-readable name of the fulfillment, unique within the + * agent. + * This field is not used for Fulfillment in an Environment. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Configuration for a generic web service. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.GenericWebService generic_web_service = 3; + * @return \Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService|null + */ + public function getGenericWebService() + { + return $this->readOneof(3); + } + + public function hasGenericWebService() + { + return $this->hasOneof(3); + } + + /** + * Configuration for a generic web service. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.GenericWebService generic_web_service = 3; + * @param \Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService $var + * @return $this + */ + public function setGenericWebService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Whether fulfillment is enabled. + * + * Generated from protobuf field bool enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. Whether fulfillment is enabled. + * + * Generated from protobuf field bool enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Optional. The field defines whether the fulfillment is enabled for certain + * features. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeatures() + { + return $this->features; + } + + /** + * Optional. The field defines whether the fulfillment is enabled for certain + * features. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Fulfillment\Feature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Fulfillment\Feature::class); + $this->features = $arr; + + return $this; + } + + /** + * @return string + */ + public function getFulfillment() + { + return $this->whichOneof("fulfillment"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature.php new file mode 100644 index 000000000000..727ce7d8bfde --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.v2.Fulfillment.Feature + */ +class Feature extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the feature that enabled for fulfillment. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.Feature.Type type = 1; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of the feature that enabled for fulfillment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * The type of the feature that enabled for fulfillment. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.Feature.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the feature that enabled for fulfillment. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.Feature.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Fulfillment\Feature\Type::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Feature::class, \Google\Cloud\Dialogflow\V2\Fulfillment_Feature::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature/Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature/Type.php new file mode 100644 index 000000000000..b516d100f4e8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature/Type.php @@ -0,0 +1,57 @@ +google.cloud.dialogflow.v2.Fulfillment.Feature.Type + */ +class Type +{ + /** + * Feature type not specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Fulfillment is enabled for SmallTalk. + * + * Generated from protobuf enum SMALLTALK = 1; + */ + const SMALLTALK = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::SMALLTALK => 'SMALLTALK', + ]; + + 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\Dialogflow\V2\Fulfillment_Feature_Type::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/GenericWebService.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/GenericWebService.php new file mode 100644 index 000000000000..3310056f4a7c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/GenericWebService.php @@ -0,0 +1,236 @@ +google.cloud.dialogflow.v2.Fulfillment.GenericWebService + */ +class GenericWebService extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fulfillment URI for receiving POST requests. + * It must use https protocol. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * Optional. The user name for HTTP Basic authentication. + * + * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $username = ''; + /** + * Optional. The password for HTTP Basic authentication. + * + * Generated from protobuf field string password = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $password = ''; + /** + * Optional. The HTTP request headers to send together with fulfillment + * requests. + * + * Generated from protobuf field map request_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $request_headers; + /** + * Optional. Indicates if generic web service is created through Cloud + * Functions integration. Defaults to false. + * is_cloud_function is deprecated. Cloud functions can be configured by + * its uri as a regular web service now. + * + * Generated from protobuf field bool is_cloud_function = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $is_cloud_function = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. The fulfillment URI for receiving POST requests. + * It must use https protocol. + * @type string $username + * Optional. The user name for HTTP Basic authentication. + * @type string $password + * Optional. The password for HTTP Basic authentication. + * @type array|\Google\Protobuf\Internal\MapField $request_headers + * Optional. The HTTP request headers to send together with fulfillment + * requests. + * @type bool $is_cloud_function + * Optional. Indicates if generic web service is created through Cloud + * Functions integration. Defaults to false. + * is_cloud_function is deprecated. Cloud functions can be configured by + * its uri as a regular web service now. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fulfillment URI for receiving POST requests. + * It must use https protocol. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The fulfillment URI for receiving POST requests. + * It must use https protocol. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Optional. The user name for HTTP Basic authentication. + * + * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Optional. The user name for HTTP Basic authentication. + * + * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Optional. The password for HTTP Basic authentication. + * + * Generated from protobuf field string password = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Optional. The password for HTTP Basic authentication. + * + * Generated from protobuf field string password = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Optional. The HTTP request headers to send together with fulfillment + * requests. + * + * Generated from protobuf field map request_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getRequestHeaders() + { + return $this->request_headers; + } + + /** + * Optional. The HTTP request headers to send together with fulfillment + * requests. + * + * Generated from protobuf field map request_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setRequestHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->request_headers = $arr; + + return $this; + } + + /** + * Optional. Indicates if generic web service is created through Cloud + * Functions integration. Defaults to false. + * is_cloud_function is deprecated. Cloud functions can be configured by + * its uri as a regular web service now. + * + * Generated from protobuf field bool is_cloud_function = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return bool + * @deprecated + */ + public function getIsCloudFunction() + { + @trigger_error('is_cloud_function is deprecated.', E_USER_DEPRECATED); + return $this->is_cloud_function; + } + + /** + * Optional. Indicates if generic web service is created through Cloud + * Functions integration. Defaults to false. + * is_cloud_function is deprecated. Cloud functions can be configured by + * its uri as a regular web service now. + * + * Generated from protobuf field bool is_cloud_function = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setIsCloudFunction($var) + { + @trigger_error('is_cloud_function is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->is_cloud_function = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GenericWebService::class, \Google\Cloud\Dialogflow\V2\Fulfillment_GenericWebService::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature.php new file mode 100644 index 000000000000..b277b88a3559 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Fulfillments/GetFulfillment', + $argument, + ['\Google\Cloud\Dialogflow\V2\Fulfillment', 'decode'], + $metadata, $options); + } + + /** + * Updates the fulfillment. + * @param \Google\Cloud\Dialogflow\V2\UpdateFulfillmentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateFulfillment(\Google\Cloud\Dialogflow\V2\UpdateFulfillmentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Fulfillments/UpdateFulfillment', + $argument, + ['\Google\Cloud\Dialogflow\V2\Fulfillment', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsDestination.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsDestination.php new file mode 100644 index 000000000000..d98f64a1385a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsDestination.php @@ -0,0 +1,83 @@ +google.cloud.dialogflow.v2.GcsDestination + */ +class GcsDestination extends \Google\Protobuf\Internal\Message +{ + /** + * The Google Cloud Storage URIs for the output. A URI is of the + * form: + * gs://bucket/object-prefix-or-name + * Whether a prefix or name is used depends on the use case. The requesting + * user must have "write-permission" to the bucket. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The Google Cloud Storage URIs for the output. A URI is of the + * form: + * gs://bucket/object-prefix-or-name + * Whether a prefix or name is used depends on the use case. The requesting + * user must have "write-permission" to the bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Gcs::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage URIs for the output. A URI is of the + * form: + * gs://bucket/object-prefix-or-name + * Whether a prefix or name is used depends on the use case. The requesting + * user must have "write-permission" to the bucket. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The Google Cloud Storage URIs for the output. A URI is of the + * form: + * gs://bucket/object-prefix-or-name + * Whether a prefix or name is used depends on the use case. The requesting + * user must have "write-permission" to the bucket. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsSources.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsSources.php new file mode 100644 index 000000000000..fd50c5a6fcdd --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsSources.php @@ -0,0 +1,75 @@ +google.cloud.dialogflow.v2.GcsSources + */ +class GcsSources extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: + * gs://bucket/object-prefix-or-name + * Whether a prefix or name is used depends on the use case. + * + * Generated from protobuf field repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $uris; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $uris + * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: + * gs://bucket/object-prefix-or-name + * Whether a prefix or name is used depends on the use case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Gcs::initOnce(); + parent::__construct($data); + } + + /** + * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: + * gs://bucket/object-prefix-or-name + * Whether a prefix or name is used depends on the use case. + * + * Generated from protobuf field repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUris() + { + return $this->uris; + } + + /** + * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: + * gs://bucket/object-prefix-or-name + * Whether a prefix or name is used depends on the use case. + * + * Generated from protobuf field repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->uris = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetAgentRequest.php new file mode 100644 index 000000000000..d85fedae4a17 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetAgentRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.GetAgentRequest + */ +class GetAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that the agent to fetch is associated with. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project that the agent to fetch is associated with. + * Format: `projects/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that the agent to fetch is associated with. + * Format: `projects/`. + * + * 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 project that the agent to fetch is associated with. + * Format: `projects/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetContextRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetContextRequest.php new file mode 100644 index 000000000000..e5a1883bdae6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetContextRequest.php @@ -0,0 +1,88 @@ +google.cloud.dialogflow.v2.GetContextRequest + */ +class GetContextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the context. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the context. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the context. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 context. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationDatasetRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationDatasetRequest.php new file mode 100644 index 000000000000..50aaa6ef04ff --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationDatasetRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.GetConversationDatasetRequest + */ +class GetConversationDatasetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation dataset to retrieve. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The conversation dataset to retrieve. Format: + * `projects//locations//conversationDatasets/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation dataset to retrieve. Format: + * `projects//locations//conversationDatasets/` + * + * 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 conversation dataset to retrieve. Format: + * `projects//locations//conversationDatasets/` + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelEvaluationRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelEvaluationRequest.php new file mode 100644 index 000000000000..adcecce6bfa9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelEvaluationRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + */ +class GetConversationModelEvaluationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation model evaluation resource name. Format: + * `projects//conversationModels//evaluations/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The conversation model evaluation resource name. Format: + * `projects//conversationModels//evaluations/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation model evaluation resource name. Format: + * `projects//conversationModels//evaluations/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The conversation model evaluation resource name. Format: + * `projects//conversationModels//evaluations/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelRequest.php new file mode 100644 index 000000000000..342f5d7ad4a5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.GetConversationModelRequest + */ +class GetConversationModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation model to retrieve. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The conversation model to retrieve. Format: + * `projects//conversationModels/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation model to retrieve. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The conversation model to retrieve. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationProfileRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationProfileRequest.php new file mode 100644 index 000000000000..7c1256a0aae4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationProfileRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.GetConversationProfileRequest + */ +class GetConversationProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the conversation profile. + * Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the conversation profile. + * Format: `projects//locations//conversationProfiles/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the conversation profile. + * Format: `projects//locations//conversationProfiles/`. + * + * 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 resource name of the conversation profile. + * Format: `projects//locations//conversationProfiles/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationRequest.php new file mode 100644 index 000000000000..898ef102cbaf --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.GetConversationRequest + */ +class GetConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the conversation. Format: + * `projects//locations//conversations/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the conversation. Format: + * `projects//locations//conversations/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the conversation. Format: + * `projects//locations//conversations/`. + * + * 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. Format: + * `projects//locations//conversations/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetDocumentRequest.php new file mode 100644 index 000000000000..3822c86978f9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetDocumentRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.GetDocumentRequest + */ +class GetDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the document to retrieve. + * Format `projects//locations//knowledgeBases//documents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the document to retrieve. + * Format `projects//locations//knowledgeBases//documents/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the document to retrieve. + * Format `projects//locations//knowledgeBases//documents/`. + * + * 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 document to retrieve. + * Format `projects//locations//knowledgeBases//documents/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEntityTypeRequest.php new file mode 100644 index 000000000000..2b1fe5ea5330 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEntityTypeRequest.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.v2.GetEntityTypeRequest + */ +class GetEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entity type. + * Format: `projects//agent/entityTypes/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entity type. + * Format: `projects//agent/entityTypes/`. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entity type. + * Format: `projects//agent/entityTypes/`. + * + * 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 entity type. + * Format: `projects//agent/entityTypes/`. + * + * 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; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentHistoryRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentHistoryRequest.php new file mode 100644 index 000000000000..8df0e1890a1f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentHistoryRequest.php @@ -0,0 +1,160 @@ +google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest + */ +class GetEnvironmentHistoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the environment to retrieve history for. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the environment to retrieve history for. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the environment to retrieve history for. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * 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 name of the environment to retrieve history for. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentRequest.php new file mode 100644 index 000000000000..286b2cd6e7ca --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentRequest.php @@ -0,0 +1,88 @@ +google.cloud.dialogflow.v2.GetEnvironmentRequest + */ +class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the environment. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the environment. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the environment. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * 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 environment. + * Supported formats: + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * The environment ID for the default environment is `-`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetFulfillmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetFulfillmentRequest.php new file mode 100644 index 000000000000..bf0e0d6239ac --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetFulfillmentRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.GetFulfillmentRequest + */ +class GetFulfillmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the fulfillment. + * Format: `projects//agent/fulfillment`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the fulfillment. + * Format: `projects//agent/fulfillment`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the fulfillment. + * Format: `projects//agent/fulfillment`. + * + * 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 fulfillment. + * Format: `projects//agent/fulfillment`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetIntentRequest.php new file mode 100644 index 000000000000..e2e52c2d86fd --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetIntentRequest.php @@ -0,0 +1,156 @@ +google.cloud.dialogflow.v2.GetIntentRequest + */ +class GetIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the intent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $intent_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the intent. + * Format: `projects//agent/intents/`. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type int $intent_view + * Optional. The resource view to apply to the returned intent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the intent. + * Format: `projects//agent/intents/`. + * + * 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 intent. + * Format: `projects//agent/intents/`. + * + * 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; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIntentView() + { + return $this->intent_view; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIntentView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); + $this->intent_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetKnowledgeBaseRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetKnowledgeBaseRequest.php new file mode 100644 index 000000000000..5a6d77bc8a27 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetKnowledgeBaseRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.GetKnowledgeBaseRequest + */ +class GetKnowledgeBaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the knowledge base to retrieve. + * Format `projects//locations//knowledgeBases/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the knowledge base to retrieve. + * Format `projects//locations//knowledgeBases/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the knowledge base to retrieve. + * Format `projects//locations//knowledgeBases/`. + * + * 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 knowledge base to retrieve. + * Format `projects//locations//knowledgeBases/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetParticipantRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetParticipantRequest.php new file mode 100644 index 000000000000..85fa93287fc9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetParticipantRequest.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.GetParticipantRequest + */ +class GetParticipantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the participant. Format: + * `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the participant. Format: + * `projects//locations//conversations//participants/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the participant. Format: + * `projects//locations//conversations//participants/`. + * + * 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 participant. Format: + * `projects//locations//conversations//participants/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetSessionEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetSessionEntityTypeRequest.php new file mode 100644 index 000000000000..34c98e03c519 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetSessionEntityTypeRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.v2.GetSessionEntityTypeRequest + */ +class GetSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session entity type. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the session entity type. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session entity type. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 session entity type. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetValidationResultRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetValidationResultRequest.php new file mode 100644 index 000000000000..67ee2984cfff --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetValidationResultRequest.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.v2.GetValidationResultRequest + */ +class GetValidationResultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that the agent is associated with. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The language for which you want a validation result. If not + * specified, the agent's default language is used. [Many + * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * are supported. Note: languages must be enabled in the agent before they can + * be used. + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project that the agent is associated with. + * Format: `projects/`. + * @type string $language_code + * Optional. The language for which you want a validation result. If not + * specified, the agent's default language is used. [Many + * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * are supported. Note: languages must be enabled in the agent before they can + * be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that the agent is associated with. + * Format: `projects/`. + * + * 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 project that the agent is associated with. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The language for which you want a validation result. If not + * specified, the agent's default language is used. [Many + * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * are supported. Note: languages must be enabled in the agent before they can + * be used. + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language for which you want a validation result. If not + * specified, the agent's default language is used. [Many + * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * are supported. Note: languages must be enabled in the agent before they can + * be used. + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetVersionRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetVersionRequest.php new file mode 100644 index 000000000000..39d649a89cb4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetVersionRequest.php @@ -0,0 +1,84 @@ +google.cloud.dialogflow.v2.GetVersionRequest + */ +class GetVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the version. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the version. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the version. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * 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 version. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig.php new file mode 100644 index 000000000000..3a0c7664abc3 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig.php @@ -0,0 +1,217 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig + */ +class HumanAgentAssistantConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Pub/Sub topic on which to publish new agent assistant events. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 2; + */ + protected $notification_config = null; + /** + * Configuration for agent assistance of human agent participant. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig human_agent_suggestion_config = 3; + */ + protected $human_agent_suggestion_config = null; + /** + * Configuration for agent assistance of end user participant. + * Currently, this feature is not general available, please contact Google + * to get access. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig end_user_suggestion_config = 4; + */ + protected $end_user_suggestion_config = null; + /** + * Configuration for message analysis. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig message_analysis_config = 5; + */ + protected $message_analysis_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\NotificationConfig $notification_config + * Pub/Sub topic on which to publish new agent assistant events. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig $human_agent_suggestion_config + * Configuration for agent assistance of human agent participant. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig $end_user_suggestion_config + * Configuration for agent assistance of end user participant. + * Currently, this feature is not general available, please contact Google + * to get access. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\MessageAnalysisConfig $message_analysis_config + * Configuration for message analysis. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Pub/Sub topic on which to publish new agent assistant events. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 2; + * @return \Google\Cloud\Dialogflow\V2\NotificationConfig|null + */ + public function getNotificationConfig() + { + return $this->notification_config; + } + + public function hasNotificationConfig() + { + return isset($this->notification_config); + } + + public function clearNotificationConfig() + { + unset($this->notification_config); + } + + /** + * Pub/Sub topic on which to publish new agent assistant events. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 2; + * @param \Google\Cloud\Dialogflow\V2\NotificationConfig $var + * @return $this + */ + public function setNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\NotificationConfig::class); + $this->notification_config = $var; + + return $this; + } + + /** + * Configuration for agent assistance of human agent participant. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig human_agent_suggestion_config = 3; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig|null + */ + public function getHumanAgentSuggestionConfig() + { + return $this->human_agent_suggestion_config; + } + + public function hasHumanAgentSuggestionConfig() + { + return isset($this->human_agent_suggestion_config); + } + + public function clearHumanAgentSuggestionConfig() + { + unset($this->human_agent_suggestion_config); + } + + /** + * Configuration for agent assistance of human agent participant. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig human_agent_suggestion_config = 3; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig $var + * @return $this + */ + public function setHumanAgentSuggestionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig::class); + $this->human_agent_suggestion_config = $var; + + return $this; + } + + /** + * Configuration for agent assistance of end user participant. + * Currently, this feature is not general available, please contact Google + * to get access. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig end_user_suggestion_config = 4; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig|null + */ + public function getEndUserSuggestionConfig() + { + return $this->end_user_suggestion_config; + } + + public function hasEndUserSuggestionConfig() + { + return isset($this->end_user_suggestion_config); + } + + public function clearEndUserSuggestionConfig() + { + unset($this->end_user_suggestion_config); + } + + /** + * Configuration for agent assistance of end user participant. + * Currently, this feature is not general available, please contact Google + * to get access. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig end_user_suggestion_config = 4; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig $var + * @return $this + */ + public function setEndUserSuggestionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig::class); + $this->end_user_suggestion_config = $var; + + return $this; + } + + /** + * Configuration for message analysis. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig message_analysis_config = 5; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\MessageAnalysisConfig|null + */ + public function getMessageAnalysisConfig() + { + return $this->message_analysis_config; + } + + public function hasMessageAnalysisConfig() + { + return isset($this->message_analysis_config); + } + + public function clearMessageAnalysisConfig() + { + unset($this->message_analysis_config); + } + + /** + * Configuration for message analysis. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig message_analysis_config = 5; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\MessageAnalysisConfig $var + * @return $this + */ + public function setMessageAnalysisConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\MessageAnalysisConfig::class); + $this->message_analysis_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationModelConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationModelConfig.php new file mode 100644 index 000000000000..913c711f5571 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationModelConfig.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + */ +class ConversationModelConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Conversation model resource name. Format: `projects//conversationModels/`. + * + * Generated from protobuf field string model = 1 [(.google.api.resource_reference) = { + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model + * Conversation model resource name. Format: `projects//conversationModels/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Conversation model resource name. Format: `projects//conversationModels/`. + * + * Generated from protobuf field string model = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Conversation model resource name. Format: `projects//conversationModels/`. + * + * Generated from protobuf field string model = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConversationModelConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_ConversationModelConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationProcessConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationProcessConfig.php new file mode 100644 index 000000000000..5aaf665a8da9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationProcessConfig.php @@ -0,0 +1,74 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + */ +class ConversationProcessConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Number of recent non-small-talk sentences to use as context for article + * and FAQ suggestion + * + * Generated from protobuf field int32 recent_sentences_count = 2; + */ + protected $recent_sentences_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $recent_sentences_count + * Number of recent non-small-talk sentences to use as context for article + * and FAQ suggestion + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Number of recent non-small-talk sentences to use as context for article + * and FAQ suggestion + * + * Generated from protobuf field int32 recent_sentences_count = 2; + * @return int + */ + public function getRecentSentencesCount() + { + return $this->recent_sentences_count; + } + + /** + * Number of recent non-small-talk sentences to use as context for article + * and FAQ suggestion + * + * Generated from protobuf field int32 recent_sentences_count = 2; + * @param int $var + * @return $this + */ + public function setRecentSentencesCount($var) + { + GPBUtil::checkInt32($var); + $this->recent_sentences_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConversationProcessConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_ConversationProcessConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php new file mode 100644 index 000000000000..961e99d29168 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php @@ -0,0 +1,196 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + */ +class MessageAnalysisConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Enable entity extraction in conversation messages on [agent assist + * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). + * If unspecified, defaults to false. + * Currently, this feature is not general available, please contact Google + * to get access. + * + * Generated from protobuf field bool enable_entity_extraction = 2; + */ + protected $enable_entity_extraction = false; + /** + * Enable sentiment analysis in conversation messages on [agent assist + * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). + * If unspecified, defaults to false. Sentiment analysis inspects user input + * and identifies the prevailing subjective opinion, especially to determine + * a user's attitude as positive, negative, or neutral: + * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis + * For + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * method, result will be in + * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. + * For + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * method, result will be in + * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] + * For + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] + * method, result will be in + * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] + * If Pub/Sub notification is configured, result will be in + * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. + * + * Generated from protobuf field bool enable_sentiment_analysis = 3; + */ + protected $enable_sentiment_analysis = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_entity_extraction + * Enable entity extraction in conversation messages on [agent assist + * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). + * If unspecified, defaults to false. + * Currently, this feature is not general available, please contact Google + * to get access. + * @type bool $enable_sentiment_analysis + * Enable sentiment analysis in conversation messages on [agent assist + * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). + * If unspecified, defaults to false. Sentiment analysis inspects user input + * and identifies the prevailing subjective opinion, especially to determine + * a user's attitude as positive, negative, or neutral: + * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis + * For + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * method, result will be in + * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. + * For + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * method, result will be in + * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] + * For + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] + * method, result will be in + * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] + * If Pub/Sub notification is configured, result will be in + * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Enable entity extraction in conversation messages on [agent assist + * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). + * If unspecified, defaults to false. + * Currently, this feature is not general available, please contact Google + * to get access. + * + * Generated from protobuf field bool enable_entity_extraction = 2; + * @return bool + */ + public function getEnableEntityExtraction() + { + return $this->enable_entity_extraction; + } + + /** + * Enable entity extraction in conversation messages on [agent assist + * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). + * If unspecified, defaults to false. + * Currently, this feature is not general available, please contact Google + * to get access. + * + * Generated from protobuf field bool enable_entity_extraction = 2; + * @param bool $var + * @return $this + */ + public function setEnableEntityExtraction($var) + { + GPBUtil::checkBool($var); + $this->enable_entity_extraction = $var; + + return $this; + } + + /** + * Enable sentiment analysis in conversation messages on [agent assist + * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). + * If unspecified, defaults to false. Sentiment analysis inspects user input + * and identifies the prevailing subjective opinion, especially to determine + * a user's attitude as positive, negative, or neutral: + * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis + * For + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * method, result will be in + * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. + * For + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * method, result will be in + * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] + * For + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] + * method, result will be in + * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] + * If Pub/Sub notification is configured, result will be in + * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. + * + * Generated from protobuf field bool enable_sentiment_analysis = 3; + * @return bool + */ + public function getEnableSentimentAnalysis() + { + return $this->enable_sentiment_analysis; + } + + /** + * Enable sentiment analysis in conversation messages on [agent assist + * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). + * If unspecified, defaults to false. Sentiment analysis inspects user input + * and identifies the prevailing subjective opinion, especially to determine + * a user's attitude as positive, negative, or neutral: + * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis + * For + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * method, result will be in + * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. + * For + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * method, result will be in + * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] + * For + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] + * method, result will be in + * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] + * If Pub/Sub notification is configured, result will be in + * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. + * + * Generated from protobuf field bool enable_sentiment_analysis = 3; + * @param bool $var + * @return $this + */ + public function setEnableSentimentAnalysis($var) + { + GPBUtil::checkBool($var); + $this->enable_sentiment_analysis = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MessageAnalysisConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_MessageAnalysisConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionConfig.php new file mode 100644 index 000000000000..5a572f34db48 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionConfig.php @@ -0,0 +1,140 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + */ +class SuggestionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Configuration of different suggestion features. One feature can have only + * one config. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig feature_configs = 2; + */ + private $feature_configs; + /** + * If `group_suggestion_responses` is false, and there are multiple + * `feature_configs` in `event based suggestion` or + * StreamingAnalyzeContent, we will try to deliver suggestions to customers + * as soon as we get new suggestion. Different type of suggestions based on + * the same context will be in separate Pub/Sub event or + * `StreamingAnalyzeContentResponse`. + * If `group_suggestion_responses` set to true. All the suggestions to the + * same participant based on the same context will be grouped into a single + * Pub/Sub event or StreamingAnalyzeContentResponse. + * + * Generated from protobuf field bool group_suggestion_responses = 3; + */ + protected $group_suggestion_responses = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig>|\Google\Protobuf\Internal\RepeatedField $feature_configs + * Configuration of different suggestion features. One feature can have only + * one config. + * @type bool $group_suggestion_responses + * If `group_suggestion_responses` is false, and there are multiple + * `feature_configs` in `event based suggestion` or + * StreamingAnalyzeContent, we will try to deliver suggestions to customers + * as soon as we get new suggestion. Different type of suggestions based on + * the same context will be in separate Pub/Sub event or + * `StreamingAnalyzeContentResponse`. + * If `group_suggestion_responses` set to true. All the suggestions to the + * same participant based on the same context will be grouped into a single + * Pub/Sub event or StreamingAnalyzeContentResponse. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Configuration of different suggestion features. One feature can have only + * one config. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig feature_configs = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeatureConfigs() + { + return $this->feature_configs; + } + + /** + * Configuration of different suggestion features. One feature can have only + * one config. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig feature_configs = 2; + * @param array<\Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeatureConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig::class); + $this->feature_configs = $arr; + + return $this; + } + + /** + * If `group_suggestion_responses` is false, and there are multiple + * `feature_configs` in `event based suggestion` or + * StreamingAnalyzeContent, we will try to deliver suggestions to customers + * as soon as we get new suggestion. Different type of suggestions based on + * the same context will be in separate Pub/Sub event or + * `StreamingAnalyzeContentResponse`. + * If `group_suggestion_responses` set to true. All the suggestions to the + * same participant based on the same context will be grouped into a single + * Pub/Sub event or StreamingAnalyzeContentResponse. + * + * Generated from protobuf field bool group_suggestion_responses = 3; + * @return bool + */ + public function getGroupSuggestionResponses() + { + return $this->group_suggestion_responses; + } + + /** + * If `group_suggestion_responses` is false, and there are multiple + * `feature_configs` in `event based suggestion` or + * StreamingAnalyzeContent, we will try to deliver suggestions to customers + * as soon as we get new suggestion. Different type of suggestions based on + * the same context will be in separate Pub/Sub event or + * `StreamingAnalyzeContentResponse`. + * If `group_suggestion_responses` set to true. All the suggestions to the + * same participant based on the same context will be grouped into a single + * Pub/Sub event or StreamingAnalyzeContentResponse. + * + * Generated from protobuf field bool group_suggestion_responses = 3; + * @param bool $var + * @return $this + */ + public function setGroupSuggestionResponses($var) + { + GPBUtil::checkBool($var); + $this->group_suggestion_responses = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SuggestionConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionFeatureConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionFeatureConfig.php new file mode 100644 index 000000000000..c1050336bb55 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionFeatureConfig.php @@ -0,0 +1,302 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + */ +class SuggestionFeatureConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The suggestion feature. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature suggestion_feature = 5; + */ + protected $suggestion_feature = null; + /** + * Automatically iterates all participants and tries to compile + * suggestions. + * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + * + * Generated from protobuf field bool enable_event_based_suggestion = 3; + */ + protected $enable_event_based_suggestion = false; + /** + * Settings of suggestion trigger. + * Currently, only ARTICLE_SUGGESTION and FAQ will use this field. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings suggestion_trigger_settings = 10; + */ + protected $suggestion_trigger_settings = null; + /** + * Configs of query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig query_config = 6; + */ + protected $query_config = null; + /** + * Configs of custom conversation model. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig conversation_model_config = 7; + */ + protected $conversation_model_config = null; + /** + * Configs for processing conversation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig conversation_process_config = 8; + */ + protected $conversation_process_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\SuggestionFeature $suggestion_feature + * The suggestion feature. + * @type bool $enable_event_based_suggestion + * Automatically iterates all participants and tries to compile + * suggestions. + * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionTriggerSettings $suggestion_trigger_settings + * Settings of suggestion trigger. + * Currently, only ARTICLE_SUGGESTION and FAQ will use this field. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig $query_config + * Configs of query. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationModelConfig $conversation_model_config + * Configs of custom conversation model. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationProcessConfig $conversation_process_config + * Configs for processing conversation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * The suggestion feature. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature suggestion_feature = 5; + * @return \Google\Cloud\Dialogflow\V2\SuggestionFeature|null + */ + public function getSuggestionFeature() + { + return $this->suggestion_feature; + } + + public function hasSuggestionFeature() + { + return isset($this->suggestion_feature); + } + + public function clearSuggestionFeature() + { + unset($this->suggestion_feature); + } + + /** + * The suggestion feature. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature suggestion_feature = 5; + * @param \Google\Cloud\Dialogflow\V2\SuggestionFeature $var + * @return $this + */ + public function setSuggestionFeature($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature::class); + $this->suggestion_feature = $var; + + return $this; + } + + /** + * Automatically iterates all participants and tries to compile + * suggestions. + * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + * + * Generated from protobuf field bool enable_event_based_suggestion = 3; + * @return bool + */ + public function getEnableEventBasedSuggestion() + { + return $this->enable_event_based_suggestion; + } + + /** + * Automatically iterates all participants and tries to compile + * suggestions. + * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + * + * Generated from protobuf field bool enable_event_based_suggestion = 3; + * @param bool $var + * @return $this + */ + public function setEnableEventBasedSuggestion($var) + { + GPBUtil::checkBool($var); + $this->enable_event_based_suggestion = $var; + + return $this; + } + + /** + * Settings of suggestion trigger. + * Currently, only ARTICLE_SUGGESTION and FAQ will use this field. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings suggestion_trigger_settings = 10; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionTriggerSettings|null + */ + public function getSuggestionTriggerSettings() + { + return $this->suggestion_trigger_settings; + } + + public function hasSuggestionTriggerSettings() + { + return isset($this->suggestion_trigger_settings); + } + + public function clearSuggestionTriggerSettings() + { + unset($this->suggestion_trigger_settings); + } + + /** + * Settings of suggestion trigger. + * Currently, only ARTICLE_SUGGESTION and FAQ will use this field. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings suggestion_trigger_settings = 10; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionTriggerSettings $var + * @return $this + */ + public function setSuggestionTriggerSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionTriggerSettings::class); + $this->suggestion_trigger_settings = $var; + + return $this; + } + + /** + * Configs of query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig query_config = 6; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig|null + */ + public function getQueryConfig() + { + return $this->query_config; + } + + public function hasQueryConfig() + { + return isset($this->query_config); + } + + public function clearQueryConfig() + { + unset($this->query_config); + } + + /** + * Configs of query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig query_config = 6; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig $var + * @return $this + */ + public function setQueryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig::class); + $this->query_config = $var; + + return $this; + } + + /** + * Configs of custom conversation model. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig conversation_model_config = 7; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationModelConfig|null + */ + public function getConversationModelConfig() + { + return $this->conversation_model_config; + } + + public function hasConversationModelConfig() + { + return isset($this->conversation_model_config); + } + + public function clearConversationModelConfig() + { + unset($this->conversation_model_config); + } + + /** + * Configs of custom conversation model. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig conversation_model_config = 7; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationModelConfig $var + * @return $this + */ + public function setConversationModelConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationModelConfig::class); + $this->conversation_model_config = $var; + + return $this; + } + + /** + * Configs for processing conversation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig conversation_process_config = 8; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationProcessConfig|null + */ + public function getConversationProcessConfig() + { + return $this->conversation_process_config; + } + + public function hasConversationProcessConfig() + { + return isset($this->conversation_process_config); + } + + public function clearConversationProcessConfig() + { + unset($this->conversation_process_config); + } + + /** + * Configs for processing conversation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig conversation_process_config = 8; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationProcessConfig $var + * @return $this + */ + public function setConversationProcessConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationProcessConfig::class); + $this->conversation_process_config = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SuggestionFeatureConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionFeatureConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php new file mode 100644 index 000000000000..7b597b177014 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php @@ -0,0 +1,322 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + */ +class SuggestionQueryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Maximum number of results to return. Currently, if unset, defaults to 10. + * And the max number is 20. + * + * Generated from protobuf field int32 max_results = 4; + */ + protected $max_results = 0; + /** + * Confidence threshold of query result. + * Agent Assist gives each suggestion a score in the range [0.0, 1.0], based + * on the relevance between the suggestion and the current conversation + * context. A score of 0.0 has no relevance, while a score of 1.0 has high + * relevance. Only suggestions with a score greater than or equal to the + * value of this field are included in the results. + * For a baseline model (the default), the recommended value is in the range + * [0.05, 0.1]. + * For a custom model, there is no recommended value. Tune this value by + * starting from a very low value and slowly increasing until you have + * desired results. + * If this field is not set, it defaults to 0.0, which means that all + * suggestions are returned. + * Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. + * + * Generated from protobuf field float confidence_threshold = 5; + */ + protected $confidence_threshold = 0.0; + /** + * Determines how recent conversation context is filtered when generating + * suggestions. If unspecified, no messages will be dropped. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings context_filter_settings = 7; + */ + protected $context_filter_settings = null; + protected $query_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource $knowledge_base_query_source + * Query from knowledgebase. It is used by: + * ARTICLE_SUGGESTION, FAQ. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource $document_query_source + * Query from knowledge base document. It is used by: + * SMART_REPLY, SMART_COMPOSE. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource $dialogflow_query_source + * Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. + * @type int $max_results + * Maximum number of results to return. Currently, if unset, defaults to 10. + * And the max number is 20. + * @type float $confidence_threshold + * Confidence threshold of query result. + * Agent Assist gives each suggestion a score in the range [0.0, 1.0], based + * on the relevance between the suggestion and the current conversation + * context. A score of 0.0 has no relevance, while a score of 1.0 has high + * relevance. Only suggestions with a score greater than or equal to the + * value of this field are included in the results. + * For a baseline model (the default), the recommended value is in the range + * [0.05, 0.1]. + * For a custom model, there is no recommended value. Tune this value by + * starting from a very low value and slowly increasing until you have + * desired results. + * If this field is not set, it defaults to 0.0, which means that all + * suggestions are returned. + * Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings $context_filter_settings + * Determines how recent conversation context is filtered when generating + * suggestions. If unspecified, no messages will be dropped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Query from knowledgebase. It is used by: + * ARTICLE_SUGGESTION, FAQ. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource knowledge_base_query_source = 1; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource|null + */ + public function getKnowledgeBaseQuerySource() + { + return $this->readOneof(1); + } + + public function hasKnowledgeBaseQuerySource() + { + return $this->hasOneof(1); + } + + /** + * Query from knowledgebase. It is used by: + * ARTICLE_SUGGESTION, FAQ. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource knowledge_base_query_source = 1; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource $var + * @return $this + */ + public function setKnowledgeBaseQuerySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Query from knowledge base document. It is used by: + * SMART_REPLY, SMART_COMPOSE. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource document_query_source = 2; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource|null + */ + public function getDocumentQuerySource() + { + return $this->readOneof(2); + } + + public function hasDocumentQuerySource() + { + return $this->hasOneof(2); + } + + /** + * Query from knowledge base document. It is used by: + * SMART_REPLY, SMART_COMPOSE. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource document_query_source = 2; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource $var + * @return $this + */ + public function setDocumentQuerySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource dialogflow_query_source = 3; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource|null + */ + public function getDialogflowQuerySource() + { + return $this->readOneof(3); + } + + public function hasDialogflowQuerySource() + { + return $this->hasOneof(3); + } + + /** + * Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource dialogflow_query_source = 3; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource $var + * @return $this + */ + public function setDialogflowQuerySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Maximum number of results to return. Currently, if unset, defaults to 10. + * And the max number is 20. + * + * Generated from protobuf field int32 max_results = 4; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * Maximum number of results to return. Currently, if unset, defaults to 10. + * And the max number is 20. + * + * Generated from protobuf field int32 max_results = 4; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkInt32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Confidence threshold of query result. + * Agent Assist gives each suggestion a score in the range [0.0, 1.0], based + * on the relevance between the suggestion and the current conversation + * context. A score of 0.0 has no relevance, while a score of 1.0 has high + * relevance. Only suggestions with a score greater than or equal to the + * value of this field are included in the results. + * For a baseline model (the default), the recommended value is in the range + * [0.05, 0.1]. + * For a custom model, there is no recommended value. Tune this value by + * starting from a very low value and slowly increasing until you have + * desired results. + * If this field is not set, it defaults to 0.0, which means that all + * suggestions are returned. + * Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. + * + * Generated from protobuf field float confidence_threshold = 5; + * @return float + */ + public function getConfidenceThreshold() + { + return $this->confidence_threshold; + } + + /** + * Confidence threshold of query result. + * Agent Assist gives each suggestion a score in the range [0.0, 1.0], based + * on the relevance between the suggestion and the current conversation + * context. A score of 0.0 has no relevance, while a score of 1.0 has high + * relevance. Only suggestions with a score greater than or equal to the + * value of this field are included in the results. + * For a baseline model (the default), the recommended value is in the range + * [0.05, 0.1]. + * For a custom model, there is no recommended value. Tune this value by + * starting from a very low value and slowly increasing until you have + * desired results. + * If this field is not set, it defaults to 0.0, which means that all + * suggestions are returned. + * Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. + * + * Generated from protobuf field float confidence_threshold = 5; + * @param float $var + * @return $this + */ + public function setConfidenceThreshold($var) + { + GPBUtil::checkFloat($var); + $this->confidence_threshold = $var; + + return $this; + } + + /** + * Determines how recent conversation context is filtered when generating + * suggestions. If unspecified, no messages will be dropped. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings context_filter_settings = 7; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings|null + */ + public function getContextFilterSettings() + { + return $this->context_filter_settings; + } + + public function hasContextFilterSettings() + { + return isset($this->context_filter_settings); + } + + public function clearContextFilterSettings() + { + unset($this->context_filter_settings); + } + + /** + * Determines how recent conversation context is filtered when generating + * suggestions. If unspecified, no messages will be dropped. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings context_filter_settings = 7; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings $var + * @return $this + */ + public function setContextFilterSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings::class); + $this->context_filter_settings = $var; + + return $this; + } + + /** + * @return string + */ + public function getQuerySource() + { + return $this->whichOneof("query_source"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SuggestionQueryConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/ContextFilterSettings.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/ContextFilterSettings.php new file mode 100644 index 000000000000..dba5d8e3a3cb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/ContextFilterSettings.php @@ -0,0 +1,143 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + */ +class ContextFilterSettings extends \Google\Protobuf\Internal\Message +{ + /** + * If set to true, the last message from virtual agent (hand off message) + * and the message before it (trigger message of hand off) are dropped. + * + * Generated from protobuf field bool drop_handoff_messages = 1; + */ + protected $drop_handoff_messages = false; + /** + * If set to true, all messages from virtual agent are dropped. + * + * Generated from protobuf field bool drop_virtual_agent_messages = 2; + */ + protected $drop_virtual_agent_messages = false; + /** + * If set to true, all messages from ivr stage are dropped. + * + * Generated from protobuf field bool drop_ivr_messages = 3; + */ + protected $drop_ivr_messages = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $drop_handoff_messages + * If set to true, the last message from virtual agent (hand off message) + * and the message before it (trigger message of hand off) are dropped. + * @type bool $drop_virtual_agent_messages + * If set to true, all messages from virtual agent are dropped. + * @type bool $drop_ivr_messages + * If set to true, all messages from ivr stage are dropped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * If set to true, the last message from virtual agent (hand off message) + * and the message before it (trigger message of hand off) are dropped. + * + * Generated from protobuf field bool drop_handoff_messages = 1; + * @return bool + */ + public function getDropHandoffMessages() + { + return $this->drop_handoff_messages; + } + + /** + * If set to true, the last message from virtual agent (hand off message) + * and the message before it (trigger message of hand off) are dropped. + * + * Generated from protobuf field bool drop_handoff_messages = 1; + * @param bool $var + * @return $this + */ + public function setDropHandoffMessages($var) + { + GPBUtil::checkBool($var); + $this->drop_handoff_messages = $var; + + return $this; + } + + /** + * If set to true, all messages from virtual agent are dropped. + * + * Generated from protobuf field bool drop_virtual_agent_messages = 2; + * @return bool + */ + public function getDropVirtualAgentMessages() + { + return $this->drop_virtual_agent_messages; + } + + /** + * If set to true, all messages from virtual agent are dropped. + * + * Generated from protobuf field bool drop_virtual_agent_messages = 2; + * @param bool $var + * @return $this + */ + public function setDropVirtualAgentMessages($var) + { + GPBUtil::checkBool($var); + $this->drop_virtual_agent_messages = $var; + + return $this; + } + + /** + * If set to true, all messages from ivr stage are dropped. + * + * Generated from protobuf field bool drop_ivr_messages = 3; + * @return bool + */ + public function getDropIvrMessages() + { + return $this->drop_ivr_messages; + } + + /** + * If set to true, all messages from ivr stage are dropped. + * + * Generated from protobuf field bool drop_ivr_messages = 3; + * @param bool $var + * @return $this + */ + public function setDropIvrMessages($var) + { + GPBUtil::checkBool($var); + $this->drop_ivr_messages = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContextFilterSettings::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php new file mode 100644 index 000000000000..017650e5fad0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php @@ -0,0 +1,83 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + */ +class DialogflowQuerySource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of a Dialogflow virtual agent used for end user side + * intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in + * the same Dialogflow project. + * + * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $agent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agent + * Required. The name of a Dialogflow virtual agent used for end user side + * intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in + * the same Dialogflow project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of a Dialogflow virtual agent used for end user side + * intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in + * the same Dialogflow project. + * + * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAgent() + { + return $this->agent; + } + + /** + * Required. The name of a Dialogflow virtual agent used for end user side + * intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in + * the same Dialogflow project. + * + * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAgent($var) + { + GPBUtil::checkString($var, True); + $this->agent = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DialogflowQuerySource::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DocumentQuerySource.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DocumentQuerySource.php new file mode 100644 index 000000000000..fc256b2de3e4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DocumentQuerySource.php @@ -0,0 +1,83 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + */ +class DocumentQuerySource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Knowledge documents to query from. Format: + * `projects//locations//knowledgeBases//documents/`. + * Currently, at most 5 documents are supported. + * + * Generated from protobuf field repeated string documents = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $documents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $documents + * Required. Knowledge documents to query from. Format: + * `projects//locations//knowledgeBases//documents/`. + * Currently, at most 5 documents are supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. Knowledge documents to query from. Format: + * `projects//locations//knowledgeBases//documents/`. + * Currently, at most 5 documents are supported. + * + * Generated from protobuf field repeated string documents = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * Required. Knowledge documents to query from. Format: + * `projects//locations//knowledgeBases//documents/`. + * Currently, at most 5 documents are supported. + * + * Generated from protobuf field repeated string documents = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->documents = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DocumentQuerySource::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/KnowledgeBaseQuerySource.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/KnowledgeBaseQuerySource.php new file mode 100644 index 000000000000..c525c1941b75 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/KnowledgeBaseQuerySource.php @@ -0,0 +1,83 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + */ +class KnowledgeBaseQuerySource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Knowledge bases to query. Format: + * `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge + * bases are supported. + * + * Generated from protobuf field repeated string knowledge_bases = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $knowledge_bases; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $knowledge_bases + * Required. Knowledge bases to query. Format: + * `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge + * bases are supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. Knowledge bases to query. Format: + * `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge + * bases are supported. + * + * Generated from protobuf field repeated string knowledge_bases = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKnowledgeBases() + { + return $this->knowledge_bases; + } + + /** + * Required. Knowledge bases to query. Format: + * `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge + * bases are supported. + * + * Generated from protobuf field repeated string knowledge_bases = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKnowledgeBases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->knowledge_bases = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KnowledgeBaseQuerySource::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionTriggerSettings.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionTriggerSettings.php new file mode 100644 index 000000000000..c53a6921ed42 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionTriggerSettings.php @@ -0,0 +1,108 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + */ +class SuggestionTriggerSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Do not trigger if last utterance is small talk. + * + * Generated from protobuf field bool no_smalltalk = 1; + */ + protected $no_smalltalk = false; + /** + * Only trigger suggestion if participant role of last utterance is + * END_USER. + * + * Generated from protobuf field bool only_end_user = 2; + */ + protected $only_end_user = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $no_smalltalk + * Do not trigger if last utterance is small talk. + * @type bool $only_end_user + * Only trigger suggestion if participant role of last utterance is + * END_USER. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Do not trigger if last utterance is small talk. + * + * Generated from protobuf field bool no_smalltalk = 1; + * @return bool + */ + public function getNoSmalltalk() + { + return $this->no_smalltalk; + } + + /** + * Do not trigger if last utterance is small talk. + * + * Generated from protobuf field bool no_smalltalk = 1; + * @param bool $var + * @return $this + */ + public function setNoSmalltalk($var) + { + GPBUtil::checkBool($var); + $this->no_smalltalk = $var; + + return $this; + } + + /** + * Only trigger suggestion if participant role of last utterance is + * END_USER. + * + * Generated from protobuf field bool only_end_user = 2; + * @return bool + */ + public function getOnlyEndUser() + { + return $this->only_end_user; + } + + /** + * Only trigger suggestion if participant role of last utterance is + * END_USER. + * + * Generated from protobuf field bool only_end_user = 2; + * @param bool $var + * @return $this + */ + public function setOnlyEndUser($var) + { + GPBUtil::checkBool($var); + $this->only_end_user = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SuggestionTriggerSettings::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionTriggerSettings::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationModelConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationModelConfig.php new file mode 100644 index 000000000000..28da7bb1ba42 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationModelConfig.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.HumanAgentAssistantEvent + */ +class HumanAgentAssistantEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The conversation this notification refers to. + * Format: `projects//conversations/`. + * + * Generated from protobuf field string conversation = 1; + */ + protected $conversation = ''; + /** + * The participant that the suggestion is compiled for. + * Format: `projects//conversations//participants/`. It will not be set in legacy workflow. + * + * Generated from protobuf field string participant = 3; + */ + protected $participant = ''; + /** + * The suggestion results payload that this notification refers to. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult suggestion_results = 5; + */ + private $suggestion_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation + * The conversation this notification refers to. + * Format: `projects//conversations/`. + * @type string $participant + * The participant that the suggestion is compiled for. + * Format: `projects//conversations//participants/`. It will not be set in legacy workflow. + * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $suggestion_results + * The suggestion results payload that this notification refers to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\HumanAgentAssistantEvent::initOnce(); + parent::__construct($data); + } + + /** + * The conversation this notification refers to. + * Format: `projects//conversations/`. + * + * Generated from protobuf field string conversation = 1; + * @return string + */ + public function getConversation() + { + return $this->conversation; + } + + /** + * The conversation this notification refers to. + * Format: `projects//conversations/`. + * + * Generated from protobuf field string conversation = 1; + * @param string $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkString($var, True); + $this->conversation = $var; + + return $this; + } + + /** + * The participant that the suggestion is compiled for. + * Format: `projects//conversations//participants/`. It will not be set in legacy workflow. + * + * Generated from protobuf field string participant = 3; + * @return string + */ + public function getParticipant() + { + return $this->participant; + } + + /** + * The participant that the suggestion is compiled for. + * Format: `projects//conversations//participants/`. It will not be set in legacy workflow. + * + * Generated from protobuf field string participant = 3; + * @param string $var + * @return $this + */ + public function setParticipant($var) + { + GPBUtil::checkString($var, True); + $this->participant = $var; + + return $this; + } + + /** + * The suggestion results payload that this notification refers to. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult suggestion_results = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSuggestionResults() + { + return $this->suggestion_results; + } + + /** + * The suggestion results payload that this notification refers to. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult suggestion_results = 5; + * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSuggestionResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); + $this->suggestion_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig.php new file mode 100644 index 000000000000..63924ddc8d81 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig.php @@ -0,0 +1,111 @@ +google.cloud.dialogflow.v2.HumanAgentHandoffConfig + */ +class HumanAgentHandoffConfig extends \Google\Protobuf\Internal\Message +{ + protected $agent_service; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig $live_person_config + * Uses LivePerson (https://www.liveperson.com). + * @type \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig $salesforce_live_agent_config + * Uses Salesforce Live Agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Uses LivePerson (https://www.liveperson.com). + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig live_person_config = 1; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig|null + */ + public function getLivePersonConfig() + { + return $this->readOneof(1); + } + + public function hasLivePersonConfig() + { + return $this->hasOneof(1); + } + + /** + * Uses LivePerson (https://www.liveperson.com). + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig live_person_config = 1; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig $var + * @return $this + */ + public function setLivePersonConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Uses Salesforce Live Agent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig salesforce_live_agent_config = 2; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig|null + */ + public function getSalesforceLiveAgentConfig() + { + return $this->readOneof(2); + } + + public function hasSalesforceLiveAgentConfig() + { + return $this->hasOneof(2); + } + + /** + * Uses Salesforce Live Agent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig salesforce_live_agent_config = 2; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig $var + * @return $this + */ + public function setSalesforceLiveAgentConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getAgentService() + { + return $this->whichOneof("agent_service"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/LivePersonConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/LivePersonConfig.php new file mode 100644 index 000000000000..6e6f2dac5c30 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/LivePersonConfig.php @@ -0,0 +1,74 @@ +google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig + */ +class LivePersonConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Account number of the LivePerson account to connect. This is + * the account number you input at the login page. + * + * Generated from protobuf field string account_number = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $account_number = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $account_number + * Required. Account number of the LivePerson account to connect. This is + * the account number you input at the login page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. Account number of the LivePerson account to connect. This is + * the account number you input at the login page. + * + * Generated from protobuf field string account_number = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAccountNumber() + { + return $this->account_number; + } + + /** + * Required. Account number of the LivePerson account to connect. This is + * the account number you input at the login page. + * + * Generated from protobuf field string account_number = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAccountNumber($var) + { + GPBUtil::checkString($var, True); + $this->account_number = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LivePersonConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig_LivePersonConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/SalesforceLiveAgentConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/SalesforceLiveAgentConfig.php new file mode 100644 index 000000000000..8bc5641bf77b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/SalesforceLiveAgentConfig.php @@ -0,0 +1,184 @@ +google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + */ +class SalesforceLiveAgentConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The organization ID of the Salesforce account. + * + * Generated from protobuf field string organization_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $organization_id = ''; + /** + * Required. Live Agent deployment ID. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployment_id = ''; + /** + * Required. Live Agent chat button ID. + * + * Generated from protobuf field string button_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $button_id = ''; + /** + * Required. Domain of the Live Agent endpoint for this agent. You can find + * the endpoint URL in the `Live Agent settings` page. For example if URL + * has the form https://d.la4-c2-phx.salesforceliveagent.com/..., + * you should fill in d.la4-c2-phx.salesforceliveagent.com. + * + * Generated from protobuf field string endpoint_domain = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $endpoint_domain = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $organization_id + * Required. The organization ID of the Salesforce account. + * @type string $deployment_id + * Required. Live Agent deployment ID. + * @type string $button_id + * Required. Live Agent chat button ID. + * @type string $endpoint_domain + * Required. Domain of the Live Agent endpoint for this agent. You can find + * the endpoint URL in the `Live Agent settings` page. For example if URL + * has the form https://d.la4-c2-phx.salesforceliveagent.com/..., + * you should fill in d.la4-c2-phx.salesforceliveagent.com. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. The organization ID of the Salesforce account. + * + * Generated from protobuf field string organization_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOrganizationId() + { + return $this->organization_id; + } + + /** + * Required. The organization ID of the Salesforce account. + * + * Generated from protobuf field string organization_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOrganizationId($var) + { + GPBUtil::checkString($var, True); + $this->organization_id = $var; + + return $this; + } + + /** + * Required. Live Agent deployment ID. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDeploymentId() + { + return $this->deployment_id; + } + + /** + * Required. Live Agent deployment ID. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDeploymentId($var) + { + GPBUtil::checkString($var, True); + $this->deployment_id = $var; + + return $this; + } + + /** + * Required. Live Agent chat button ID. + * + * Generated from protobuf field string button_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getButtonId() + { + return $this->button_id; + } + + /** + * Required. Live Agent chat button ID. + * + * Generated from protobuf field string button_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setButtonId($var) + { + GPBUtil::checkString($var, True); + $this->button_id = $var; + + return $this; + } + + /** + * Required. Domain of the Live Agent endpoint for this agent. You can find + * the endpoint URL in the `Live Agent settings` page. For example if URL + * has the form https://d.la4-c2-phx.salesforceliveagent.com/..., + * you should fill in d.la4-c2-phx.salesforceliveagent.com. + * + * Generated from protobuf field string endpoint_domain = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEndpointDomain() + { + return $this->endpoint_domain; + } + + /** + * Required. Domain of the Live Agent endpoint for this agent. You can find + * the endpoint URL in the `Live Agent settings` page. For example if URL + * has the form https://d.la4-c2-phx.salesforceliveagent.com/..., + * you should fill in d.la4-c2-phx.salesforceliveagent.com. + * + * Generated from protobuf field string endpoint_domain = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEndpointDomain($var) + { + GPBUtil::checkString($var, True); + $this->endpoint_domain = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SalesforceLiveAgentConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig_SalesforceLiveAgentConfig::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_LivePersonConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_LivePersonConfig.php new file mode 100644 index 000000000000..3578f1fc1aad --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_LivePersonConfig.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.ImportAgentRequest + */ +class ImportAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that the agent to import is associated with. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + protected $agent; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project that the agent to import is associated with. + * Format: `projects/`. + * @type string $agent_uri + * The URI to a Google Cloud Storage file containing the agent to import. + * Note: The URI must start with "gs://". + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * @type string $agent_content + * Zip compressed raw byte content for agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that the agent to import is associated with. + * Format: `projects/`. + * + * 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 project that the agent to import is associated with. + * Format: `projects/`. + * + * 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 URI to a Google Cloud Storage file containing the agent to import. + * Note: The URI must start with "gs://". + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * + * Generated from protobuf field string agent_uri = 2; + * @return string + */ + public function getAgentUri() + { + return $this->readOneof(2); + } + + public function hasAgentUri() + { + return $this->hasOneof(2); + } + + /** + * The URI to a Google Cloud Storage file containing the agent to import. + * Note: The URI must start with "gs://". + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * + * Generated from protobuf field string agent_uri = 2; + * @param string $var + * @return $this + */ + public function setAgentUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Zip compressed raw byte content for agent. + * + * Generated from protobuf field bytes agent_content = 3; + * @return string + */ + public function getAgentContent() + { + return $this->readOneof(3); + } + + public function hasAgentContent() + { + return $this->hasOneof(3); + } + + /** + * Zip compressed raw byte content for agent. + * + * Generated from protobuf field bytes agent_content = 3; + * @param string $var + * @return $this + */ + public function setAgentContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getAgent() + { + return $this->whichOneof("agent"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationMetadata.php new file mode 100644 index 000000000000..fd0fdeede7ef --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationMetadata.php @@ -0,0 +1,163 @@ +google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + */ +class ImportConversationDataOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the imported conversation dataset. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { + */ + protected $conversation_dataset = ''; + /** + * Partial failures are failures that don't fail the whole long running + * operation, e.g. single files that couldn't be read. + * + * Generated from protobuf field repeated .google.rpc.Status partial_failures = 2; + */ + private $partial_failures; + /** + * Timestamp when import conversation data request was created. The time is + * measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_dataset + * The resource name of the imported conversation dataset. Format: + * `projects//locations//conversationDatasets/` + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_failures + * Partial failures are failures that don't fail the whole long running + * operation, e.g. single files that couldn't be read. + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp when import conversation data request was created. The time is + * measured on server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the imported conversation dataset. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getConversationDataset() + { + return $this->conversation_dataset; + } + + /** + * The resource name of the imported conversation dataset. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setConversationDataset($var) + { + GPBUtil::checkString($var, True); + $this->conversation_dataset = $var; + + return $this; + } + + /** + * Partial failures are failures that don't fail the whole long running + * operation, e.g. single files that couldn't be read. + * + * Generated from protobuf field repeated .google.rpc.Status partial_failures = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartialFailures() + { + return $this->partial_failures; + } + + /** + * Partial failures are failures that don't fail the whole long running + * operation, e.g. single files that couldn't be read. + * + * Generated from protobuf field repeated .google.rpc.Status partial_failures = 2; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPartialFailures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->partial_failures = $arr; + + return $this; + } + + /** + * Timestamp when import conversation data request was created. The time is + * measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @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); + } + + /** + * Timestamp when import conversation data request was created. The time is + * measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationResponse.php new file mode 100644 index 000000000000..9e946c081918 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationResponse.php @@ -0,0 +1,111 @@ +google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + */ +class ImportConversationDataOperationResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the imported conversation dataset. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { + */ + protected $conversation_dataset = ''; + /** + * Number of conversations imported successfully. + * + * Generated from protobuf field int32 import_count = 3; + */ + protected $import_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_dataset + * The resource name of the imported conversation dataset. Format: + * `projects//locations//conversationDatasets/` + * @type int $import_count + * Number of conversations imported successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the imported conversation dataset. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getConversationDataset() + { + return $this->conversation_dataset; + } + + /** + * The resource name of the imported conversation dataset. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setConversationDataset($var) + { + GPBUtil::checkString($var, True); + $this->conversation_dataset = $var; + + return $this; + } + + /** + * Number of conversations imported successfully. + * + * Generated from protobuf field int32 import_count = 3; + * @return int + */ + public function getImportCount() + { + return $this->import_count; + } + + /** + * Number of conversations imported successfully. + * + * Generated from protobuf field int32 import_count = 3; + * @param int $var + * @return $this + */ + public function setImportCount($var) + { + GPBUtil::checkInt32($var); + $this->import_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataRequest.php new file mode 100644 index 000000000000..4dbfc9178c1c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataRequest.php @@ -0,0 +1,120 @@ +google.cloud.dialogflow.v2.ImportConversationDataRequest + */ +class ImportConversationDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Dataset resource name. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Configuration describing where to import data from. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Dataset resource name. Format: + * `projects//locations//conversationDatasets/` + * @type \Google\Cloud\Dialogflow\V2\InputConfig $input_config + * Required. Configuration describing where to import data from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * Required. Dataset resource name. Format: + * `projects//locations//conversationDatasets/` + * + * 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. Dataset resource name. Format: + * `projects//locations//conversationDatasets/` + * + * 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; + } + + /** + * Required. Configuration describing where to import data from. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. Configuration describing where to import data from. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputConfig::class); + $this->input_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentTemplate.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentTemplate.php new file mode 100644 index 000000000000..674d0140d28e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentTemplate.php @@ -0,0 +1,147 @@ +google.cloud.dialogflow.v2.ImportDocumentTemplate + */ +class ImportDocumentTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The MIME type of the document. + * + * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mime_type = ''; + /** + * Required. The knowledge type of document content. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $knowledge_types; + /** + * Metadata for the document. The metadata supports arbitrary + * key-value pairs. Suggested use cases include storing a document's title, + * an external URL distinct from the document's content_uri, etc. + * The max size of a `key` or a `value` of the metadata is 1024 bytes. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mime_type + * Required. The MIME type of the document. + * @type array|\Google\Protobuf\Internal\RepeatedField $knowledge_types + * Required. The knowledge type of document content. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Metadata for the document. The metadata supports arbitrary + * key-value pairs. Suggested use cases include storing a document's title, + * an external URL distinct from the document's content_uri, etc. + * The max size of a `key` or a `value` of the metadata is 1024 bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The MIME type of the document. + * + * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Required. The MIME type of the document. + * + * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Required. The knowledge type of document content. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKnowledgeTypes() + { + return $this->knowledge_types; + } + + /** + * Required. The knowledge type of document content. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKnowledgeTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\Document\KnowledgeType::class); + $this->knowledge_types = $arr; + + return $this; + } + + /** + * Metadata for the document. The metadata supports arbitrary + * key-value pairs. Suggested use cases include storing a document's title, + * an external URL distinct from the document's content_uri, etc. + * The max size of a `key` or a `value` of the metadata is 1024 bytes. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Metadata for the document. The metadata supports arbitrary + * key-value pairs. Suggested use cases include storing a document's title, + * an external URL distinct from the document's content_uri, etc. + * The max size of a `key` or a `value` of the metadata is 1024 bytes. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsRequest.php new file mode 100644 index 000000000000..12ac6bfd7ea1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsRequest.php @@ -0,0 +1,212 @@ +google.cloud.dialogflow.v2.ImportDocumentsRequest + */ +class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The knowledge base to import documents into. + * Format: `projects//locations//knowledgeBases/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Document template used for importing all the documents. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ImportDocumentTemplate document_template = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document_template = null; + /** + * Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * + * Generated from protobuf field bool import_gcs_custom_metadata = 4; + */ + protected $import_gcs_custom_metadata = false; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The knowledge base to import documents into. + * Format: `projects//locations//knowledgeBases/`. + * @type \Google\Cloud\Dialogflow\V2\GcsSources $gcs_source + * The Google Cloud Storage location for the documents. + * The path can include a wildcard. + * These URIs may have the forms + * `gs:///`. + * `gs:////*.`. + * @type \Google\Cloud\Dialogflow\V2\ImportDocumentTemplate $document_template + * Required. Document template used for importing all the documents. + * @type bool $import_gcs_custom_metadata + * Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The knowledge base to import documents into. + * Format: `projects//locations//knowledgeBases/`. + * + * 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 knowledge base to import documents into. + * Format: `projects//locations//knowledgeBases/`. + * + * 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 Google Cloud Storage location for the documents. + * The path can include a wildcard. + * These URIs may have the forms + * `gs:///`. + * `gs:////*.`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 2; + * @return \Google\Cloud\Dialogflow\V2\GcsSources|null + */ + public function getGcsSource() + { + return $this->readOneof(2); + } + + public function hasGcsSource() + { + return $this->hasOneof(2); + } + + /** + * The Google Cloud Storage location for the documents. + * The path can include a wildcard. + * These URIs may have the forms + * `gs:///`. + * `gs:////*.`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 2; + * @param \Google\Cloud\Dialogflow\V2\GcsSources $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsSources::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. Document template used for importing all the documents. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ImportDocumentTemplate document_template = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\ImportDocumentTemplate|null + */ + public function getDocumentTemplate() + { + return $this->document_template; + } + + public function hasDocumentTemplate() + { + return isset($this->document_template); + } + + public function clearDocumentTemplate() + { + unset($this->document_template); + } + + /** + * Required. Document template used for importing all the documents. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ImportDocumentTemplate document_template = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\ImportDocumentTemplate $var + * @return $this + */ + public function setDocumentTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ImportDocumentTemplate::class); + $this->document_template = $var; + + return $this; + } + + /** + * Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * + * Generated from protobuf field bool import_gcs_custom_metadata = 4; + * @return bool + */ + public function getImportGcsCustomMetadata() + { + return $this->import_gcs_custom_metadata; + } + + /** + * Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * + * Generated from protobuf field bool import_gcs_custom_metadata = 4; + * @param bool $var + * @return $this + */ + public function setImportGcsCustomMetadata($var) + { + GPBUtil::checkBool($var); + $this->import_gcs_custom_metadata = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsResponse.php new file mode 100644 index 000000000000..98f7b7ae4fa6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsResponse.php @@ -0,0 +1,68 @@ +google.cloud.dialogflow.v2.ImportDocumentsResponse + */ +class ImportDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Includes details about skipped documents or any other warnings. + * + * Generated from protobuf field repeated .google.rpc.Status warnings = 1; + */ + private $warnings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $warnings + * Includes details about skipped documents or any other warnings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Includes details about skipped documents or any other warnings. + * + * Generated from protobuf field repeated .google.rpc.Status warnings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * Includes details about skipped documents or any other warnings. + * + * Generated from protobuf field repeated .google.rpc.Status warnings = 1; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->warnings = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputAudioConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputAudioConfig.php new file mode 100644 index 000000000000..9e36b434809d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputAudioConfig.php @@ -0,0 +1,570 @@ +google.cloud.dialogflow.v2.InputAudioConfig + */ +class InputAudioConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Audio encoding of the audio content to process. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1; + */ + protected $audio_encoding = 0; + /** + * Required. Sample rate (in Hertz) of the audio content sent in the query. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics) for + * more details. + * + * Generated from protobuf field int32 sample_rate_hertz = 2; + */ + protected $sample_rate_hertz = 0; + /** + * Required. The language of the supplied audio. Dialogflow does not do + * translations. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * + * Generated from protobuf field string language_code = 3; + */ + protected $language_code = ''; + /** + * If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] + * with information about the recognized speech words, e.g. start and end time + * offsets. If false or unspecified, Speech doesn't return any word-level + * information. + * + * Generated from protobuf field bool enable_word_info = 13; + */ + protected $enable_word_info = false; + /** + * A list of strings containing words and phrases that the speech + * recognizer should recognize with higher likelihood. + * See [the Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + * for more details. + * This field is deprecated. Please use [speech_contexts]() instead. If you + * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will + * treat the [phrase_hints]() as a single additional [SpeechContext](). + * + * Generated from protobuf field repeated string phrase_hints = 4 [deprecated = true]; + * @deprecated + */ + private $phrase_hints; + /** + * Context information to assist speech recognition. + * See [the Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + * for more details. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11; + */ + private $speech_contexts; + /** + * Which Speech model to select for the given request. Select the + * model best suited to your domain to get best results. If a model is not + * explicitly specified, then we auto-select a model based on the parameters + * in the InputAudioConfig. + * If enhanced speech model is enabled for the agent and an enhanced + * version of the specified model for the language does not exist, then the + * speech is recognized using the standard version of the specified model. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + * for more details. + * + * Generated from protobuf field string model = 7; + */ + protected $model = ''; + /** + * Which variant of the [Speech + * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10; + */ + protected $model_variant = 0; + /** + * If `false` (default), recognition does not cease until the + * client closes the stream. + * If `true`, the recognizer will detect a single spoken utterance in input + * audio. Recognition ceases when it detects the audio's voice has + * stopped or paused. In this case, once a detected intent is received, the + * client should close the stream and start a new request with a new stream as + * needed. + * Note: This setting is relevant only for streaming methods. + * Note: When specified, InputAudioConfig.single_utterance takes precedence + * over StreamingDetectIntentRequest.single_utterance. + * + * Generated from protobuf field bool single_utterance = 8; + */ + protected $single_utterance = false; + /** + * Only used in + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. + * If `false` and recognition doesn't return any result, trigger + * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. + * + * Generated from protobuf field bool disable_no_speech_recognized_event = 14; + */ + protected $disable_no_speech_recognized_event = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $audio_encoding + * Required. Audio encoding of the audio content to process. + * @type int $sample_rate_hertz + * Required. Sample rate (in Hertz) of the audio content sent in the query. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics) for + * more details. + * @type string $language_code + * Required. The language of the supplied audio. Dialogflow does not do + * translations. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * @type bool $enable_word_info + * If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] + * with information about the recognized speech words, e.g. start and end time + * offsets. If false or unspecified, Speech doesn't return any word-level + * information. + * @type array|\Google\Protobuf\Internal\RepeatedField $phrase_hints + * A list of strings containing words and phrases that the speech + * recognizer should recognize with higher likelihood. + * See [the Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + * for more details. + * This field is deprecated. Please use [speech_contexts]() instead. If you + * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will + * treat the [phrase_hints]() as a single additional [SpeechContext](). + * @type array<\Google\Cloud\Dialogflow\V2\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $speech_contexts + * Context information to assist speech recognition. + * See [the Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + * for more details. + * @type string $model + * Which Speech model to select for the given request. Select the + * model best suited to your domain to get best results. If a model is not + * explicitly specified, then we auto-select a model based on the parameters + * in the InputAudioConfig. + * If enhanced speech model is enabled for the agent and an enhanced + * version of the specified model for the language does not exist, then the + * speech is recognized using the standard version of the specified model. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + * for more details. + * @type int $model_variant + * Which variant of the [Speech + * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + * @type bool $single_utterance + * If `false` (default), recognition does not cease until the + * client closes the stream. + * If `true`, the recognizer will detect a single spoken utterance in input + * audio. Recognition ceases when it detects the audio's voice has + * stopped or paused. In this case, once a detected intent is received, the + * client should close the stream and start a new request with a new stream as + * needed. + * Note: This setting is relevant only for streaming methods. + * Note: When specified, InputAudioConfig.single_utterance takes precedence + * over StreamingDetectIntentRequest.single_utterance. + * @type bool $disable_no_speech_recognized_event + * Only used in + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. + * If `false` and recognition doesn't return any result, trigger + * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Audio encoding of the audio content to process. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1; + * @return int + */ + public function getAudioEncoding() + { + return $this->audio_encoding; + } + + /** + * Required. Audio encoding of the audio content to process. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1; + * @param int $var + * @return $this + */ + public function setAudioEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AudioEncoding::class); + $this->audio_encoding = $var; + + return $this; + } + + /** + * Required. Sample rate (in Hertz) of the audio content sent in the query. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics) for + * more details. + * + * Generated from protobuf field int32 sample_rate_hertz = 2; + * @return int + */ + public function getSampleRateHertz() + { + return $this->sample_rate_hertz; + } + + /** + * Required. Sample rate (in Hertz) of the audio content sent in the query. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics) for + * more details. + * + * Generated from protobuf field int32 sample_rate_hertz = 2; + * @param int $var + * @return $this + */ + public function setSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->sample_rate_hertz = $var; + + return $this; + } + + /** + * Required. The language of the supplied audio. Dialogflow does not do + * translations. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * + * Generated from protobuf field string language_code = 3; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Required. The language of the supplied audio. Dialogflow does not do + * translations. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * + * Generated from protobuf field string language_code = 3; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] + * with information about the recognized speech words, e.g. start and end time + * offsets. If false or unspecified, Speech doesn't return any word-level + * information. + * + * Generated from protobuf field bool enable_word_info = 13; + * @return bool + */ + public function getEnableWordInfo() + { + return $this->enable_word_info; + } + + /** + * If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] + * with information about the recognized speech words, e.g. start and end time + * offsets. If false or unspecified, Speech doesn't return any word-level + * information. + * + * Generated from protobuf field bool enable_word_info = 13; + * @param bool $var + * @return $this + */ + public function setEnableWordInfo($var) + { + GPBUtil::checkBool($var); + $this->enable_word_info = $var; + + return $this; + } + + /** + * A list of strings containing words and phrases that the speech + * recognizer should recognize with higher likelihood. + * See [the Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + * for more details. + * This field is deprecated. Please use [speech_contexts]() instead. If you + * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will + * treat the [phrase_hints]() as a single additional [SpeechContext](). + * + * Generated from protobuf field repeated string phrase_hints = 4 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getPhraseHints() + { + @trigger_error('phrase_hints is deprecated.', E_USER_DEPRECATED); + return $this->phrase_hints; + } + + /** + * A list of strings containing words and phrases that the speech + * recognizer should recognize with higher likelihood. + * See [the Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + * for more details. + * This field is deprecated. Please use [speech_contexts]() instead. If you + * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will + * treat the [phrase_hints]() as a single additional [SpeechContext](). + * + * Generated from protobuf field repeated string phrase_hints = 4 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setPhraseHints($var) + { + @trigger_error('phrase_hints is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->phrase_hints = $arr; + + return $this; + } + + /** + * Context information to assist speech recognition. + * See [the Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + * for more details. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpeechContexts() + { + return $this->speech_contexts; + } + + /** + * Context information to assist speech recognition. + * See [the Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + * for more details. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11; + * @param array<\Google\Cloud\Dialogflow\V2\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpeechContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SpeechContext::class); + $this->speech_contexts = $arr; + + return $this; + } + + /** + * Which Speech model to select for the given request. Select the + * model best suited to your domain to get best results. If a model is not + * explicitly specified, then we auto-select a model based on the parameters + * in the InputAudioConfig. + * If enhanced speech model is enabled for the agent and an enhanced + * version of the specified model for the language does not exist, then the + * speech is recognized using the standard version of the specified model. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + * for more details. + * + * Generated from protobuf field string model = 7; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Which Speech model to select for the given request. Select the + * model best suited to your domain to get best results. If a model is not + * explicitly specified, then we auto-select a model based on the parameters + * in the InputAudioConfig. + * If enhanced speech model is enabled for the agent and an enhanced + * version of the specified model for the language does not exist, then the + * speech is recognized using the standard version of the specified model. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + * for more details. + * + * Generated from protobuf field string model = 7; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * Which variant of the [Speech + * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10; + * @return int + */ + public function getModelVariant() + { + return $this->model_variant; + } + + /** + * Which variant of the [Speech + * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10; + * @param int $var + * @return $this + */ + public function setModelVariant($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SpeechModelVariant::class); + $this->model_variant = $var; + + return $this; + } + + /** + * If `false` (default), recognition does not cease until the + * client closes the stream. + * If `true`, the recognizer will detect a single spoken utterance in input + * audio. Recognition ceases when it detects the audio's voice has + * stopped or paused. In this case, once a detected intent is received, the + * client should close the stream and start a new request with a new stream as + * needed. + * Note: This setting is relevant only for streaming methods. + * Note: When specified, InputAudioConfig.single_utterance takes precedence + * over StreamingDetectIntentRequest.single_utterance. + * + * Generated from protobuf field bool single_utterance = 8; + * @return bool + */ + public function getSingleUtterance() + { + return $this->single_utterance; + } + + /** + * If `false` (default), recognition does not cease until the + * client closes the stream. + * If `true`, the recognizer will detect a single spoken utterance in input + * audio. Recognition ceases when it detects the audio's voice has + * stopped or paused. In this case, once a detected intent is received, the + * client should close the stream and start a new request with a new stream as + * needed. + * Note: This setting is relevant only for streaming methods. + * Note: When specified, InputAudioConfig.single_utterance takes precedence + * over StreamingDetectIntentRequest.single_utterance. + * + * Generated from protobuf field bool single_utterance = 8; + * @param bool $var + * @return $this + */ + public function setSingleUtterance($var) + { + GPBUtil::checkBool($var); + $this->single_utterance = $var; + + return $this; + } + + /** + * Only used in + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. + * If `false` and recognition doesn't return any result, trigger + * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. + * + * Generated from protobuf field bool disable_no_speech_recognized_event = 14; + * @return bool + */ + public function getDisableNoSpeechRecognizedEvent() + { + return $this->disable_no_speech_recognized_event; + } + + /** + * Only used in + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. + * If `false` and recognition doesn't return any result, trigger + * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. + * + * Generated from protobuf field bool disable_no_speech_recognized_event = 14; + * @param bool $var + * @return $this + */ + public function setDisableNoSpeechRecognizedEvent($var) + { + GPBUtil::checkBool($var); + $this->disable_no_speech_recognized_event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputConfig.php new file mode 100644 index 000000000000..eb1a43005e84 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputConfig.php @@ -0,0 +1,82 @@ +google.cloud.dialogflow.v2.InputConfig + */ +class InputConfig extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\GcsSources $gcs_source + * The Cloud Storage URI has the form gs:////agent*.json. Wildcards are allowed and will be expanded into all + * matched JSON files, which will be read as one conversation per file. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage URI has the form gs:////agent*.json. Wildcards are allowed and will be expanded into all + * matched JSON files, which will be read as one conversation per file. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 1; + * @return \Google\Cloud\Dialogflow\V2\GcsSources|null + */ + public function getGcsSource() + { + return $this->readOneof(1); + } + + public function hasGcsSource() + { + return $this->hasOneof(1); + } + + /** + * The Cloud Storage URI has the form gs:////agent*.json. Wildcards are allowed and will be expanded into all + * matched JSON files, which will be read as one conversation per file. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 1; + * @param \Google\Cloud\Dialogflow\V2\GcsSources $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsSources::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputDataset.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputDataset.php new file mode 100644 index 000000000000..28917cda63a8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputDataset.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.v2.InputDataset + */ +class InputDataset extends \Google\Protobuf\Internal\Message +{ + /** + * Required. ConversationDataset resource name. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $dataset = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset + * Required. ConversationDataset resource name. Format: + * `projects//locations//conversationDatasets/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. ConversationDataset resource name. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * Required. ConversationDataset resource name. Format: + * `projects//locations//conversationDatasets/` + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputTextConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputTextConfig.php new file mode 100644 index 000000000000..13adbca24087 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputTextConfig.php @@ -0,0 +1,75 @@ +google.cloud.dialogflow.v2.InputTextConfig + */ +class InputTextConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The language of this conversational query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * Required. The language of this conversational query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. The language of this conversational query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Required. The language of this conversational query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent.php new file mode 100644 index 000000000000..2fdd45834dc7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent.php @@ -0,0 +1,904 @@ +google.cloud.dialogflow.v2.Intent + */ +class Intent extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique identifier of this intent. + * Required for + * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and + * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] + * methods. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Required. The name of this intent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Indicates whether webhooks are enabled for the intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $webhook_state = 0; + /** + * Optional. The priority of this intent. Higher numbers represent higher + * priorities. + * - If the supplied value is unspecified or 0, the service + * translates the value to 500,000, which corresponds to the + * `Normal` priority in the console. + * - If the supplied value is negative, the intent is ignored + * in runtime detect intent requests. + * + * Generated from protobuf field int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $priority = 0; + /** + * Optional. Indicates whether this is a fallback intent. + * + * Generated from protobuf field bool is_fallback = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_fallback = false; + /** + * Optional. Indicates whether Machine Learning is disabled for the intent. + * Note: If `ml_disabled` setting is set to true, then this intent is not + * taken into account during inference in `ML ONLY` match mode. Also, + * auto-markup in the UI is turned off. + * + * Generated from protobuf field bool ml_disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ml_disabled = false; + /** + * Optional. Indicates that a live agent should be brought in to handle the + * interaction with the user. In most cases, when you set this flag to true, + * you would also want to set end_interaction to true as well. Default is + * false. + * + * Generated from protobuf field bool live_agent_handoff = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $live_agent_handoff = false; + /** + * Optional. Indicates that this intent ends an interaction. Some integrations + * (e.g., Actions on Google or Dialogflow phone gateway) use this information + * to close interaction with an end user. Default is false. + * + * Generated from protobuf field bool end_interaction = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $end_interaction = false; + /** + * Optional. The list of context names required for this intent to be + * triggered. + * Format: `projects//agent/sessions/-/contexts/`. + * + * Generated from protobuf field repeated string input_context_names = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $input_context_names; + /** + * Optional. The collection of event names that trigger the intent. + * If the collection of input contexts is not empty, all of the contexts must + * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. + * + * Generated from protobuf field repeated string events = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $events; + /** + * Optional. The collection of examples that the agent is + * trained on. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $training_phrases; + /** + * Optional. The name of the action associated with the intent. + * Note: The action name must not contain whitespaces. + * + * Generated from protobuf field string action = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $action = ''; + /** + * Optional. The collection of contexts that are activated when the intent + * is matched. Context messages in this collection should not set the + * parameters field. Setting the `lifespan_count` to 0 will reset the context + * when the intent is matched. + * Format: `projects//agent/sessions/-/contexts/`. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $output_contexts; + /** + * Optional. Indicates whether to delete all contexts in the current + * session when this intent is matched. + * + * Generated from protobuf field bool reset_contexts = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reset_contexts = false; + /** + * Optional. The collection of parameters associated with the intent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $parameters; + /** + * Optional. The collection of rich messages corresponding to the + * `Response` field in the Dialogflow console. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $messages; + /** + * Optional. The list of platforms for which the first responses will be + * copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $default_response_platforms; + /** + * Output only. + * Read-only. The unique identifier of the root intent in the chain of + * followup intents. It identifies the correct followup intents chain for + * this intent. We populate this field only in the output. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string root_followup_intent_name = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $root_followup_intent_name = ''; + /** + * Read-only after creation. The unique identifier of the parent intent in the + * chain of followup intents. You can set this field when creating an intent, + * for example with + * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], + * in order to make this intent a followup intent. + * It identifies the parent followup intent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string parent_followup_intent_name = 17; + */ + protected $parent_followup_intent_name = ''; + /** + * Output only. Read-only. Information about all followup intents that have + * this intent as a direct or indirect parent. We populate this field only in + * the output. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $followup_intent_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. The unique identifier of this intent. + * Required for + * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and + * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] + * methods. + * Format: `projects//agent/intents/`. + * @type string $display_name + * Required. The name of this intent. + * @type int $webhook_state + * Optional. Indicates whether webhooks are enabled for the intent. + * @type int $priority + * Optional. The priority of this intent. Higher numbers represent higher + * priorities. + * - If the supplied value is unspecified or 0, the service + * translates the value to 500,000, which corresponds to the + * `Normal` priority in the console. + * - If the supplied value is negative, the intent is ignored + * in runtime detect intent requests. + * @type bool $is_fallback + * Optional. Indicates whether this is a fallback intent. + * @type bool $ml_disabled + * Optional. Indicates whether Machine Learning is disabled for the intent. + * Note: If `ml_disabled` setting is set to true, then this intent is not + * taken into account during inference in `ML ONLY` match mode. Also, + * auto-markup in the UI is turned off. + * @type bool $live_agent_handoff + * Optional. Indicates that a live agent should be brought in to handle the + * interaction with the user. In most cases, when you set this flag to true, + * you would also want to set end_interaction to true as well. Default is + * false. + * @type bool $end_interaction + * Optional. Indicates that this intent ends an interaction. Some integrations + * (e.g., Actions on Google or Dialogflow phone gateway) use this information + * to close interaction with an end user. Default is false. + * @type array|\Google\Protobuf\Internal\RepeatedField $input_context_names + * Optional. The list of context names required for this intent to be + * triggered. + * Format: `projects//agent/sessions/-/contexts/`. + * @type array|\Google\Protobuf\Internal\RepeatedField $events + * Optional. The collection of event names that trigger the intent. + * If the collection of input contexts is not empty, all of the contexts must + * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase>|\Google\Protobuf\Internal\RepeatedField $training_phrases + * Optional. The collection of examples that the agent is + * trained on. + * @type string $action + * Optional. The name of the action associated with the intent. + * Note: The action name must not contain whitespaces. + * @type array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $output_contexts + * Optional. The collection of contexts that are activated when the intent + * is matched. Context messages in this collection should not set the + * parameters field. Setting the `lifespan_count` to 0 will reset the context + * when the intent is matched. + * Format: `projects//agent/sessions/-/contexts/`. + * @type bool $reset_contexts + * Optional. Indicates whether to delete all contexts in the current + * session when this intent is matched. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Parameter>|\Google\Protobuf\Internal\RepeatedField $parameters + * Optional. The collection of parameters associated with the intent. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $messages + * Optional. The collection of rich messages corresponding to the + * `Response` field in the Dialogflow console. + * @type array|\Google\Protobuf\Internal\RepeatedField $default_response_platforms + * Optional. The list of platforms for which the first responses will be + * copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + * @type string $root_followup_intent_name + * Output only. + * Read-only. The unique identifier of the root intent in the chain of + * followup intents. It identifies the correct followup intents chain for + * this intent. We populate this field only in the output. + * Format: `projects//agent/intents/`. + * @type string $parent_followup_intent_name + * Read-only after creation. The unique identifier of the parent intent in the + * chain of followup intents. You can set this field when creating an intent, + * for example with + * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], + * in order to make this intent a followup intent. + * It identifies the parent followup intent. + * Format: `projects//agent/intents/`. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\FollowupIntentInfo>|\Google\Protobuf\Internal\RepeatedField $followup_intent_info + * Output only. Read-only. Information about all followup intents that have + * this intent as a direct or indirect parent. We populate this field only in + * the output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique identifier of this intent. + * Required for + * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and + * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] + * methods. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. The unique identifier of this intent. + * Required for + * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and + * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] + * methods. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The name of this intent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The name of this intent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Indicates whether webhooks are enabled for the intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getWebhookState() + { + return $this->webhook_state; + } + + /** + * Optional. Indicates whether webhooks are enabled for the intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setWebhookState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\WebhookState::class); + $this->webhook_state = $var; + + return $this; + } + + /** + * Optional. The priority of this intent. Higher numbers represent higher + * priorities. + * - If the supplied value is unspecified or 0, the service + * translates the value to 500,000, which corresponds to the + * `Normal` priority in the console. + * - If the supplied value is negative, the intent is ignored + * in runtime detect intent requests. + * + * Generated from protobuf field int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Optional. The priority of this intent. Higher numbers represent higher + * priorities. + * - If the supplied value is unspecified or 0, the service + * translates the value to 500,000, which corresponds to the + * `Normal` priority in the console. + * - If the supplied value is negative, the intent is ignored + * in runtime detect intent requests. + * + * Generated from protobuf field int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + + /** + * Optional. Indicates whether this is a fallback intent. + * + * Generated from protobuf field bool is_fallback = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsFallback() + { + return $this->is_fallback; + } + + /** + * Optional. Indicates whether this is a fallback intent. + * + * Generated from protobuf field bool is_fallback = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsFallback($var) + { + GPBUtil::checkBool($var); + $this->is_fallback = $var; + + return $this; + } + + /** + * Optional. Indicates whether Machine Learning is disabled for the intent. + * Note: If `ml_disabled` setting is set to true, then this intent is not + * taken into account during inference in `ML ONLY` match mode. Also, + * auto-markup in the UI is turned off. + * + * Generated from protobuf field bool ml_disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getMlDisabled() + { + return $this->ml_disabled; + } + + /** + * Optional. Indicates whether Machine Learning is disabled for the intent. + * Note: If `ml_disabled` setting is set to true, then this intent is not + * taken into account during inference in `ML ONLY` match mode. Also, + * auto-markup in the UI is turned off. + * + * Generated from protobuf field bool ml_disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setMlDisabled($var) + { + GPBUtil::checkBool($var); + $this->ml_disabled = $var; + + return $this; + } + + /** + * Optional. Indicates that a live agent should be brought in to handle the + * interaction with the user. In most cases, when you set this flag to true, + * you would also want to set end_interaction to true as well. Default is + * false. + * + * Generated from protobuf field bool live_agent_handoff = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getLiveAgentHandoff() + { + return $this->live_agent_handoff; + } + + /** + * Optional. Indicates that a live agent should be brought in to handle the + * interaction with the user. In most cases, when you set this flag to true, + * you would also want to set end_interaction to true as well. Default is + * false. + * + * Generated from protobuf field bool live_agent_handoff = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setLiveAgentHandoff($var) + { + GPBUtil::checkBool($var); + $this->live_agent_handoff = $var; + + return $this; + } + + /** + * Optional. Indicates that this intent ends an interaction. Some integrations + * (e.g., Actions on Google or Dialogflow phone gateway) use this information + * to close interaction with an end user. Default is false. + * + * Generated from protobuf field bool end_interaction = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEndInteraction() + { + return $this->end_interaction; + } + + /** + * Optional. Indicates that this intent ends an interaction. Some integrations + * (e.g., Actions on Google or Dialogflow phone gateway) use this information + * to close interaction with an end user. Default is false. + * + * Generated from protobuf field bool end_interaction = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEndInteraction($var) + { + GPBUtil::checkBool($var); + $this->end_interaction = $var; + + return $this; + } + + /** + * Optional. The list of context names required for this intent to be + * triggered. + * Format: `projects//agent/sessions/-/contexts/`. + * + * Generated from protobuf field repeated string input_context_names = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputContextNames() + { + return $this->input_context_names; + } + + /** + * Optional. The list of context names required for this intent to be + * triggered. + * Format: `projects//agent/sessions/-/contexts/`. + * + * Generated from protobuf field repeated string input_context_names = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputContextNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->input_context_names = $arr; + + return $this; + } + + /** + * Optional. The collection of event names that trigger the intent. + * If the collection of input contexts is not empty, all of the contexts must + * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. + * + * Generated from protobuf field repeated string events = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * Optional. The collection of event names that trigger the intent. + * If the collection of input contexts is not empty, all of the contexts must + * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. + * + * Generated from protobuf field repeated string events = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->events = $arr; + + return $this; + } + + /** + * Optional. The collection of examples that the agent is + * trained on. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrainingPhrases() + { + return $this->training_phrases; + } + + /** + * Optional. The collection of examples that the agent is + * trained on. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrainingPhrases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase::class); + $this->training_phrases = $arr; + + return $this; + } + + /** + * Optional. The name of the action associated with the intent. + * Note: The action name must not contain whitespaces. + * + * Generated from protobuf field string action = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Optional. The name of the action associated with the intent. + * Note: The action name must not contain whitespaces. + * + * Generated from protobuf field string action = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + + /** + * Optional. The collection of contexts that are activated when the intent + * is matched. Context messages in this collection should not set the + * parameters field. Setting the `lifespan_count` to 0 will reset the context + * when the intent is matched. + * Format: `projects//agent/sessions/-/contexts/`. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOutputContexts() + { + return $this->output_contexts; + } + + /** + * Optional. The collection of contexts that are activated when the intent + * is matched. Context messages in this collection should not set the + * parameters field. Setting the `lifespan_count` to 0 will reset the context + * when the intent is matched. + * Format: `projects//agent/sessions/-/contexts/`. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOutputContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); + $this->output_contexts = $arr; + + return $this; + } + + /** + * Optional. Indicates whether to delete all contexts in the current + * session when this intent is matched. + * + * Generated from protobuf field bool reset_contexts = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getResetContexts() + { + return $this->reset_contexts; + } + + /** + * Optional. Indicates whether to delete all contexts in the current + * session when this intent is matched. + * + * Generated from protobuf field bool reset_contexts = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setResetContexts($var) + { + GPBUtil::checkBool($var); + $this->reset_contexts = $var; + + return $this; + } + + /** + * Optional. The collection of parameters associated with the intent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Optional. The collection of parameters associated with the intent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Parameter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Parameter::class); + $this->parameters = $arr; + + return $this; + } + + /** + * Optional. The collection of rich messages corresponding to the + * `Response` field in the Dialogflow console. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Optional. The collection of rich messages corresponding to the + * `Response` field in the Dialogflow console. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message::class); + $this->messages = $arr; + + return $this; + } + + /** + * Optional. The list of platforms for which the first responses will be + * copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDefaultResponsePlatforms() + { + return $this->default_response_platforms; + } + + /** + * Optional. The list of platforms for which the first responses will be + * copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDefaultResponsePlatforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\Intent\Message\Platform::class); + $this->default_response_platforms = $arr; + + return $this; + } + + /** + * Output only. + * Read-only. The unique identifier of the root intent in the chain of + * followup intents. It identifies the correct followup intents chain for + * this intent. We populate this field only in the output. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string root_followup_intent_name = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRootFollowupIntentName() + { + return $this->root_followup_intent_name; + } + + /** + * Output only. + * Read-only. The unique identifier of the root intent in the chain of + * followup intents. It identifies the correct followup intents chain for + * this intent. We populate this field only in the output. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string root_followup_intent_name = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRootFollowupIntentName($var) + { + GPBUtil::checkString($var, True); + $this->root_followup_intent_name = $var; + + return $this; + } + + /** + * Read-only after creation. The unique identifier of the parent intent in the + * chain of followup intents. You can set this field when creating an intent, + * for example with + * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], + * in order to make this intent a followup intent. + * It identifies the parent followup intent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string parent_followup_intent_name = 17; + * @return string + */ + public function getParentFollowupIntentName() + { + return $this->parent_followup_intent_name; + } + + /** + * Read-only after creation. The unique identifier of the parent intent in the + * chain of followup intents. You can set this field when creating an intent, + * for example with + * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], + * in order to make this intent a followup intent. + * It identifies the parent followup intent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string parent_followup_intent_name = 17; + * @param string $var + * @return $this + */ + public function setParentFollowupIntentName($var) + { + GPBUtil::checkString($var, True); + $this->parent_followup_intent_name = $var; + + return $this; + } + + /** + * Output only. Read-only. Information about all followup intents that have + * this intent as a direct or indirect parent. We populate this field only in + * the output. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFollowupIntentInfo() + { + return $this->followup_intent_info; + } + + /** + * Output only. Read-only. Information about all followup intents that have + * this intent as a direct or indirect parent. We populate this field only in + * the output. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\FollowupIntentInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFollowupIntentInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\FollowupIntentInfo::class); + $this->followup_intent_info = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/FollowupIntentInfo.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/FollowupIntentInfo.php new file mode 100644 index 000000000000..b7cf0d145f19 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/FollowupIntentInfo.php @@ -0,0 +1,112 @@ +google.cloud.dialogflow.v2.Intent.FollowupIntentInfo + */ +class FollowupIntentInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the followup intent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string followup_intent_name = 1; + */ + protected $followup_intent_name = ''; + /** + * The unique identifier of the followup intent's parent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string parent_followup_intent_name = 2; + */ + protected $parent_followup_intent_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $followup_intent_name + * The unique identifier of the followup intent. + * Format: `projects//agent/intents/`. + * @type string $parent_followup_intent_name + * The unique identifier of the followup intent's parent. + * Format: `projects//agent/intents/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the followup intent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string followup_intent_name = 1; + * @return string + */ + public function getFollowupIntentName() + { + return $this->followup_intent_name; + } + + /** + * The unique identifier of the followup intent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string followup_intent_name = 1; + * @param string $var + * @return $this + */ + public function setFollowupIntentName($var) + { + GPBUtil::checkString($var, True); + $this->followup_intent_name = $var; + + return $this; + } + + /** + * The unique identifier of the followup intent's parent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string parent_followup_intent_name = 2; + * @return string + */ + public function getParentFollowupIntentName() + { + return $this->parent_followup_intent_name; + } + + /** + * The unique identifier of the followup intent's parent. + * Format: `projects//agent/intents/`. + * + * Generated from protobuf field string parent_followup_intent_name = 2; + * @param string $var + * @return $this + */ + public function setParentFollowupIntentName($var) + { + GPBUtil::checkString($var, True); + $this->parent_followup_intent_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FollowupIntentInfo::class, \Google\Cloud\Dialogflow\V2\Intent_FollowupIntentInfo::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message.php new file mode 100644 index 000000000000..3c509bed6783 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message.php @@ -0,0 +1,545 @@ +google.cloud.dialogflow.v2.Intent.Message + */ +class Message extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The platform that this message is intended for. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $platform = 0; + protected $message; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Text $text + * The text response. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image + * The image response. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\QuickReplies $quick_replies + * The quick replies response. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Card $card + * The card response. + * @type \Google\Protobuf\Struct $payload + * A custom platform-specific response. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponses $simple_responses + * The voice and text-only responses for Actions on Google. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard $basic_card + * The basic card response for Actions on Google. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestions $suggestions + * The suggestion chips for Actions on Google. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\LinkOutSuggestion $link_out_suggestion + * The link out suggestion chip for Actions on Google. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect $list_select + * The list card response for Actions on Google. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect $carousel_select + * The carousel card response for Actions on Google. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard $browse_carousel_card + * Browse carousel card for Actions on Google. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\TableCard $table_card + * Table card for Actions on Google. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent $media_content + * The media content card for Actions on Google. + * @type int $platform + * Optional. The platform that this message is intended for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * The text response. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Text text = 1; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Text|null + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * The text response. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Text text = 1; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Text $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Text::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The image response. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 2; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null + */ + public function getImage() + { + return $this->readOneof(2); + } + + public function hasImage() + { + return $this->hasOneof(2); + } + + /** + * The image response. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 2; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The quick replies response. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\QuickReplies|null + */ + public function getQuickReplies() + { + return $this->readOneof(3); + } + + public function hasQuickReplies() + { + return $this->hasOneof(3); + } + + /** + * The quick replies response. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\QuickReplies $var + * @return $this + */ + public function setQuickReplies($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\QuickReplies::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The card response. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Card card = 4; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Card|null + */ + public function getCard() + { + return $this->readOneof(4); + } + + public function hasCard() + { + return $this->hasOneof(4); + } + + /** + * The card response. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Card card = 4; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Card $var + * @return $this + */ + public function setCard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Card::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A custom platform-specific response. + * + * Generated from protobuf field .google.protobuf.Struct payload = 5; + * @return \Google\Protobuf\Struct|null + */ + public function getPayload() + { + return $this->readOneof(5); + } + + public function hasPayload() + { + return $this->hasOneof(5); + } + + /** + * A custom platform-specific response. + * + * Generated from protobuf field .google.protobuf.Struct payload = 5; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The voice and text-only responses for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponses|null + */ + public function getSimpleResponses() + { + return $this->readOneof(7); + } + + public function hasSimpleResponses() + { + return $this->hasOneof(7); + } + + /** + * The voice and text-only responses for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponses $var + * @return $this + */ + public function setSimpleResponses($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponses::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The basic card response for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard|null + */ + public function getBasicCard() + { + return $this->readOneof(8); + } + + public function hasBasicCard() + { + return $this->hasOneof(8); + } + + /** + * The basic card response for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard $var + * @return $this + */ + public function setBasicCard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * The suggestion chips for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestions|null + */ + public function getSuggestions() + { + return $this->readOneof(9); + } + + public function hasSuggestions() + { + return $this->hasOneof(9); + } + + /** + * The suggestion chips for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestions $var + * @return $this + */ + public function setSuggestions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestions::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * The link out suggestion chip for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\LinkOutSuggestion|null + */ + public function getLinkOutSuggestion() + { + return $this->readOneof(10); + } + + public function hasLinkOutSuggestion() + { + return $this->hasOneof(10); + } + + /** + * The link out suggestion chip for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\LinkOutSuggestion $var + * @return $this + */ + public function setLinkOutSuggestion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\LinkOutSuggestion::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * The list card response for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect|null + */ + public function getListSelect() + { + return $this->readOneof(11); + } + + public function hasListSelect() + { + return $this->hasOneof(11); + } + + /** + * The list card response for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect $var + * @return $this + */ + public function setListSelect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * The carousel card response for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect|null + */ + public function getCarouselSelect() + { + return $this->readOneof(12); + } + + public function hasCarouselSelect() + { + return $this->hasOneof(12); + } + + /** + * The carousel card response for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect $var + * @return $this + */ + public function setCarouselSelect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Browse carousel card for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard|null + */ + public function getBrowseCarouselCard() + { + return $this->readOneof(22); + } + + public function hasBrowseCarouselCard() + { + return $this->hasOneof(22); + } + + /** + * Browse carousel card for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard $var + * @return $this + */ + public function setBrowseCarouselCard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Table card for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\TableCard|null + */ + public function getTableCard() + { + return $this->readOneof(23); + } + + public function hasTableCard() + { + return $this->hasOneof(23); + } + + /** + * Table card for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\TableCard $var + * @return $this + */ + public function setTableCard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\TableCard::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * The media content card for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent|null + */ + public function getMediaContent() + { + return $this->readOneof(24); + } + + public function hasMediaContent() + { + return $this->hasOneof(24); + } + + /** + * The media content card for Actions on Google. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent $var + * @return $this + */ + public function setMediaContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent::class); + $this->writeOneof(24, $var); + + return $this; + } + + /** + * Optional. The platform that this message is intended for. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPlatform() + { + return $this->platform; + } + + /** + * Optional. The platform that this message is intended for. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPlatform($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Platform::class); + $this->platform = $var; + + return $this; + } + + /** + * @return string + */ + public function getMessage() + { + return $this->whichOneof("message"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Message::class, \Google\Cloud\Dialogflow\V2\Intent_Message::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard.php new file mode 100644 index 000000000000..8b505949bd21 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard.php @@ -0,0 +1,216 @@ +google.cloud.dialogflow.v2.Intent.Message.BasicCard + */ +class BasicCard extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The title of the card. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $title = ''; + /** + * Optional. The subtitle of the card. + * + * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subtitle = ''; + /** + * Required, unless image is present. The body text of the card. + * + * Generated from protobuf field string formatted_text = 3; + */ + protected $formatted_text = ''; + /** + * Optional. The image for the card. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image = null; + /** + * Optional. The collection of card buttons. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $buttons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Optional. The title of the card. + * @type string $subtitle + * Optional. The subtitle of the card. + * @type string $formatted_text + * Required, unless image is present. The body text of the card. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image + * Optional. The image for the card. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>|\Google\Protobuf\Internal\RepeatedField $buttons + * Optional. The collection of card buttons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The title of the card. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Optional. The title of the card. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Optional. The subtitle of the card. + * + * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * Optional. The subtitle of the card. + * + * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + + /** + * Required, unless image is present. The body text of the card. + * + * Generated from protobuf field string formatted_text = 3; + * @return string + */ + public function getFormattedText() + { + return $this->formatted_text; + } + + /** + * Required, unless image is present. The body text of the card. + * + * Generated from protobuf field string formatted_text = 3; + * @param string $var + * @return $this + */ + public function setFormattedText($var) + { + GPBUtil::checkString($var, True); + $this->formatted_text = $var; + + return $this; + } + + /** + * Optional. The image for the card. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * Optional. The image for the card. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); + $this->image = $var; + + return $this; + } + + /** + * Optional. The collection of card buttons. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getButtons() + { + return $this->buttons; + } + + /** + * Optional. The collection of card buttons. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setButtons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button::class); + $this->buttons = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BasicCard::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button.php new file mode 100644 index 000000000000..373c09363fe4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button.php @@ -0,0 +1,114 @@ +google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button + */ +class Button extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The title of the button. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * Required. Action to take when a user taps on the button. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $open_uri_action = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Required. The title of the button. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button\OpenUriAction $open_uri_action + * Required. Action to take when a user taps on the button. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The title of the button. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. The title of the button. + * + * 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; + } + + /** + * Required. Action to take when a user taps on the button. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button\OpenUriAction|null + */ + public function getOpenUriAction() + { + return $this->open_uri_action; + } + + public function hasOpenUriAction() + { + return isset($this->open_uri_action); + } + + public function clearOpenUriAction() + { + unset($this->open_uri_action); + } + + /** + * Required. Action to take when a user taps on the button. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button\OpenUriAction $var + * @return $this + */ + public function setOpenUriAction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button\OpenUriAction::class); + $this->open_uri_action = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Button::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard_Button::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button/OpenUriAction.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button/OpenUriAction.php new file mode 100644 index 000000000000..e993a7466cb9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button/OpenUriAction.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction + */ +class OpenUriAction extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The HTTP or HTTPS scheme URI. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. The HTTP or HTTPS scheme URI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The HTTP or HTTPS scheme URI. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The HTTP or HTTPS scheme URI. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OpenUriAction::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard_Button_OpenUriAction::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard.php new file mode 100644 index 000000000000..9d3fbc34d12c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard.php @@ -0,0 +1,113 @@ +google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard + */ +class BrowseCarouselCard extends \Google\Protobuf\Internal\Message +{ + /** + * Required. List of items in the Browse Carousel Card. Minimum of two + * items, maximum of ten. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1; + */ + private $items; + /** + * Optional. Settings for displaying the image. Applies to every image in + * [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_display_options = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem>|\Google\Protobuf\Internal\RepeatedField $items + * Required. List of items in the Browse Carousel Card. Minimum of two + * items, maximum of ten. + * @type int $image_display_options + * Optional. Settings for displaying the image. Applies to every image in + * [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. List of items in the Browse Carousel Card. Minimum of two + * items, maximum of ten. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Required. List of items in the Browse Carousel Card. Minimum of two + * items, maximum of ten. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem::class); + $this->items = $arr; + + return $this; + } + + /** + * Optional. Settings for displaying the image. Applies to every image in + * [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getImageDisplayOptions() + { + return $this->image_display_options; + } + + /** + * Optional. Settings for displaying the image. Applies to every image in + * [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setImageDisplayOptions($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\ImageDisplayOptions::class); + $this->image_display_options = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BrowseCarouselCard::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem.php new file mode 100644 index 000000000000..7fba0b85fae1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem.php @@ -0,0 +1,234 @@ +google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem + */ +class BrowseCarouselCardItem extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Action to present to the user. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1; + */ + protected $open_uri_action = null; + /** + * Required. Title of the carousel item. Maximum of two lines of text. + * + * Generated from protobuf field string title = 2; + */ + protected $title = ''; + /** + * Optional. Description of the carousel item. Maximum of four lines of + * text. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Hero image for the carousel item. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image = null; + /** + * Optional. Text that appears at the bottom of the Browse Carousel + * Card. Maximum of one line of text. + * + * Generated from protobuf field string footer = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $footer = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction $open_uri_action + * Required. Action to present to the user. + * @type string $title + * Required. Title of the carousel item. Maximum of two lines of text. + * @type string $description + * Optional. Description of the carousel item. Maximum of four lines of + * text. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image + * Optional. Hero image for the carousel item. + * @type string $footer + * Optional. Text that appears at the bottom of the Browse Carousel + * Card. Maximum of one line of text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Action to present to the user. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction|null + */ + public function getOpenUriAction() + { + return $this->open_uri_action; + } + + public function hasOpenUriAction() + { + return isset($this->open_uri_action); + } + + public function clearOpenUriAction() + { + unset($this->open_uri_action); + } + + /** + * Required. Action to present to the user. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction $var + * @return $this + */ + public function setOpenUriAction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction::class); + $this->open_uri_action = $var; + + return $this; + } + + /** + * Required. Title of the carousel item. Maximum of two lines of text. + * + * Generated from protobuf field string title = 2; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. Title of the carousel item. Maximum of two lines of text. + * + * Generated from protobuf field string title = 2; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Optional. Description of the carousel item. Maximum of four lines of + * text. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the carousel item. Maximum of four lines of + * text. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Hero image for the carousel item. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * Optional. Hero image for the carousel item. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); + $this->image = $var; + + return $this; + } + + /** + * Optional. Text that appears at the bottom of the Browse Carousel + * Card. Maximum of one line of text. + * + * Generated from protobuf field string footer = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFooter() + { + return $this->footer; + } + + /** + * Optional. Text that appears at the bottom of the Browse Carousel + * Card. Maximum of one line of text. + * + * Generated from protobuf field string footer = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFooter($var) + { + GPBUtil::checkString($var, True); + $this->footer = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BrowseCarouselCardItem::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction.php new file mode 100644 index 000000000000..71febe611d3b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction.php @@ -0,0 +1,108 @@ +google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction + */ +class OpenUrlAction extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URL + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * Optional. Specifies the type of viewer that is used when opening + * the URL. Defaults to opening via web browser. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $url_type_hint = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Required. URL + * @type int $url_type_hint + * Optional. Specifies the type of viewer that is used when opening + * the URL. Defaults to opening via web browser. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. URL + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Required. URL + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * Optional. Specifies the type of viewer that is used when opening + * the URL. Defaults to opening via web browser. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getUrlTypeHint() + { + return $this->url_type_hint; + } + + /** + * Optional. Specifies the type of viewer that is used when opening + * the URL. Defaults to opening via web browser. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setUrlTypeHint($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction\UrlTypeHint::class); + $this->url_type_hint = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OpenUrlAction::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction/UrlTypeHint.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction/UrlTypeHint.php new file mode 100644 index 000000000000..cd19ba04e43f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction/UrlTypeHint.php @@ -0,0 +1,65 @@ +google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint + */ +class UrlTypeHint +{ + /** + * Unspecified + * + * Generated from protobuf enum URL_TYPE_HINT_UNSPECIFIED = 0; + */ + const URL_TYPE_HINT_UNSPECIFIED = 0; + /** + * Url would be an amp action + * + * Generated from protobuf enum AMP_ACTION = 1; + */ + const AMP_ACTION = 1; + /** + * URL that points directly to AMP content, or to a canonical URL + * which refers to AMP content via . + * + * Generated from protobuf enum AMP_CONTENT = 2; + */ + const AMP_CONTENT = 2; + + private static $valueToName = [ + self::URL_TYPE_HINT_UNSPECIFIED => 'URL_TYPE_HINT_UNSPECIFIED', + self::AMP_ACTION => 'AMP_ACTION', + self::AMP_CONTENT => 'AMP_CONTENT', + ]; + + 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(UrlTypeHint::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction_UrlTypeHint::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/ImageDisplayOptions.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/ImageDisplayOptions.php new file mode 100644 index 000000000000..3edd8f5a6dae --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/ImageDisplayOptions.php @@ -0,0 +1,89 @@ +google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions + */ +class ImageDisplayOptions +{ + /** + * Fill the gaps between the image and the image container with gray + * bars. + * + * Generated from protobuf enum IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; + */ + const IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; + /** + * Fill the gaps between the image and the image container with gray + * bars. + * + * Generated from protobuf enum GRAY = 1; + */ + const GRAY = 1; + /** + * Fill the gaps between the image and the image container with white + * bars. + * + * Generated from protobuf enum WHITE = 2; + */ + const WHITE = 2; + /** + * Image is scaled such that the image width and height match or exceed + * the container dimensions. This may crop the top and bottom of the + * image if the scaled image height is greater than the container + * height, or crop the left and right of the image if the scaled image + * width is greater than the container width. This is similar to "Zoom + * Mode" on a widescreen TV when playing a 4:3 video. + * + * Generated from protobuf enum CROPPED = 3; + */ + const CROPPED = 3; + /** + * Pad the gaps between image and image frame with a blurred copy of the + * same image. + * + * Generated from protobuf enum BLURRED_BACKGROUND = 4; + */ + const BLURRED_BACKGROUND = 4; + + private static $valueToName = [ + self::IMAGE_DISPLAY_OPTIONS_UNSPECIFIED => 'IMAGE_DISPLAY_OPTIONS_UNSPECIFIED', + self::GRAY => 'GRAY', + self::WHITE => 'WHITE', + self::CROPPED => 'CROPPED', + self::BLURRED_BACKGROUND => 'BLURRED_BACKGROUND', + ]; + + 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(ImageDisplayOptions::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard_ImageDisplayOptions::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card.php new file mode 100644 index 000000000000..398ec1eb5c22 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card.php @@ -0,0 +1,172 @@ +google.cloud.dialogflow.v2.Intent.Message.Card + */ +class Card extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The title of the card. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $title = ''; + /** + * Optional. The subtitle of the card. + * + * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subtitle = ''; + /** + * Optional. The public URI to an image file for the card. + * + * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_uri = ''; + /** + * Optional. The collection of card buttons. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $buttons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Optional. The title of the card. + * @type string $subtitle + * Optional. The subtitle of the card. + * @type string $image_uri + * Optional. The public URI to an image file for the card. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\Card\Button>|\Google\Protobuf\Internal\RepeatedField $buttons + * Optional. The collection of card buttons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The title of the card. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Optional. The title of the card. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Optional. The subtitle of the card. + * + * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * Optional. The subtitle of the card. + * + * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + + /** + * Optional. The public URI to an image file for the card. + * + * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * Optional. The public URI to an image file for the card. + * + * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + + /** + * Optional. The collection of card buttons. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getButtons() + { + return $this->buttons; + } + + /** + * Optional. The collection of card buttons. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\Card\Button>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setButtons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\Card\Button::class); + $this->buttons = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Card::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Card::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card/Button.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card/Button.php new file mode 100644 index 000000000000..615e2785bb4d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card/Button.php @@ -0,0 +1,108 @@ +google.cloud.dialogflow.v2.Intent.Message.Card.Button + */ +class Button extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The text to show on the button. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $text = ''; + /** + * Optional. The text to send back to the Dialogflow API or a URI to + * open. + * + * Generated from protobuf field string postback = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $postback = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Optional. The text to show on the button. + * @type string $postback + * Optional. The text to send back to the Dialogflow API or a URI to + * open. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The text to show on the button. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Optional. The text to show on the button. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Optional. The text to send back to the Dialogflow API or a URI to + * open. + * + * Generated from protobuf field string postback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPostback() + { + return $this->postback; + } + + /** + * Optional. The text to send back to the Dialogflow API or a URI to + * open. + * + * Generated from protobuf field string postback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPostback($var) + { + GPBUtil::checkString($var, True); + $this->postback = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Button::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Card_Button::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect.php new file mode 100644 index 000000000000..3f46c5e840ab --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.v2.Intent.Message.CarouselSelect + */ +class CarouselSelect extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Carousel items. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect\Item>|\Google\Protobuf\Internal\RepeatedField $items + * Required. Carousel items. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Carousel items. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Required. Carousel items. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect\Item>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect\Item::class); + $this->items = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CarouselSelect::class, \Google\Cloud\Dialogflow\V2\Intent_Message_CarouselSelect::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect/Item.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect/Item.php new file mode 100644 index 000000000000..a221fe59073c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect/Item.php @@ -0,0 +1,192 @@ +google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item + */ +class Item extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Additional info about the option item. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $info = null; + /** + * Required. Title of the carousel item. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $title = ''; + /** + * Optional. The body text of the card. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. The image to display. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo $info + * Required. Additional info about the option item. + * @type string $title + * Required. Title of the carousel item. + * @type string $description + * Optional. The body text of the card. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image + * Optional. The image to display. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Additional info about the option item. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo|null + */ + public function getInfo() + { + return $this->info; + } + + public function hasInfo() + { + return isset($this->info); + } + + public function clearInfo() + { + unset($this->info); + } + + /** + * Required. Additional info about the option item. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo::class); + $this->info = $var; + + return $this; + } + + /** + * Required. Title of the carousel item. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. Title of the carousel item. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Optional. The body text of the card. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The body text of the card. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. The image to display. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * Optional. The image to display. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); + $this->image = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Item::class, \Google\Cloud\Dialogflow\V2\Intent_Message_CarouselSelect_Item::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties.php new file mode 100644 index 000000000000..dd3d274a8f2f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties.php @@ -0,0 +1,105 @@ +google.cloud.dialogflow.v2.Intent.Message.ColumnProperties + */ +class ColumnProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Column heading. + * + * Generated from protobuf field string header = 1; + */ + protected $header = ''; + /** + * Optional. Defines text alignment for all cells in this column. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $horizontal_alignment = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $header + * Required. Column heading. + * @type int $horizontal_alignment + * Optional. Defines text alignment for all cells in this column. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Column heading. + * + * Generated from protobuf field string header = 1; + * @return string + */ + public function getHeader() + { + return $this->header; + } + + /** + * Required. Column heading. + * + * Generated from protobuf field string header = 1; + * @param string $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkString($var, True); + $this->header = $var; + + return $this; + } + + /** + * Optional. Defines text alignment for all cells in this column. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getHorizontalAlignment() + { + return $this->horizontal_alignment; + } + + /** + * Optional. Defines text alignment for all cells in this column. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setHorizontalAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\ColumnProperties\HorizontalAlignment::class); + $this->horizontal_alignment = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ColumnProperties::class, \Google\Cloud\Dialogflow\V2\Intent_Message_ColumnProperties::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties/HorizontalAlignment.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties/HorizontalAlignment.php new file mode 100644 index 000000000000..96cec8e9be4d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties/HorizontalAlignment.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment + */ +class HorizontalAlignment +{ + /** + * Text is aligned to the leading edge of the column. + * + * Generated from protobuf enum HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + */ + const HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + /** + * Text is aligned to the leading edge of the column. + * + * Generated from protobuf enum LEADING = 1; + */ + const LEADING = 1; + /** + * Text is centered in the column. + * + * Generated from protobuf enum CENTER = 2; + */ + const CENTER = 2; + /** + * Text is aligned to the trailing edge of the column. + * + * Generated from protobuf enum TRAILING = 3; + */ + const TRAILING = 3; + + private static $valueToName = [ + self::HORIZONTAL_ALIGNMENT_UNSPECIFIED => 'HORIZONTAL_ALIGNMENT_UNSPECIFIED', + self::LEADING => 'LEADING', + self::CENTER => 'CENTER', + self::TRAILING => 'TRAILING', + ]; + + 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(HorizontalAlignment::class, \Google\Cloud\Dialogflow\V2\Intent_Message_ColumnProperties_HorizontalAlignment::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Image.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Image.php new file mode 100644 index 000000000000..1673b84f25f5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Image.php @@ -0,0 +1,108 @@ +google.cloud.dialogflow.v2.Intent.Message.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The public URI to an image file. + * + * Generated from protobuf field string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_uri = ''; + /** + * Optional. A text description of the image to be used for accessibility, + * e.g., screen readers. + * + * Generated from protobuf field string accessibility_text = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $accessibility_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_uri + * Optional. The public URI to an image file. + * @type string $accessibility_text + * Optional. A text description of the image to be used for accessibility, + * e.g., screen readers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The public URI to an image file. + * + * Generated from protobuf field string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * Optional. The public URI to an image file. + * + * Generated from protobuf field string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + + /** + * Optional. A text description of the image to be used for accessibility, + * e.g., screen readers. + * + * Generated from protobuf field string accessibility_text = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAccessibilityText() + { + return $this->accessibility_text; + } + + /** + * Optional. A text description of the image to be used for accessibility, + * e.g., screen readers. + * + * Generated from protobuf field string accessibility_text = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAccessibilityText($var) + { + GPBUtil::checkString($var, True); + $this->accessibility_text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Image::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Image::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/LinkOutSuggestion.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/LinkOutSuggestion.php new file mode 100644 index 000000000000..6f6730cea584 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/LinkOutSuggestion.php @@ -0,0 +1,109 @@ +google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion + */ +class LinkOutSuggestion extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the app or site this chip is linking to. + * + * Generated from protobuf field string destination_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination_name = ''; + /** + * Required. The URI of the app or site to open when the user taps the + * suggestion chip. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $destination_name + * Required. The name of the app or site this chip is linking to. + * @type string $uri + * Required. The URI of the app or site to open when the user taps the + * suggestion chip. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the app or site this chip is linking to. + * + * Generated from protobuf field string destination_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDestinationName() + { + return $this->destination_name; + } + + /** + * Required. The name of the app or site this chip is linking to. + * + * Generated from protobuf field string destination_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDestinationName($var) + { + GPBUtil::checkString($var, True); + $this->destination_name = $var; + + return $this; + } + + /** + * Required. The URI of the app or site to open when the user taps the + * suggestion chip. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The URI of the app or site to open when the user taps the + * suggestion chip. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LinkOutSuggestion::class, \Google\Cloud\Dialogflow\V2\Intent_Message_LinkOutSuggestion::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect.php new file mode 100644 index 000000000000..bbfef362bc0e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.v2.Intent.Message.ListSelect + */ +class ListSelect extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The overall title of the list. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $title = ''; + /** + * Required. List items. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $items; + /** + * Optional. Subtitle of the list. + * + * Generated from protobuf field string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subtitle = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Optional. The overall title of the list. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect\Item>|\Google\Protobuf\Internal\RepeatedField $items + * Required. List items. + * @type string $subtitle + * Optional. Subtitle of the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The overall title of the list. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Optional. The overall title of the list. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Required. List items. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Required. List items. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect\Item>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect\Item::class); + $this->items = $arr; + + return $this; + } + + /** + * Optional. Subtitle of the list. + * + * Generated from protobuf field string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * Optional. Subtitle of the list. + * + * Generated from protobuf field string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ListSelect::class, \Google\Cloud\Dialogflow\V2\Intent_Message_ListSelect::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect/Item.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect/Item.php new file mode 100644 index 000000000000..fcc7d6847ad5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect/Item.php @@ -0,0 +1,192 @@ +google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item + */ +class Item extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Additional information about this option. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $info = null; + /** + * Required. The title of the list item. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $title = ''; + /** + * Optional. The main text describing the item. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. The image to display. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo $info + * Required. Additional information about this option. + * @type string $title + * Required. The title of the list item. + * @type string $description + * Optional. The main text describing the item. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image + * Optional. The image to display. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Additional information about this option. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo|null + */ + public function getInfo() + { + return $this->info; + } + + public function hasInfo() + { + return isset($this->info); + } + + public function clearInfo() + { + unset($this->info); + } + + /** + * Required. Additional information about this option. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo::class); + $this->info = $var; + + return $this; + } + + /** + * Required. The title of the list item. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. The title of the list item. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Optional. The main text describing the item. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The main text describing the item. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. The image to display. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * Optional. The image to display. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); + $this->image = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Item::class, \Google\Cloud\Dialogflow\V2\Intent_Message_ListSelect_Item::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent.php new file mode 100644 index 000000000000..d5430281c7de --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.v2.Intent.Message.MediaContent + */ +class MediaContent extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. What type of media is the content (ie "audio"). + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $media_type = 0; + /** + * Required. List of media objects. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2; + */ + private $media_objects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $media_type + * Optional. What type of media is the content (ie "audio"). + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent\ResponseMediaObject>|\Google\Protobuf\Internal\RepeatedField $media_objects + * Required. List of media objects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. What type of media is the content (ie "audio"). + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMediaType() + { + return $this->media_type; + } + + /** + * Optional. What type of media is the content (ie "audio"). + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMediaType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent\ResponseMediaType::class); + $this->media_type = $var; + + return $this; + } + + /** + * Required. List of media objects. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMediaObjects() + { + return $this->media_objects; + } + + /** + * Required. List of media objects. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent\ResponseMediaObject>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMediaObjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent\ResponseMediaObject::class); + $this->media_objects = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MediaContent::class, \Google\Cloud\Dialogflow\V2\Intent_Message_MediaContent::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaObject.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaObject.php new file mode 100644 index 000000000000..59de16e065f6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaObject.php @@ -0,0 +1,213 @@ +google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject + */ +class ResponseMediaObject extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of media card. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. Description of media card. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. Url where the media is stored. + * + * Generated from protobuf field string content_url = 5; + */ + protected $content_url = ''; + protected $image; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of media card. + * @type string $description + * Optional. Description of media card. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $large_image + * Optional. Image to display above media content. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $icon + * Optional. Icon to display above media content. + * @type string $content_url + * Required. Url where the media is stored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of media card. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of media card. + * + * 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; + } + + /** + * Optional. Description of media card. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of media card. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Image to display above media content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null + */ + public function getLargeImage() + { + return $this->readOneof(3); + } + + public function hasLargeImage() + { + return $this->hasOneof(3); + } + + /** + * Optional. Image to display above media content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var + * @return $this + */ + public function setLargeImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Icon to display above media content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null + */ + public function getIcon() + { + return $this->readOneof(4); + } + + public function hasIcon() + { + return $this->hasOneof(4); + } + + /** + * Optional. Icon to display above media content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. Url where the media is stored. + * + * Generated from protobuf field string content_url = 5; + * @return string + */ + public function getContentUrl() + { + return $this->content_url; + } + + /** + * Required. Url where the media is stored. + * + * Generated from protobuf field string content_url = 5; + * @param string $var + * @return $this + */ + public function setContentUrl($var) + { + GPBUtil::checkString($var, True); + $this->content_url = $var; + + return $this; + } + + /** + * @return string + */ + public function getImage() + { + return $this->whichOneof("image"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResponseMediaObject::class, \Google\Cloud\Dialogflow\V2\Intent_Message_MediaContent_ResponseMediaObject::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaType.php new file mode 100644 index 000000000000..7ff8438d6ca1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaType.php @@ -0,0 +1,57 @@ +google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType + */ +class ResponseMediaType +{ + /** + * Unspecified. + * + * Generated from protobuf enum RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; + */ + const RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; + /** + * Response media type is audio. + * + * Generated from protobuf enum AUDIO = 1; + */ + const AUDIO = 1; + + private static $valueToName = [ + self::RESPONSE_MEDIA_TYPE_UNSPECIFIED => 'RESPONSE_MEDIA_TYPE_UNSPECIFIED', + 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(ResponseMediaType::class, \Google\Cloud\Dialogflow\V2\Intent_Message_MediaContent_ResponseMediaType::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Platform.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Platform.php new file mode 100644 index 000000000000..5da4a44f1522 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Platform.php @@ -0,0 +1,116 @@ +google.cloud.dialogflow.v2.Intent.Message.Platform + */ +class Platform +{ + /** + * Default platform. + * + * Generated from protobuf enum PLATFORM_UNSPECIFIED = 0; + */ + const PLATFORM_UNSPECIFIED = 0; + /** + * Facebook. + * + * Generated from protobuf enum FACEBOOK = 1; + */ + const FACEBOOK = 1; + /** + * Slack. + * + * Generated from protobuf enum SLACK = 2; + */ + const SLACK = 2; + /** + * Telegram. + * + * Generated from protobuf enum TELEGRAM = 3; + */ + const TELEGRAM = 3; + /** + * Kik. + * + * Generated from protobuf enum KIK = 4; + */ + const KIK = 4; + /** + * Skype. + * + * Generated from protobuf enum SKYPE = 5; + */ + const SKYPE = 5; + /** + * Line. + * + * Generated from protobuf enum LINE = 6; + */ + const LINE = 6; + /** + * Viber. + * + * Generated from protobuf enum VIBER = 7; + */ + const VIBER = 7; + /** + * Google Assistant + * See [Dialogflow webhook + * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) + * + * Generated from protobuf enum ACTIONS_ON_GOOGLE = 8; + */ + const ACTIONS_ON_GOOGLE = 8; + /** + * Google Hangouts. + * + * Generated from protobuf enum GOOGLE_HANGOUTS = 11; + */ + const GOOGLE_HANGOUTS = 11; + + private static $valueToName = [ + self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED', + self::FACEBOOK => 'FACEBOOK', + self::SLACK => 'SLACK', + self::TELEGRAM => 'TELEGRAM', + self::KIK => 'KIK', + self::SKYPE => 'SKYPE', + self::LINE => 'LINE', + self::VIBER => 'VIBER', + self::ACTIONS_ON_GOOGLE => 'ACTIONS_ON_GOOGLE', + self::GOOGLE_HANGOUTS => 'GOOGLE_HANGOUTS', + ]; + + 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(Platform::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Platform::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/QuickReplies.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/QuickReplies.php new file mode 100644 index 000000000000..a3d54844bfad --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/QuickReplies.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.v2.Intent.Message.QuickReplies + */ +class QuickReplies extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The title of the collection of quick replies. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $title = ''; + /** + * Optional. The collection of quick replies. + * + * Generated from protobuf field repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $quick_replies; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Optional. The title of the collection of quick replies. + * @type array|\Google\Protobuf\Internal\RepeatedField $quick_replies + * Optional. The collection of quick replies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The title of the collection of quick replies. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Optional. The title of the collection of quick replies. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Optional. The collection of quick replies. + * + * Generated from protobuf field repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQuickReplies() + { + return $this->quick_replies; + } + + /** + * Optional. The collection of quick replies. + * + * Generated from protobuf field repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQuickReplies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->quick_replies = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QuickReplies::class, \Google\Cloud\Dialogflow\V2\Intent_Message_QuickReplies::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SelectItemInfo.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SelectItemInfo.php new file mode 100644 index 000000000000..615e0f22fe57 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SelectItemInfo.php @@ -0,0 +1,113 @@ +google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo + */ +class SelectItemInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A unique key that will be sent back to the agent if this + * response is given. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key = ''; + /** + * Optional. A list of synonyms that can also be used to trigger this + * item in dialog. + * + * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $synonyms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Required. A unique key that will be sent back to the agent if this + * response is given. + * @type array|\Google\Protobuf\Internal\RepeatedField $synonyms + * Optional. A list of synonyms that can also be used to trigger this + * item in dialog. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. A unique key that will be sent back to the agent if this + * response is given. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Required. A unique key that will be sent back to the agent if this + * response is given. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Optional. A list of synonyms that can also be used to trigger this + * item in dialog. + * + * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSynonyms() + { + return $this->synonyms; + } + + /** + * Optional. A list of synonyms that can also be used to trigger this + * item in dialog. + * + * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSynonyms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->synonyms = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SelectItemInfo::class, \Google\Cloud\Dialogflow\V2\Intent_Message_SelectItemInfo::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponse.php new file mode 100644 index 000000000000..e59d4ce2bbe5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponse.php @@ -0,0 +1,150 @@ +google.cloud.dialogflow.v2.Intent.Message.SimpleResponse + */ +class SimpleResponse extends \Google\Protobuf\Internal\Message +{ + /** + * One of text_to_speech or ssml must be provided. The plain text of the + * speech output. Mutually exclusive with ssml. + * + * Generated from protobuf field string text_to_speech = 1; + */ + protected $text_to_speech = ''; + /** + * One of text_to_speech or ssml must be provided. Structured spoken + * response to the user in the SSML format. Mutually exclusive with + * text_to_speech. + * + * Generated from protobuf field string ssml = 2; + */ + protected $ssml = ''; + /** + * Optional. The text to display. + * + * Generated from protobuf field string display_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text_to_speech + * One of text_to_speech or ssml must be provided. The plain text of the + * speech output. Mutually exclusive with ssml. + * @type string $ssml + * One of text_to_speech or ssml must be provided. Structured spoken + * response to the user in the SSML format. Mutually exclusive with + * text_to_speech. + * @type string $display_text + * Optional. The text to display. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * One of text_to_speech or ssml must be provided. The plain text of the + * speech output. Mutually exclusive with ssml. + * + * Generated from protobuf field string text_to_speech = 1; + * @return string + */ + public function getTextToSpeech() + { + return $this->text_to_speech; + } + + /** + * One of text_to_speech or ssml must be provided. The plain text of the + * speech output. Mutually exclusive with ssml. + * + * Generated from protobuf field string text_to_speech = 1; + * @param string $var + * @return $this + */ + public function setTextToSpeech($var) + { + GPBUtil::checkString($var, True); + $this->text_to_speech = $var; + + return $this; + } + + /** + * One of text_to_speech or ssml must be provided. Structured spoken + * response to the user in the SSML format. Mutually exclusive with + * text_to_speech. + * + * Generated from protobuf field string ssml = 2; + * @return string + */ + public function getSsml() + { + return $this->ssml; + } + + /** + * One of text_to_speech or ssml must be provided. Structured spoken + * response to the user in the SSML format. Mutually exclusive with + * text_to_speech. + * + * Generated from protobuf field string ssml = 2; + * @param string $var + * @return $this + */ + public function setSsml($var) + { + GPBUtil::checkString($var, True); + $this->ssml = $var; + + return $this; + } + + /** + * Optional. The text to display. + * + * Generated from protobuf field string display_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayText() + { + return $this->display_text; + } + + /** + * Optional. The text to display. + * + * Generated from protobuf field string display_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayText($var) + { + GPBUtil::checkString($var, True); + $this->display_text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SimpleResponse::class, \Google\Cloud\Dialogflow\V2\Intent_Message_SimpleResponse::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponses.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponses.php new file mode 100644 index 000000000000..a8d1e0095b9f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponses.php @@ -0,0 +1,73 @@ +google.cloud.dialogflow.v2.Intent.Message.SimpleResponses + */ +class SimpleResponses extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The list of simple responses. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $simple_responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponse>|\Google\Protobuf\Internal\RepeatedField $simple_responses + * Required. The list of simple responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The list of simple responses. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSimpleResponses() + { + return $this->simple_responses; + } + + /** + * Required. The list of simple responses. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSimpleResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponse::class); + $this->simple_responses = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SimpleResponses::class, \Google\Cloud\Dialogflow\V2\Intent_Message_SimpleResponses::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestion.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestion.php new file mode 100644 index 000000000000..f5e643dcb598 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestion.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.Intent.Message.Suggestion + */ +class Suggestion extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The text shown the in the suggestion chip. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $title = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Required. The text shown the in the suggestion chip. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The text shown the in the suggestion chip. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. The text shown the in the suggestion chip. + * + * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Suggestion::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Suggestion::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestions.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestions.php new file mode 100644 index 000000000000..49ac588ee861 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestions.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.v2.Intent.Message.Suggestions + */ +class Suggestions extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The list of suggested replies. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $suggestions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\Suggestion>|\Google\Protobuf\Internal\RepeatedField $suggestions + * Required. The list of suggested replies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The list of suggested replies. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSuggestions() + { + return $this->suggestions; + } + + /** + * Required. The list of suggested replies. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\Suggestion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSuggestions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestion::class); + $this->suggestions = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Suggestions::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Suggestions::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCard.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCard.php new file mode 100644 index 000000000000..daffa040dbc6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCard.php @@ -0,0 +1,250 @@ +google.cloud.dialogflow.v2.Intent.Message.TableCard + */ +class TableCard extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Title of the card. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * Optional. Subtitle to the title. + * + * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subtitle = ''; + /** + * Optional. Image which should be displayed on the card. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image = null; + /** + * Optional. Display properties for the columns in this table. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $column_properties; + /** + * Optional. Rows in this table of data. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $rows; + /** + * Optional. List of buttons for the card. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $buttons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Required. Title of the card. + * @type string $subtitle + * Optional. Subtitle to the title. + * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image + * Optional. Image which should be displayed on the card. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\ColumnProperties>|\Google\Protobuf\Internal\RepeatedField $column_properties + * Optional. Display properties for the columns in this table. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\TableCardRow>|\Google\Protobuf\Internal\RepeatedField $rows + * Optional. Rows in this table of data. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>|\Google\Protobuf\Internal\RepeatedField $buttons + * Optional. List of buttons for the card. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Title of the card. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. Title of the card. + * + * 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; + } + + /** + * Optional. Subtitle to the title. + * + * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * Optional. Subtitle to the title. + * + * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + + /** + * Optional. Image which should be displayed on the card. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * Optional. Image which should be displayed on the card. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); + $this->image = $var; + + return $this; + } + + /** + * Optional. Display properties for the columns in this table. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumnProperties() + { + return $this->column_properties; + } + + /** + * Optional. Display properties for the columns in this table. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\ColumnProperties>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumnProperties($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\ColumnProperties::class); + $this->column_properties = $arr; + + return $this; + } + + /** + * Optional. Rows in this table of data. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRows() + { + return $this->rows; + } + + /** + * Optional. Rows in this table of data. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\TableCardRow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\TableCardRow::class); + $this->rows = $arr; + + return $this; + } + + /** + * Optional. List of buttons for the card. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getButtons() + { + return $this->buttons; + } + + /** + * Optional. List of buttons for the card. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setButtons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button::class); + $this->buttons = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TableCard::class, \Google\Cloud\Dialogflow\V2\Intent_Message_TableCard::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardCell.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardCell.php new file mode 100644 index 000000000000..80fa26fc55a0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardCell.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.Intent.Message.TableCardCell + */ +class TableCardCell extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Text in this cell. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Required. Text in this cell. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Text in this cell. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. Text in this cell. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TableCardCell::class, \Google\Cloud\Dialogflow\V2\Intent_Message_TableCardCell::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardRow.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardRow.php new file mode 100644 index 000000000000..faffa5e21573 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardRow.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.v2.Intent.Message.TableCardRow + */ +class TableCardRow extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. List of cells that make up this row. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $cells; + /** + * Optional. Whether to add a visual divider after this row. + * + * Generated from protobuf field bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $divider_after = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\TableCardCell>|\Google\Protobuf\Internal\RepeatedField $cells + * Optional. List of cells that make up this row. + * @type bool $divider_after + * Optional. Whether to add a visual divider after this row. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. List of cells that make up this row. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCells() + { + return $this->cells; + } + + /** + * Optional. List of cells that make up this row. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\TableCardCell>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCells($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\TableCardCell::class); + $this->cells = $arr; + + return $this; + } + + /** + * Optional. Whether to add a visual divider after this row. + * + * Generated from protobuf field bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDividerAfter() + { + return $this->divider_after; + } + + /** + * Optional. Whether to add a visual divider after this row. + * + * Generated from protobuf field bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDividerAfter($var) + { + GPBUtil::checkBool($var); + $this->divider_after = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TableCardRow::class, \Google\Cloud\Dialogflow\V2\Intent_Message_TableCardRow::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Text.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Text.php new file mode 100644 index 000000000000..238bb805c106 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Text.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.v2.Intent.Message.Text + */ +class Text extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The collection of the agent's responses. + * + * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $text; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $text + * Optional. The collection of the agent's responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The collection of the agent's responses. + * + * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getText() + { + return $this->text; + } + + /** + * Optional. The collection of the agent's responses. + * + * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setText($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->text = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Text::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Text::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Parameter.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Parameter.php new file mode 100644 index 000000000000..dd13566fb368 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Parameter.php @@ -0,0 +1,360 @@ +google.cloud.dialogflow.v2.Intent.Parameter + */ +class Parameter extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of this parameter. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The name of the parameter. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Optional. The definition of the parameter value. It can be: + * - a constant string, + * - a parameter value defined as `$parameter_name`, + * - an original parameter value defined as `$parameter_name.original`, + * - a parameter value from some context defined as + * `#context_name.parameter_name`. + * + * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = ''; + /** + * Optional. The default value to use when the `value` yields an empty + * result. + * Default values can be extracted from contexts by using the following + * syntax: `#context_name.parameter_name`. + * + * Generated from protobuf field string default_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_value = ''; + /** + * Optional. The name of the entity type, prefixed with `@`, that + * describes values of the parameter. If the parameter is + * required, this must be provided. + * + * Generated from protobuf field string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $entity_type_display_name = ''; + /** + * Optional. Indicates whether the parameter is required. That is, + * whether the intent cannot be completed without collecting the parameter + * value. + * + * Generated from protobuf field bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mandatory = false; + /** + * Optional. The collection of prompts that the agent can present to the + * user in order to collect a value for the parameter. + * + * Generated from protobuf field repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $prompts; + /** + * Optional. Indicates whether the parameter represents a list of values. + * + * Generated from protobuf field bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_list = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of this parameter. + * @type string $display_name + * Required. The name of the parameter. + * @type string $value + * Optional. The definition of the parameter value. It can be: + * - a constant string, + * - a parameter value defined as `$parameter_name`, + * - an original parameter value defined as `$parameter_name.original`, + * - a parameter value from some context defined as + * `#context_name.parameter_name`. + * @type string $default_value + * Optional. The default value to use when the `value` yields an empty + * result. + * Default values can be extracted from contexts by using the following + * syntax: `#context_name.parameter_name`. + * @type string $entity_type_display_name + * Optional. The name of the entity type, prefixed with `@`, that + * describes values of the parameter. If the parameter is + * required, this must be provided. + * @type bool $mandatory + * Optional. Indicates whether the parameter is required. That is, + * whether the intent cannot be completed without collecting the parameter + * value. + * @type array|\Google\Protobuf\Internal\RepeatedField $prompts + * Optional. The collection of prompts that the agent can present to the + * user in order to collect a value for the parameter. + * @type bool $is_list + * Optional. Indicates whether the parameter represents a list of values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of this parameter. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of this parameter. + * + * 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; + } + + /** + * Required. The name of the parameter. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The name of the parameter. + * + * 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; + } + + /** + * Optional. The definition of the parameter value. It can be: + * - a constant string, + * - a parameter value defined as `$parameter_name`, + * - an original parameter value defined as `$parameter_name.original`, + * - a parameter value from some context defined as + * `#context_name.parameter_name`. + * + * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Optional. The definition of the parameter value. It can be: + * - a constant string, + * - a parameter value defined as `$parameter_name`, + * - an original parameter value defined as `$parameter_name.original`, + * - a parameter value from some context defined as + * `#context_name.parameter_name`. + * + * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Optional. The default value to use when the `value` yields an empty + * result. + * Default values can be extracted from contexts by using the following + * syntax: `#context_name.parameter_name`. + * + * Generated from protobuf field string default_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDefaultValue() + { + return $this->default_value; + } + + /** + * Optional. The default value to use when the `value` yields an empty + * result. + * Default values can be extracted from contexts by using the following + * syntax: `#context_name.parameter_name`. + * + * Generated from protobuf field string default_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDefaultValue($var) + { + GPBUtil::checkString($var, True); + $this->default_value = $var; + + return $this; + } + + /** + * Optional. The name of the entity type, prefixed with `@`, that + * describes values of the parameter. If the parameter is + * required, this must be provided. + * + * Generated from protobuf field string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEntityTypeDisplayName() + { + return $this->entity_type_display_name; + } + + /** + * Optional. The name of the entity type, prefixed with `@`, that + * describes values of the parameter. If the parameter is + * required, this must be provided. + * + * Generated from protobuf field string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEntityTypeDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->entity_type_display_name = $var; + + return $this; + } + + /** + * Optional. Indicates whether the parameter is required. That is, + * whether the intent cannot be completed without collecting the parameter + * value. + * + * Generated from protobuf field bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getMandatory() + { + return $this->mandatory; + } + + /** + * Optional. Indicates whether the parameter is required. That is, + * whether the intent cannot be completed without collecting the parameter + * value. + * + * Generated from protobuf field bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setMandatory($var) + { + GPBUtil::checkBool($var); + $this->mandatory = $var; + + return $this; + } + + /** + * Optional. The collection of prompts that the agent can present to the + * user in order to collect a value for the parameter. + * + * Generated from protobuf field repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrompts() + { + return $this->prompts; + } + + /** + * Optional. The collection of prompts that the agent can present to the + * user in order to collect a value for the parameter. + * + * Generated from protobuf field repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrompts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->prompts = $arr; + + return $this; + } + + /** + * Optional. Indicates whether the parameter represents a list of values. + * + * Generated from protobuf field bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsList() + { + return $this->is_list; + } + + /** + * Optional. Indicates whether the parameter represents a list of values. + * + * Generated from protobuf field bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsList($var) + { + GPBUtil::checkBool($var); + $this->is_list = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Parameter::class, \Google\Cloud\Dialogflow\V2\Intent_Parameter::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase.php new file mode 100644 index 000000000000..bb0045425c23 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase.php @@ -0,0 +1,240 @@ +google.cloud.dialogflow.v2.Intent.TrainingPhrase + */ +class TrainingPhrase extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique identifier of this training phrase. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The type of the training phrase. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. The ordered list of training phrase parts. + * The parts are concatenated in order to form the training phrase. + * Note: The API does not automatically annotate training phrases like the + * Dialogflow Console does. + * Note: Do not forget to include whitespace at part boundaries, + * so the training phrase is well formatted when the parts are concatenated. + * If the training phrase does not need to be annotated with parameters, + * you just need a single part with only the + * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] + * field set. + * If you want to annotate the training phrase, you must create multiple + * parts, where the fields of each part are populated in one of two ways: + * - `Part.text` is set to a part of the phrase that has no parameters. + * - `Part.text` is set to a part of the phrase that you want to annotate, + * and the `entity_type`, `alias`, and `user_defined` fields are all + * set. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $parts; + /** + * Optional. Indicates how many times this example was added to + * the intent. Each time a developer adds an existing sample by editing an + * intent or training, this counter is increased. + * + * Generated from protobuf field int32 times_added_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $times_added_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique identifier of this training phrase. + * @type int $type + * Required. The type of the training phrase. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase\Part>|\Google\Protobuf\Internal\RepeatedField $parts + * Required. The ordered list of training phrase parts. + * The parts are concatenated in order to form the training phrase. + * Note: The API does not automatically annotate training phrases like the + * Dialogflow Console does. + * Note: Do not forget to include whitespace at part boundaries, + * so the training phrase is well formatted when the parts are concatenated. + * If the training phrase does not need to be annotated with parameters, + * you just need a single part with only the + * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] + * field set. + * If you want to annotate the training phrase, you must create multiple + * parts, where the fields of each part are populated in one of two ways: + * - `Part.text` is set to a part of the phrase that has no parameters. + * - `Part.text` is set to a part of the phrase that you want to annotate, + * and the `entity_type`, `alias`, and `user_defined` fields are all + * set. + * @type int $times_added_count + * Optional. Indicates how many times this example was added to + * the intent. Each time a developer adds an existing sample by editing an + * intent or training, this counter is increased. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique identifier of this training phrase. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique identifier of this training phrase. + * + * 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; + } + + /** + * Required. The type of the training phrase. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of the training phrase. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. The ordered list of training phrase parts. + * The parts are concatenated in order to form the training phrase. + * Note: The API does not automatically annotate training phrases like the + * Dialogflow Console does. + * Note: Do not forget to include whitespace at part boundaries, + * so the training phrase is well formatted when the parts are concatenated. + * If the training phrase does not need to be annotated with parameters, + * you just need a single part with only the + * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] + * field set. + * If you want to annotate the training phrase, you must create multiple + * parts, where the fields of each part are populated in one of two ways: + * - `Part.text` is set to a part of the phrase that has no parameters. + * - `Part.text` is set to a part of the phrase that you want to annotate, + * and the `entity_type`, `alias`, and `user_defined` fields are all + * set. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParts() + { + return $this->parts; + } + + /** + * Required. The ordered list of training phrase parts. + * The parts are concatenated in order to form the training phrase. + * Note: The API does not automatically annotate training phrases like the + * Dialogflow Console does. + * Note: Do not forget to include whitespace at part boundaries, + * so the training phrase is well formatted when the parts are concatenated. + * If the training phrase does not need to be annotated with parameters, + * you just need a single part with only the + * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] + * field set. + * If you want to annotate the training phrase, you must create multiple + * parts, where the fields of each part are populated in one of two ways: + * - `Part.text` is set to a part of the phrase that has no parameters. + * - `Part.text` is set to a part of the phrase that you want to annotate, + * and the `entity_type`, `alias`, and `user_defined` fields are all + * set. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase\Part>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase\Part::class); + $this->parts = $arr; + + return $this; + } + + /** + * Optional. Indicates how many times this example was added to + * the intent. Each time a developer adds an existing sample by editing an + * intent or training, this counter is increased. + * + * Generated from protobuf field int32 times_added_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTimesAddedCount() + { + return $this->times_added_count; + } + + /** + * Optional. Indicates how many times this example was added to + * the intent. Each time a developer adds an existing sample by editing an + * intent or training, this counter is increased. + * + * Generated from protobuf field int32 times_added_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTimesAddedCount($var) + { + GPBUtil::checkInt32($var); + $this->times_added_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TrainingPhrase::class, \Google\Cloud\Dialogflow\V2\Intent_TrainingPhrase::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Part.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Part.php new file mode 100644 index 000000000000..4f319d65101f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Part.php @@ -0,0 +1,196 @@ +google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part + */ +class Part extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The text for this part. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * Optional. The entity type name prefixed with `@`. + * This field is required for annotated parts of the training phrase. + * + * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $entity_type = ''; + /** + * Optional. The parameter name for the value extracted from the + * annotated part of the example. + * This field is required for annotated parts of the training phrase. + * + * Generated from protobuf field string alias = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alias = ''; + /** + * Optional. Indicates whether the text was manually annotated. + * This field is set to true when the Dialogflow Console is used to + * manually annotate the part. When creating an annotated part with the + * API, you must set this to true. + * + * Generated from protobuf field bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $user_defined = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Required. The text for this part. + * @type string $entity_type + * Optional. The entity type name prefixed with `@`. + * This field is required for annotated parts of the training phrase. + * @type string $alias + * Optional. The parameter name for the value extracted from the + * annotated part of the example. + * This field is required for annotated parts of the training phrase. + * @type bool $user_defined + * Optional. Indicates whether the text was manually annotated. + * This field is set to true when the Dialogflow Console is used to + * manually annotate the part. When creating an annotated part with the + * API, you must set this to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The text for this part. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. The text for this part. + * + * 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; + } + + /** + * Optional. The entity type name prefixed with `@`. + * This field is required for annotated parts of the training phrase. + * + * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEntityType() + { + return $this->entity_type; + } + + /** + * Optional. The entity type name prefixed with `@`. + * This field is required for annotated parts of the training phrase. + * + * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkString($var, True); + $this->entity_type = $var; + + return $this; + } + + /** + * Optional. The parameter name for the value extracted from the + * annotated part of the example. + * This field is required for annotated parts of the training phrase. + * + * Generated from protobuf field string alias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAlias() + { + return $this->alias; + } + + /** + * Optional. The parameter name for the value extracted from the + * annotated part of the example. + * This field is required for annotated parts of the training phrase. + * + * Generated from protobuf field string alias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAlias($var) + { + GPBUtil::checkString($var, True); + $this->alias = $var; + + return $this; + } + + /** + * Optional. Indicates whether the text was manually annotated. + * This field is set to true when the Dialogflow Console is used to + * manually annotate the part. When creating an annotated part with the + * API, you must set this to true. + * + * Generated from protobuf field bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUserDefined() + { + return $this->user_defined; + } + + /** + * Optional. Indicates whether the text was manually annotated. + * This field is set to true when the Dialogflow Console is used to + * manually annotate the part. When creating an annotated part with the + * API, you must set this to true. + * + * Generated from protobuf field bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUserDefined($var) + { + GPBUtil::checkBool($var); + $this->user_defined = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Part::class, \Google\Cloud\Dialogflow\V2\Intent_TrainingPhrase_Part::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Type.php new file mode 100644 index 000000000000..a0a5ef200c1e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Type.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type + */ +class Type +{ + /** + * Not specified. This value should never be used. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Examples do not contain @-prefixed entity type names, but example parts + * can be annotated with entity types. + * + * Generated from protobuf enum EXAMPLE = 1; + */ + const EXAMPLE = 1; + /** + * Templates are not annotated with entity types, but they can contain + * @-prefixed entity type names as substrings. + * Template mode has been deprecated. Example mode is the only supported + * way to create new training phrases. If you have existing training + * phrases that you've created in template mode, those will continue to + * work. + * + * Generated from protobuf enum TEMPLATE = 2 [deprecated = true]; + */ + const TEMPLATE = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::EXAMPLE => 'EXAMPLE', + self::TEMPLATE => 'TEMPLATE', + ]; + + 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\Dialogflow\V2\Intent_TrainingPhrase_Type::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/WebhookState.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/WebhookState.php new file mode 100644 index 000000000000..7282b5d28d99 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/WebhookState.php @@ -0,0 +1,65 @@ +google.cloud.dialogflow.v2.Intent.WebhookState + */ +class WebhookState +{ + /** + * Webhook is disabled in the agent and in the intent. + * + * Generated from protobuf enum WEBHOOK_STATE_UNSPECIFIED = 0; + */ + const WEBHOOK_STATE_UNSPECIFIED = 0; + /** + * Webhook is enabled in the agent and in the intent. + * + * Generated from protobuf enum WEBHOOK_STATE_ENABLED = 1; + */ + const WEBHOOK_STATE_ENABLED = 1; + /** + * Webhook is enabled in the agent and in the intent. Also, each slot + * filling prompt is forwarded to the webhook. + * + * Generated from protobuf enum WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; + */ + const WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; + + private static $valueToName = [ + self::WEBHOOK_STATE_UNSPECIFIED => 'WEBHOOK_STATE_UNSPECIFIED', + self::WEBHOOK_STATE_ENABLED => 'WEBHOOK_STATE_ENABLED', + self::WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING => 'WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING', + ]; + + 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(WebhookState::class, \Google\Cloud\Dialogflow\V2\Intent_WebhookState::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentBatch.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentBatch.php new file mode 100644 index 000000000000..87fcc6a533c2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentBatch.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.v2.IntentBatch + */ +class IntentBatch extends \Google\Protobuf\Internal\Message +{ + /** + * A collection of intents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; + */ + private $intents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents + * A collection of intents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * A collection of intents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntents() + { + return $this->intents; + } + + /** + * A collection of intents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); + $this->intents = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentView.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentView.php new file mode 100644 index 000000000000..916e50e6b7db --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentView.php @@ -0,0 +1,56 @@ +google.cloud.dialogflow.v2.IntentView + */ +class IntentView +{ + /** + * Training phrases field is not populated in the response. + * + * Generated from protobuf enum INTENT_VIEW_UNSPECIFIED = 0; + */ + const INTENT_VIEW_UNSPECIFIED = 0; + /** + * All fields are populated. + * + * Generated from protobuf enum INTENT_VIEW_FULL = 1; + */ + const INTENT_VIEW_FULL = 1; + + private static $valueToName = [ + self::INTENT_VIEW_UNSPECIFIED => 'INTENT_VIEW_UNSPECIFIED', + self::INTENT_VIEW_FULL => 'INTENT_VIEW_FULL', + ]; + + 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_FollowupIntentInfo.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_FollowupIntentInfo.php new file mode 100644 index 000000000000..083010bb2beb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_FollowupIntentInfo.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Intents/ListIntents', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListIntentsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified intent. + * @param \Google\Cloud\Dialogflow\V2\GetIntentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetIntent(\Google\Cloud\Dialogflow\V2\GetIntentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/GetIntent', + $argument, + ['\Google\Cloud\Dialogflow\V2\Intent', 'decode'], + $metadata, $options); + } + + /** + * Creates an intent in the specified agent. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\CreateIntentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateIntent(\Google\Cloud\Dialogflow\V2\CreateIntentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/CreateIntent', + $argument, + ['\Google\Cloud\Dialogflow\V2\Intent', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified intent. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\UpdateIntentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateIntent(\Google\Cloud\Dialogflow\V2\UpdateIntentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/UpdateIntent', + $argument, + ['\Google\Cloud\Dialogflow\V2\Intent', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified intent and its direct or indirect followup intents. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\DeleteIntentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteIntent(\Google\Cloud\Dialogflow\V2\DeleteIntentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/DeleteIntent', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Updates/Creates multiple intents in the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: + * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse] + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\BatchUpdateIntentsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchUpdateIntents(\Google\Cloud\Dialogflow\V2\BatchUpdateIntentsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/BatchUpdateIntents', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes intents in the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * @param \Google\Cloud\Dialogflow\V2\BatchDeleteIntentsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchDeleteIntents(\Google\Cloud\Dialogflow\V2\BatchDeleteIntentsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/BatchDeleteIntents', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBase.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBase.php new file mode 100644 index 000000000000..d3753cd6ed8c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBase.php @@ -0,0 +1,166 @@ +google.cloud.dialogflow.v2.KnowledgeBase + */ +class KnowledgeBase extends \Google\Protobuf\Internal\Message +{ + /** + * The knowledge base resource name. + * The name must be empty when creating a knowledge base. + * Format: `projects//locations//knowledgeBases/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The display name of the knowledge base. The name must be 1024 + * bytes or less; otherwise, the creation request fails. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Language which represents the KnowledgeBase. When the KnowledgeBase is + * created/updated, expect this to be present for non en-us languages. When + * unspecified, the default language code en-us applies. + * + * Generated from protobuf field string language_code = 4; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The knowledge base resource name. + * The name must be empty when creating a knowledge base. + * Format: `projects//locations//knowledgeBases/`. + * @type string $display_name + * Required. The display name of the knowledge base. The name must be 1024 + * bytes or less; otherwise, the creation request fails. + * @type string $language_code + * Language which represents the KnowledgeBase. When the KnowledgeBase is + * created/updated, expect this to be present for non en-us languages. When + * unspecified, the default language code en-us applies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); + parent::__construct($data); + } + + /** + * The knowledge base resource name. + * The name must be empty when creating a knowledge base. + * Format: `projects//locations//knowledgeBases/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The knowledge base resource name. + * The name must be empty when creating a knowledge base. + * Format: `projects//locations//knowledgeBases/`. + * + * 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; + } + + /** + * Required. The display name of the knowledge base. The name must be 1024 + * bytes or less; otherwise, the creation request fails. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the knowledge base. The name must be 1024 + * bytes or less; otherwise, the creation request fails. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Language which represents the KnowledgeBase. When the KnowledgeBase is + * created/updated, expect this to be present for non en-us languages. When + * unspecified, the default language code en-us applies. + * + * Generated from protobuf field string language_code = 4; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Language which represents the KnowledgeBase. When the KnowledgeBase is + * created/updated, expect this to be present for non en-us languages. When + * unspecified, the default language code en-us applies. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBasesGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBasesGrpcClient.php new file mode 100644 index 000000000000..acd033abdd0f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBasesGrpcClient.php @@ -0,0 +1,111 @@ +_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/ListKnowledgeBases', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListKnowledgeBasesResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified knowledge base. + * @param \Google\Cloud\Dialogflow\V2\GetKnowledgeBaseRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetKnowledgeBase(\Google\Cloud\Dialogflow\V2\GetKnowledgeBaseRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/GetKnowledgeBase', + $argument, + ['\Google\Cloud\Dialogflow\V2\KnowledgeBase', 'decode'], + $metadata, $options); + } + + /** + * Creates a knowledge base. + * @param \Google\Cloud\Dialogflow\V2\CreateKnowledgeBaseRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateKnowledgeBase(\Google\Cloud\Dialogflow\V2\CreateKnowledgeBaseRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/CreateKnowledgeBase', + $argument, + ['\Google\Cloud\Dialogflow\V2\KnowledgeBase', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified knowledge base. + * @param \Google\Cloud\Dialogflow\V2\DeleteKnowledgeBaseRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteKnowledgeBase(\Google\Cloud\Dialogflow\V2\DeleteKnowledgeBaseRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/DeleteKnowledgeBase', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified knowledge base. + * @param \Google\Cloud\Dialogflow\V2\UpdateKnowledgeBaseRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateKnowledgeBase(\Google\Cloud\Dialogflow\V2\UpdateKnowledgeBaseRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/UpdateKnowledgeBase', + $argument, + ['\Google\Cloud\Dialogflow\V2\KnowledgeBase', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata.php new file mode 100644 index 000000000000..609ea56307cb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata.php @@ -0,0 +1,143 @@ +google.cloud.dialogflow.v2.KnowledgeOperationMetadata + */ +class KnowledgeOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current state of this operation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * The name of the knowledge base interacted with during the operation. + * + * Generated from protobuf field string knowledge_base = 3; + */ + protected $knowledge_base = ''; + protected $operation_metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. The current state of this operation. + * @type string $knowledge_base + * The name of the knowledge base interacted with during the operation. + * @type \Google\Cloud\Dialogflow\V2\ExportOperationMetadata $export_operation_metadata + * Metadata for the Export Data Operation such as the destination of export. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current state of this operation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of this operation. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * The name of the knowledge base interacted with during the operation. + * + * Generated from protobuf field string knowledge_base = 3; + * @return string + */ + public function getKnowledgeBase() + { + return $this->knowledge_base; + } + + /** + * The name of the knowledge base interacted with during the operation. + * + * Generated from protobuf field string knowledge_base = 3; + * @param string $var + * @return $this + */ + public function setKnowledgeBase($var) + { + GPBUtil::checkString($var, True); + $this->knowledge_base = $var; + + return $this; + } + + /** + * Metadata for the Export Data Operation such as the destination of export. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4; + * @return \Google\Cloud\Dialogflow\V2\ExportOperationMetadata|null + */ + public function getExportOperationMetadata() + { + return $this->readOneof(4); + } + + public function hasExportOperationMetadata() + { + return $this->hasOneof(4); + } + + /** + * Metadata for the Export Data Operation such as the destination of export. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4; + * @param \Google\Cloud\Dialogflow\V2\ExportOperationMetadata $var + * @return $this + */ + public function setExportOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ExportOperationMetadata::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperationMetadata() + { + return $this->whichOneof("operation_metadata"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata/State.php new file mode 100644 index 000000000000..ea9235bbaf4f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata/State.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State + */ +class State +{ + /** + * State unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The operation has been created. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The operation is currently running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The operation is done, either cancelled or completed. + * + * Generated from protobuf enum DONE = 3; + */ + const DONE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::RUNNING => 'RUNNING', + self::DONE => 'DONE', + ]; + + 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\Dialogflow\V2\KnowledgeOperationMetadata_State::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata_State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata_State.php new file mode 100644 index 000000000000..a91be8fab151 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata_State.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.ListAnswerRecordsRequest + */ +class ListAnswerRecordsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to list all answer records for in reverse + * chronological order. Format: `projects//locations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filters to restrict results to specific answer records. + * Marked deprecated as it hasn't been, and isn't currently, supported. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $filter = ''; + /** + * Optional. The maximum number of records to return in a single page. + * The server may return fewer records than this. If unspecified, we use 10. + * The maximum is 100. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The + * [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] + * value returned from a previous list request used to continue listing on + * the next page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to list all answer records for in reverse + * chronological order. Format: `projects//locations/`. + * @type string $filter + * Optional. Filters to restrict results to specific answer records. + * Marked deprecated as it hasn't been, and isn't currently, supported. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * @type int $page_size + * Optional. The maximum number of records to return in a single page. + * The server may return fewer records than this. If unspecified, we use 10. + * The maximum is 100. + * @type string $page_token + * Optional. The + * [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] + * value returned from a previous list request used to continue listing on + * the next page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to list all answer records for in reverse + * chronological order. Format: `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 project to list all answer records for in reverse + * chronological order. Format: `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; + } + + /** + * Optional. Filters to restrict results to specific answer records. + * Marked deprecated as it hasn't been, and isn't currently, supported. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getFilter() + { + @trigger_error('filter is deprecated.', E_USER_DEPRECATED); + return $this->filter; + } + + /** + * Optional. Filters to restrict results to specific answer records. + * Marked deprecated as it hasn't been, and isn't currently, supported. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setFilter($var) + { + @trigger_error('filter is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The maximum number of records to return in a single page. + * The server may return fewer records than this. If unspecified, we use 10. + * The maximum is 100. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of records to return in a single page. + * The server may return fewer records than this. If unspecified, we use 10. + * The maximum is 100. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The + * [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] + * value returned from a previous list request used to continue listing on + * the next page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The + * [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] + * value returned from a previous list request used to continue listing on + * the next page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsResponse.php new file mode 100644 index 000000000000..f15328a1c8e0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsResponse.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.v2.ListAnswerRecordsResponse + */ +class ListAnswerRecordsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of answer records. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnswerRecord answer_records = 1; + */ + private $answer_records; + /** + * A token to retrieve next page of results. Or empty if there are no more + * results. + * Pass this value in the + * [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] + * field in the subsequent call to `ListAnswerRecords` method to retrieve the + * next page of results. + * + * 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\Dialogflow\V2\AnswerRecord>|\Google\Protobuf\Internal\RepeatedField $answer_records + * The list of answer records. + * @type string $next_page_token + * A token to retrieve next page of results. Or empty if there are no more + * results. + * Pass this value in the + * [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] + * field in the subsequent call to `ListAnswerRecords` method to retrieve the + * next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); + parent::__construct($data); + } + + /** + * The list of answer records. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnswerRecord answer_records = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnswerRecords() + { + return $this->answer_records; + } + + /** + * The list of answer records. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnswerRecord answer_records = 1; + * @param array<\Google\Cloud\Dialogflow\V2\AnswerRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnswerRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\AnswerRecord::class); + $this->answer_records = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Or empty if there are no more + * results. + * Pass this value in the + * [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] + * field in the subsequent call to `ListAnswerRecords` method to retrieve the + * next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. Or empty if there are no more + * results. + * Pass this value in the + * [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] + * field in the subsequent call to `ListAnswerRecords` method to retrieve the + * next page of results. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsRequest.php new file mode 100644 index 000000000000..93bf81ba464e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsRequest.php @@ -0,0 +1,160 @@ +google.cloud.dialogflow.v2.ListContextsRequest + */ +class ListContextsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The session to list all contexts from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The session to list all contexts from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); + parent::__construct($data); + } + + /** + * Required. The session to list all contexts from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 session to list all contexts from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsResponse.php new file mode 100644 index 000000000000..4441573223fb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.ListContextsResponse + */ +class ListContextsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of contexts. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 1; + */ + private $contexts; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $contexts + * The list of contexts. There will be a maximum number of items + * returned based on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); + parent::__construct($data); + } + + /** + * The list of contexts. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContexts() + { + return $this->contexts; + } + + /** + * The list of contexts. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); + $this->contexts = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsRequest.php new file mode 100644 index 000000000000..4303584764d9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsRequest.php @@ -0,0 +1,144 @@ +google.cloud.dialogflow.v2.ListConversationDatasetsRequest + */ +class ListConversationDatasetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location name to list all conversation datasets + * for. Format: `projects//locations/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of conversation datasets to return in a single + * page. By default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location name to list all conversation datasets + * for. Format: `projects//locations/` + * @type int $page_size + * Optional. Maximum number of conversation datasets to return in a single + * page. By default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location name to list all conversation datasets + * for. Format: `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 project and location name to list all conversation datasets + * for. Format: `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; + } + + /** + * Optional. Maximum number of conversation datasets to return in a single + * page. By default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of conversation datasets to return in a single + * page. By default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsResponse.php new file mode 100644 index 000000000000..5e091819a336 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsResponse.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.v2.ListConversationDatasetsResponse + */ +class ListConversationDatasetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of datasets to return. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationDataset conversation_datasets = 1; + */ + private $conversation_datasets; + /** + * The token to use to retrieve the next page of results, or empty if there + * are no more results in the list. + * + * 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\Dialogflow\V2\ConversationDataset>|\Google\Protobuf\Internal\RepeatedField $conversation_datasets + * The list of datasets to return. + * @type string $next_page_token + * The token to use to retrieve the next page of results, or empty if there + * are no more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); + parent::__construct($data); + } + + /** + * The list of datasets to return. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationDataset conversation_datasets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversationDatasets() + { + return $this->conversation_datasets; + } + + /** + * The list of datasets to return. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationDataset conversation_datasets = 1; + * @param array<\Google\Cloud\Dialogflow\V2\ConversationDataset>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversationDatasets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ConversationDataset::class); + $this->conversation_datasets = $arr; + + return $this; + } + + /** + * The token to use to retrieve the next page of results, or empty if there + * are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token to use to retrieve the next page of results, or empty if there + * are no more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsRequest.php new file mode 100644 index 000000000000..170f34e97eef --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsRequest.php @@ -0,0 +1,144 @@ +google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + */ +class ListConversationModelEvaluationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation model resource name. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. Maximum number of evaluations to return in a + * single page. By default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The conversation model resource name. Format: + * `projects//conversationModels/` + * @type int $page_size + * Optional. Maximum number of evaluations to return in a + * single page. By default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation model resource name. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The conversation model resource name. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of evaluations to return in a + * single page. By default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of evaluations to return in a + * single page. By default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsResponse.php new file mode 100644 index 000000000000..f9742668b66b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsResponse.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + */ +class ListConversationModelEvaluationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of evaluations to return. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluations = 1; + */ + private $conversation_model_evaluations; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * 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\Dialogflow\V2\ConversationModelEvaluation>|\Google\Protobuf\Internal\RepeatedField $conversation_model_evaluations + * The list of evaluations to return. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The list of evaluations to return. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversationModelEvaluations() + { + return $this->conversation_model_evaluations; + } + + /** + * The list of evaluations to return. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluations = 1; + * @param array<\Google\Cloud\Dialogflow\V2\ConversationModelEvaluation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversationModelEvaluations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation::class); + $this->conversation_model_evaluations = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsRequest.php new file mode 100644 index 000000000000..840601c63f19 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsRequest.php @@ -0,0 +1,144 @@ +google.cloud.dialogflow.v2.ListConversationModelsRequest + */ +class ListConversationModelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to list all conversation models for. + * Format: `projects/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. Maximum number of conversation models to return in a single + * page. By default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to list all conversation models for. + * Format: `projects/` + * @type int $page_size + * Optional. Maximum number of conversation models to return in a single + * page. By default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to list all conversation models for. + * Format: `projects/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project to list all conversation models for. + * Format: `projects/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of conversation models to return in a single + * page. By default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of conversation models to return in a single + * page. By default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsResponse.php new file mode 100644 index 000000000000..1aa84fbac746 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsResponse.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.v2.ListConversationModelsResponse + */ +class ListConversationModelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of models to return. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModel conversation_models = 1; + */ + private $conversation_models; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * 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\Dialogflow\V2\ConversationModel>|\Google\Protobuf\Internal\RepeatedField $conversation_models + * The list of models to return. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The list of models to return. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModel conversation_models = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversationModels() + { + return $this->conversation_models; + } + + /** + * The list of models to return. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModel conversation_models = 1; + * @param array<\Google\Cloud\Dialogflow\V2\ConversationModel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversationModels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ConversationModel::class); + $this->conversation_models = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesRequest.php new file mode 100644 index 000000000000..197fbe96b877 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesRequest.php @@ -0,0 +1,144 @@ +google.cloud.dialogflow.v2.ListConversationProfilesRequest + */ +class ListConversationProfilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to list all conversation profiles from. + * Format: `projects//locations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to list all conversation profiles from. + * Format: `projects//locations/`. + * @type int $page_size + * The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to list all conversation profiles from. + * Format: `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 project to list all conversation profiles from. + * Format: `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; + } + + /** + * The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * 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 next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous list request. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesResponse.php new file mode 100644 index 000000000000..b0a8719d5b62 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.ListConversationProfilesResponse + */ +class ListConversationProfilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of project conversation profiles. There is a maximum number + * of items returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationProfile conversation_profiles = 1; + */ + private $conversation_profiles; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\ConversationProfile>|\Google\Protobuf\Internal\RepeatedField $conversation_profiles + * The list of project conversation profiles. There is a maximum number + * of items returned based on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * The list of project conversation profiles. There is a maximum number + * of items returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationProfile conversation_profiles = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversationProfiles() + { + return $this->conversation_profiles; + } + + /** + * The list of project conversation profiles. There is a maximum number + * of items returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationProfile conversation_profiles = 1; + * @param array<\Google\Cloud\Dialogflow\V2\ConversationProfile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversationProfiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ConversationProfile::class); + $this->conversation_profiles = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsRequest.php new file mode 100644 index 000000000000..a5149e30e401 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsRequest.php @@ -0,0 +1,234 @@ +google.cloud.dialogflow.v2.ListConversationsRequest + */ +class ListConversationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project from which to list all conversation. + * Format: `projects//locations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * A filter expression that filters conversations listed in the response. In + * general, the expression must specify the field name, a comparison operator, + * and the value to use for filtering: + *
    + *
  • The value must be a string, a number, or a boolean.
  • + *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • + *
  • To filter on multiple expressions, separate the + * expressions with `AND` or `OR` (omitting both implies `AND`).
  • + *
  • For clarity, expressions can be enclosed in parentheses.
  • + *
+ * Only `lifecycle_state` can be filtered on in this way. For example, + * the following expression only returns `COMPLETED` conversations: + * `lifecycle_state = "COMPLETED"` + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project from which to list all conversation. + * Format: `projects//locations/`. + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * @type string $filter + * A filter expression that filters conversations listed in the response. In + * general, the expression must specify the field name, a comparison operator, + * and the value to use for filtering: + *
    + *
  • The value must be a string, a number, or a boolean.
  • + *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • + *
  • To filter on multiple expressions, separate the + * expressions with `AND` or `OR` (omitting both implies `AND`).
  • + *
  • For clarity, expressions can be enclosed in parentheses.
  • + *
+ * Only `lifecycle_state` can be filtered on in this way. For example, + * the following expression only returns `COMPLETED` conversations: + * `lifecycle_state = "COMPLETED"` + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project from which to list all conversation. + * Format: `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 project from which to list all conversation. + * Format: `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; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter expression that filters conversations listed in the response. In + * general, the expression must specify the field name, a comparison operator, + * and the value to use for filtering: + *
    + *
  • The value must be a string, a number, or a boolean.
  • + *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • + *
  • To filter on multiple expressions, separate the + * expressions with `AND` or `OR` (omitting both implies `AND`).
  • + *
  • For clarity, expressions can be enclosed in parentheses.
  • + *
+ * Only `lifecycle_state` can be filtered on in this way. For example, + * the following expression only returns `COMPLETED` conversations: + * `lifecycle_state = "COMPLETED"` + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that filters conversations listed in the response. In + * general, the expression must specify the field name, a comparison operator, + * and the value to use for filtering: + *
    + *
  • The value must be a string, a number, or a boolean.
  • + *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • + *
  • To filter on multiple expressions, separate the + * expressions with `AND` or `OR` (omitting both implies `AND`).
  • + *
  • For clarity, expressions can be enclosed in parentheses.
  • + *
+ * Only `lifecycle_state` can be filtered on in this way. For example, + * the following expression only returns `COMPLETED` conversations: + * `lifecycle_state = "COMPLETED"` + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsResponse.php new file mode 100644 index 000000000000..f4a0679ed9e2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.ListConversationsResponse + */ +class ListConversationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of conversations. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Conversation conversations = 1; + */ + private $conversations; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\Conversation>|\Google\Protobuf\Internal\RepeatedField $conversations + * The list of conversations. There will be a maximum number of items + * returned based on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * The list of conversations. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Conversation conversations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversations() + { + return $this->conversations; + } + + /** + * The list of conversations. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Conversation conversations = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Conversation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Conversation::class); + $this->conversations = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsRequest.php new file mode 100644 index 000000000000..95bae4e54d10 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsRequest.php @@ -0,0 +1,238 @@ +google.cloud.dialogflow.v2.ListDocumentsRequest + */ +class ListDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The knowledge base to list all documents for. + * Format: `projects//locations//knowledgeBases/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return in a single page. By + * default 10 and at most 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter expression used to filter documents returned by the list method. + * The expression has the following syntax: + * [AND ] ... + * The following fields and operators are supported: + * * knowledge_types with has(:) operator + * * display_name with has(:) operator + * * state with equals(=) operator + * Examples: + * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. + * * "display_name:customer" matches documents whose display name contains + * "customer". + * * "state=ACTIVE" matches documents with ACTIVE state. + * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The knowledge base to list all documents for. + * Format: `projects//locations//knowledgeBases/`. + * @type int $page_size + * The maximum number of items to return in a single page. By + * default 10 and at most 100. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * @type string $filter + * The filter expression used to filter documents returned by the list method. + * The expression has the following syntax: + * [AND ] ... + * The following fields and operators are supported: + * * knowledge_types with has(:) operator + * * display_name with has(:) operator + * * state with equals(=) operator + * Examples: + * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. + * * "display_name:customer" matches documents whose display name contains + * "customer". + * * "state=ACTIVE" matches documents with ACTIVE state. + * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The knowledge base to list all documents for. + * Format: `projects//locations//knowledgeBases/`. + * + * 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 knowledge base to list all documents for. + * Format: `projects//locations//knowledgeBases/`. + * + * 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 items to return in a single page. By + * default 10 and at most 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return in a single page. By + * default 10 and at most 100. + * + * 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 next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous list request. + * + * 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; + } + + /** + * The filter expression used to filter documents returned by the list method. + * The expression has the following syntax: + * [AND ] ... + * The following fields and operators are supported: + * * knowledge_types with has(:) operator + * * display_name with has(:) operator + * * state with equals(=) operator + * Examples: + * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. + * * "display_name:customer" matches documents whose display name contains + * "customer". + * * "state=ACTIVE" matches documents with ACTIVE state. + * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression used to filter documents returned by the list method. + * The expression has the following syntax: + * [AND ] ... + * The following fields and operators are supported: + * * knowledge_types with has(:) operator + * * display_name with has(:) operator + * * state with equals(=) operator + * Examples: + * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. + * * "display_name:customer" matches documents whose display name contains + * "customer". + * * "state=ACTIVE" matches documents with ACTIVE state. + * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsResponse.php new file mode 100644 index 000000000000..101cf40d5b81 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsResponse.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.v2.ListDocumentsResponse + */ +class ListDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of documents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document documents = 1; + */ + private $documents; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\Document>|\Google\Protobuf\Internal\RepeatedField $documents + * The list of documents. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * The list of documents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document documents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The list of documents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document documents = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Document>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Document::class); + $this->documents = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesRequest.php new file mode 100644 index 000000000000..186ef5a8d8a7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesRequest.php @@ -0,0 +1,194 @@ +google.cloud.dialogflow.v2.ListEntityTypesRequest + */ +class ListEntityTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list all entity types from. + * Format: `projects//agent`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list all entity types from. + * Format: `projects//agent`. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list all entity types from. + * Format: `projects//agent`. + * + * 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 agent to list all entity types from. + * Format: `projects//agent`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesResponse.php new file mode 100644 index 000000000000..766d0263fd6d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.ListEntityTypesResponse + */ +class ListEntityTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of agent entity types. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; + */ + private $entity_types; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types + * The list of agent entity types. There will be a maximum number of items + * returned based on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * The list of agent entity types. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityTypes() + { + return $this->entity_types; + } + + /** + * The list of agent entity types. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; + * @param array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType::class); + $this->entity_types = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsRequest.php new file mode 100644 index 000000000000..4af5faab4748 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsRequest.php @@ -0,0 +1,152 @@ +google.cloud.dialogflow.v2.ListEnvironmentsRequest + */ +class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list all environments from. + * Format: + * - `projects//agent` + * - `projects//locations//agent` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list all environments from. + * Format: + * - `projects//agent` + * - `projects//locations//agent` + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list all environments from. + * Format: + * - `projects//agent` + * - `projects//locations//agent` + * + * 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 agent to list all environments from. + * Format: + * - `projects//agent` + * - `projects//locations//agent` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsResponse.php new file mode 100644 index 000000000000..c5fe88b95df4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.ListEnvironmentsResponse + */ +class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of agent environments. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + private $environments; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\Environment>|\Google\Protobuf\Internal\RepeatedField $environments + * The list of agent environments. There will be a maximum number of items + * returned based on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The list of agent environments. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Environment environments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnvironments() + { + return $this->environments; + } + + /** + * The list of agent environments. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Environment environments = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Environment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnvironments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Environment::class); + $this->environments = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsRequest.php new file mode 100644 index 000000000000..97a672820707 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsRequest.php @@ -0,0 +1,256 @@ +google.cloud.dialogflow.v2.ListIntentsRequest + */ +class ListIntentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list all intents from. + * Format: `projects//agent` or `projects//locations//agent`. + * Alternatively, you can specify the environment to list intents for. + * Format: `projects//agent/environments/` + * or `projects//locations//agent/environments/`. + * Note: training phrases of the intents will not be returned for non-draft + * environment. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $intent_view = 0; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list all intents from. + * Format: `projects//agent` or `projects//locations//agent`. + * Alternatively, you can specify the environment to list intents for. + * Format: `projects//agent/environments/` + * or `projects//locations//agent/environments/`. + * Note: training phrases of the intents will not be returned for non-draft + * environment. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type int $intent_view + * Optional. The resource view to apply to the returned intent. + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list all intents from. + * Format: `projects//agent` or `projects//locations//agent`. + * Alternatively, you can specify the environment to list intents for. + * Format: `projects//agent/environments/` + * or `projects//locations//agent/environments/`. + * Note: training phrases of the intents will not be returned for non-draft + * environment. + * + * 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 agent to list all intents from. + * Format: `projects//agent` or `projects//locations//agent`. + * Alternatively, you can specify the environment to list intents for. + * Format: `projects//agent/environments/` + * or `projects//locations//agent/environments/`. + * Note: training phrases of the intents will not be returned for non-draft + * environment. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIntentView() + { + return $this->intent_view; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIntentView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); + $this->intent_view = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsResponse.php new file mode 100644 index 000000000000..8d1fe4c0ff55 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.ListIntentsResponse + */ +class ListIntentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of agent intents. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; + */ + private $intents; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents + * The list of agent intents. There will be a maximum number of items + * returned based on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * The list of agent intents. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntents() + { + return $this->intents; + } + + /** + * The list of agent intents. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); + $this->intents = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesRequest.php new file mode 100644 index 000000000000..feccac125541 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesRequest.php @@ -0,0 +1,250 @@ +google.cloud.dialogflow.v2.ListKnowledgeBasesRequest + */ +class ListKnowledgeBasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to list of knowledge bases for. + * Format: `projects//locations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return in a single page. By + * default 10 and at most 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter expression used to filter knowledge bases returned by the list + * method. The expression has the following syntax: + * [AND ] ... + * The following fields and operators are supported: + * * display_name with has(:) operator + * * language_code with equals(=) operator + * Examples: + * * 'language_code=en-us' matches knowledge bases with en-us language code. + * * 'display_name:articles' matches knowledge bases whose display name + * contains "articles". + * * 'display_name:"Best Articles"' matches knowledge bases whose display + * name contains "Best Articles". + * * 'language_code=en-gb AND display_name=articles' matches all knowledge + * bases whose display name contains "articles" and whose language code is + * "en-gb". + * Note: An empty filter string (i.e. "") is a no-op and will result in no + * filtering. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to list of knowledge bases for. + * Format: `projects//locations/`. + * @type int $page_size + * The maximum number of items to return in a single page. By + * default 10 and at most 100. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * @type string $filter + * The filter expression used to filter knowledge bases returned by the list + * method. The expression has the following syntax: + * [AND ] ... + * The following fields and operators are supported: + * * display_name with has(:) operator + * * language_code with equals(=) operator + * Examples: + * * 'language_code=en-us' matches knowledge bases with en-us language code. + * * 'display_name:articles' matches knowledge bases whose display name + * contains "articles". + * * 'display_name:"Best Articles"' matches knowledge bases whose display + * name contains "Best Articles". + * * 'language_code=en-gb AND display_name=articles' matches all knowledge + * bases whose display name contains "articles" and whose language code is + * "en-gb". + * Note: An empty filter string (i.e. "") is a no-op and will result in no + * filtering. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to list of knowledge bases for. + * Format: `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 project to list of knowledge bases for. + * Format: `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; + } + + /** + * The maximum number of items to return in a single page. By + * default 10 and at most 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return in a single page. By + * default 10 and at most 100. + * + * 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 next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous list request. + * + * 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; + } + + /** + * The filter expression used to filter knowledge bases returned by the list + * method. The expression has the following syntax: + * [AND ] ... + * The following fields and operators are supported: + * * display_name with has(:) operator + * * language_code with equals(=) operator + * Examples: + * * 'language_code=en-us' matches knowledge bases with en-us language code. + * * 'display_name:articles' matches knowledge bases whose display name + * contains "articles". + * * 'display_name:"Best Articles"' matches knowledge bases whose display + * name contains "Best Articles". + * * 'language_code=en-gb AND display_name=articles' matches all knowledge + * bases whose display name contains "articles" and whose language code is + * "en-gb". + * Note: An empty filter string (i.e. "") is a no-op and will result in no + * filtering. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression used to filter knowledge bases returned by the list + * method. The expression has the following syntax: + * [AND ] ... + * The following fields and operators are supported: + * * display_name with has(:) operator + * * language_code with equals(=) operator + * Examples: + * * 'language_code=en-us' matches knowledge bases with en-us language code. + * * 'display_name:articles' matches knowledge bases whose display name + * contains "articles". + * * 'display_name:"Best Articles"' matches knowledge bases whose display + * name contains "Best Articles". + * * 'language_code=en-gb AND display_name=articles' matches all knowledge + * bases whose display name contains "articles" and whose language code is + * "en-gb". + * Note: An empty filter string (i.e. "") is a no-op and will result in no + * filtering. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesResponse.php new file mode 100644 index 000000000000..89838ab5d1fa --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesResponse.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.v2.ListKnowledgeBasesResponse + */ +class ListKnowledgeBasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of knowledge bases. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.KnowledgeBase knowledge_bases = 1; + */ + private $knowledge_bases; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $knowledge_bases + * The list of knowledge bases. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); + parent::__construct($data); + } + + /** + * The list of knowledge bases. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.KnowledgeBase knowledge_bases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKnowledgeBases() + { + return $this->knowledge_bases; + } + + /** + * The list of knowledge bases. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.KnowledgeBase knowledge_bases = 1; + * @param array<\Google\Cloud\Dialogflow\V2\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKnowledgeBases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\KnowledgeBase::class); + $this->knowledge_bases = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesRequest.php new file mode 100644 index 000000000000..b3b91312218f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesRequest.php @@ -0,0 +1,206 @@ +google.cloud.dialogflow.v2.ListMessagesRequest + */ +class ListMessagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the conversation to list messages for. + * Format: `projects//locations//conversations/` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filter on message fields. Currently predicates on `create_time` + * and `create_time_epoch_microseconds` are supported. `create_time` only + * support milliseconds accuracy. E.g., + * `create_time_epoch_microseconds > 1551790877964485` or + * `create_time > 2017-01-15T01:30:15.01Z`. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the conversation to list messages for. + * Format: `projects//locations//conversations/` + * @type string $filter + * Optional. Filter on message fields. Currently predicates on `create_time` + * and `create_time_epoch_microseconds` are supported. `create_time` only + * support milliseconds accuracy. E.g., + * `create_time_epoch_microseconds > 1551790877964485` or + * `create_time > 2017-01-15T01:30:15.01Z`. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the conversation to list messages for. + * Format: `projects//locations//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 name of the conversation to list messages for. + * Format: `projects//locations//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; + } + + /** + * Optional. Filter on message fields. Currently predicates on `create_time` + * and `create_time_epoch_microseconds` are supported. `create_time` only + * support milliseconds accuracy. E.g., + * `create_time_epoch_microseconds > 1551790877964485` or + * `create_time > 2017-01-15T01:30:15.01Z`. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter on message fields. Currently predicates on `create_time` + * and `create_time_epoch_microseconds` are supported. `create_time` only + * support milliseconds accuracy. E.g., + * `create_time_epoch_microseconds > 1551790877964485` or + * `create_time > 2017-01-15T01:30:15.01Z`. + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesResponse.php new file mode 100644 index 000000000000..694488dc89b7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesResponse.php @@ -0,0 +1,114 @@ +google.cloud.dialogflow.v2.ListMessagesResponse + */ +class ListMessagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of messages. There will be a maximum number of items + * returned based on the page_size field in the request. + * `messages` is sorted by `create_time` in descending order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Message messages = 1; + */ + private $messages; + /** + * Token to retrieve the next page of results, or empty if there are + * no more results in the list. + * + * 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\Dialogflow\V2\Message>|\Google\Protobuf\Internal\RepeatedField $messages + * The list of messages. There will be a maximum number of items + * returned based on the page_size field in the request. + * `messages` is sorted by `create_time` in descending order. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are + * no more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * The list of messages. There will be a maximum number of items + * returned based on the page_size field in the request. + * `messages` is sorted by `create_time` in descending order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Message messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * The list of messages. There will be a maximum number of items + * returned based on the page_size field in the request. + * `messages` is sorted by `create_time` in descending order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Message messages = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Message::class); + $this->messages = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are + * no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are + * no more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsRequest.php new file mode 100644 index 000000000000..3e73d207bed6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsRequest.php @@ -0,0 +1,148 @@ +google.cloud.dialogflow.v2.ListParticipantsRequest + */ +class ListParticipantsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation to list all participants from. + * Format: `projects//locations//conversations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The conversation to list all participants from. + * Format: `projects//locations//conversations/`. + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation to list all participants from. + * Format: `projects//locations//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 conversation to list all participants from. + * Format: `projects//locations//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; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsResponse.php new file mode 100644 index 000000000000..800b88ac62f5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.ListParticipantsResponse + */ +class ListParticipantsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of participants. There is a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Participant participants = 1; + */ + private $participants; + /** + * Token to retrieve the next page of results or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\Participant>|\Google\Protobuf\Internal\RepeatedField $participants + * The list of participants. There is a maximum number of items + * returned based on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * The list of participants. There is a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Participant participants = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParticipants() + { + return $this->participants; + } + + /** + * The list of participants. There is a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Participant participants = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Participant>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParticipants($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Participant::class); + $this->participants = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesRequest.php new file mode 100644 index 000000000000..edbd9cc7fd7b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesRequest.php @@ -0,0 +1,160 @@ +google.cloud.dialogflow.v2.ListSessionEntityTypesRequest + */ +class ListSessionEntityTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The session to list all session entity types from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The session to list all session entity types from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The session to list all session entity types from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * 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 session to list all session entity types from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesResponse.php new file mode 100644 index 000000000000..87ea45ce09d7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.ListSessionEntityTypesResponse + */ +class ListSessionEntityTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of session entity types. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 1; + */ + private $session_entity_types; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $session_entity_types + * The list of session entity types. There will be a maximum number of items + * returned based on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * The list of session entity types. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSessionEntityTypes() + { + return $this->session_entity_types; + } + + /** + * The list of session entity types. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 1; + * @param array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSessionEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); + $this->session_entity_types = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsRequest.php new file mode 100644 index 000000000000..f504dadfa7f8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsRequest.php @@ -0,0 +1,152 @@ +google.cloud.dialogflow.v2.ListVersionsRequest + */ +class ListVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list all versions from. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list all versions from. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list all versions from. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * + * 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 agent to list all versions from. + * Supported formats: + * - `projects//agent` + * - `projects//locations//agent` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsResponse.php new file mode 100644 index 000000000000..653aa7dedfdc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.ListVersionsResponse + */ +class ListVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of agent versions. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Version versions = 1; + */ + private $versions; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\Version>|\Google\Protobuf\Internal\RepeatedField $versions + * The list of agent versions. There will be a maximum number of items + * returned based on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); + parent::__construct($data); + } + + /** + * The list of agent versions. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Version versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVersions() + { + return $this->versions; + } + + /** + * The list of agent versions. There will be a maximum number of items + * returned based on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Version versions = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Version>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Version::class); + $this->versions = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/LoggingConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/LoggingConfig.php new file mode 100644 index 000000000000..31121f0f3ed8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/LoggingConfig.php @@ -0,0 +1,79 @@ +google.cloud.dialogflow.v2.LoggingConfig + */ +class LoggingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether to log conversation events like + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * to Stackdriver in the conversation project as JSON format + * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. + * + * Generated from protobuf field bool enable_stackdriver_logging = 3; + */ + protected $enable_stackdriver_logging = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_stackdriver_logging + * Whether to log conversation events like + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * to Stackdriver in the conversation project as JSON format + * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Whether to log conversation events like + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * to Stackdriver in the conversation project as JSON format + * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. + * + * Generated from protobuf field bool enable_stackdriver_logging = 3; + * @return bool + */ + public function getEnableStackdriverLogging() + { + return $this->enable_stackdriver_logging; + } + + /** + * Whether to log conversation events like + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * to Stackdriver in the conversation project as JSON format + * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. + * + * Generated from protobuf field bool enable_stackdriver_logging = 3; + * @param bool $var + * @return $this + */ + public function setEnableStackdriverLogging($var) + { + GPBUtil::checkBool($var); + $this->enable_stackdriver_logging = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Message.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Message.php new file mode 100644 index 000000000000..a176cd042024 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Message.php @@ -0,0 +1,395 @@ +google.cloud.dialogflow.v2.Message + */ +class Message extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique identifier of the message. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Required. The message content. + * + * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $content = ''; + /** + * Optional. The message language. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Output only. The participant that sends this message. + * + * Generated from protobuf field string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $participant = ''; + /** + * Output only. The role of the participant. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $participant_role = 0; + /** + * Output only. The time when the message was created in Contact Center AI. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Optional. The time when the message was sent. + * + * Generated from protobuf field .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $send_time = null; + /** + * Output only. The annotation for the message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $message_annotation = null; + /** + * Output only. The sentiment analysis result for the message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sentiment_analysis = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. The unique identifier of the message. + * Format: `projects//locations//conversations//messages/`. + * @type string $content + * Required. The message content. + * @type string $language_code + * Optional. The message language. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * @type string $participant + * Output only. The participant that sends this message. + * @type int $participant_role + * Output only. The role of the participant. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the message was created in Contact Center AI. + * @type \Google\Protobuf\Timestamp $send_time + * Optional. The time when the message was sent. + * @type \Google\Cloud\Dialogflow\V2\MessageAnnotation $message_annotation + * Output only. The annotation for the message. + * @type \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult $sentiment_analysis + * Output only. The sentiment analysis result for the message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique identifier of the message. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. The unique identifier of the message. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The message content. + * + * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Required. The message content. + * + * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Optional. The message language. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The message language. + * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag. Example: "en-US". + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Output only. The participant that sends this message. + * + * Generated from protobuf field string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getParticipant() + { + return $this->participant; + } + + /** + * Output only. The participant that sends this message. + * + * Generated from protobuf field string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setParticipant($var) + { + GPBUtil::checkString($var, True); + $this->participant = $var; + + return $this; + } + + /** + * Output only. The role of the participant. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getParticipantRole() + { + return $this->participant_role; + } + + /** + * Output only. The role of the participant. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setParticipantRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); + $this->participant_role = $var; + + return $this; + } + + /** + * Output only. The time when the message was created in Contact Center AI. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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 when the message was created in Contact Center AI. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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; + } + + /** + * Optional. The time when the message was sent. + * + * Generated from protobuf field .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSendTime() + { + return $this->send_time; + } + + public function hasSendTime() + { + return isset($this->send_time); + } + + public function clearSendTime() + { + unset($this->send_time); + } + + /** + * Optional. The time when the message was sent. + * + * Generated from protobuf field .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSendTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->send_time = $var; + + return $this; + } + + /** + * Output only. The annotation for the message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\MessageAnnotation|null + */ + public function getMessageAnnotation() + { + return $this->message_annotation; + } + + public function hasMessageAnnotation() + { + return isset($this->message_annotation); + } + + public function clearMessageAnnotation() + { + unset($this->message_annotation); + } + + /** + * Output only. The annotation for the message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\MessageAnnotation $var + * @return $this + */ + public function setMessageAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\MessageAnnotation::class); + $this->message_annotation = $var; + + return $this; + } + + /** + * Output only. The sentiment analysis result for the message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult|null + */ + public function getSentimentAnalysis() + { + return $this->sentiment_analysis; + } + + public function hasSentimentAnalysis() + { + return isset($this->sentiment_analysis); + } + + public function clearSentimentAnalysis() + { + unset($this->sentiment_analysis); + } + + /** + * Output only. The sentiment analysis result for the message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult $var + * @return $this + */ + public function setSentimentAnalysis($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult::class); + $this->sentiment_analysis = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/MessageAnnotation.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/MessageAnnotation.php new file mode 100644 index 000000000000..d1860e5293c1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/MessageAnnotation.php @@ -0,0 +1,109 @@ +google.cloud.dialogflow.v2.MessageAnnotation + */ +class MessageAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The collection of annotated message parts ordered by their + * position in the message. You can recover the annotated message by + * concatenating [AnnotatedMessagePart.text]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnnotatedMessagePart parts = 1; + */ + private $parts; + /** + * Indicates whether the text message contains entities. + * + * Generated from protobuf field bool contain_entities = 2; + */ + protected $contain_entities = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\AnnotatedMessagePart>|\Google\Protobuf\Internal\RepeatedField $parts + * The collection of annotated message parts ordered by their + * position in the message. You can recover the annotated message by + * concatenating [AnnotatedMessagePart.text]. + * @type bool $contain_entities + * Indicates whether the text message contains entities. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * The collection of annotated message parts ordered by their + * position in the message. You can recover the annotated message by + * concatenating [AnnotatedMessagePart.text]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnnotatedMessagePart parts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParts() + { + return $this->parts; + } + + /** + * The collection of annotated message parts ordered by their + * position in the message. You can recover the annotated message by + * concatenating [AnnotatedMessagePart.text]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnnotatedMessagePart parts = 1; + * @param array<\Google\Cloud\Dialogflow\V2\AnnotatedMessagePart>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\AnnotatedMessagePart::class); + $this->parts = $arr; + + return $this; + } + + /** + * Indicates whether the text message contains entities. + * + * Generated from protobuf field bool contain_entities = 2; + * @return bool + */ + public function getContainEntities() + { + return $this->contain_entities; + } + + /** + * Indicates whether the text message contains entities. + * + * Generated from protobuf field bool contain_entities = 2; + * @param bool $var + * @return $this + */ + public function setContainEntities($var) + { + GPBUtil::checkBool($var); + $this->contain_entities = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig.php new file mode 100644 index 000000000000..f096ff33fdbb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig.php @@ -0,0 +1,149 @@ +google.cloud.dialogflow.v2.NotificationConfig + */ +class NotificationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the Pub/Sub topic to publish conversation + * events like + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * as serialized + * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. + * For telephony integration to receive notification, make sure either this + * topic is in the same project as the conversation or you grant + * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service + * Agent` role in the topic project. + * For chat integration to receive notification, make sure API caller has been + * granted the `Dialogflow Service Agent` role for the topic. + * Format: `projects//locations//topics/`. + * + * Generated from protobuf field string topic = 1; + */ + protected $topic = ''; + /** + * Format of message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig.MessageFormat message_format = 2; + */ + protected $message_format = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $topic + * Name of the Pub/Sub topic to publish conversation + * events like + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * as serialized + * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. + * For telephony integration to receive notification, make sure either this + * topic is in the same project as the conversation or you grant + * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service + * Agent` role in the topic project. + * For chat integration to receive notification, make sure API caller has been + * granted the `Dialogflow Service Agent` role for the topic. + * Format: `projects//locations//topics/`. + * @type int $message_format + * Format of message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Name of the Pub/Sub topic to publish conversation + * events like + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * as serialized + * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. + * For telephony integration to receive notification, make sure either this + * topic is in the same project as the conversation or you grant + * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service + * Agent` role in the topic project. + * For chat integration to receive notification, make sure API caller has been + * granted the `Dialogflow Service Agent` role for the topic. + * Format: `projects//locations//topics/`. + * + * Generated from protobuf field string topic = 1; + * @return string + */ + public function getTopic() + { + return $this->topic; + } + + /** + * Name of the Pub/Sub topic to publish conversation + * events like + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * as serialized + * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. + * For telephony integration to receive notification, make sure either this + * topic is in the same project as the conversation or you grant + * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service + * Agent` role in the topic project. + * For chat integration to receive notification, make sure API caller has been + * granted the `Dialogflow Service Agent` role for the topic. + * Format: `projects//locations//topics/`. + * + * Generated from protobuf field string topic = 1; + * @param string $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkString($var, True); + $this->topic = $var; + + return $this; + } + + /** + * Format of message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig.MessageFormat message_format = 2; + * @return int + */ + public function getMessageFormat() + { + return $this->message_format; + } + + /** + * Format of message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig.MessageFormat message_format = 2; + * @param int $var + * @return $this + */ + public function setMessageFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\NotificationConfig\MessageFormat::class); + $this->message_format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig/MessageFormat.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig/MessageFormat.php new file mode 100644 index 000000000000..fac3e1d43f9f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig/MessageFormat.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.v2.NotificationConfig.MessageFormat + */ +class MessageFormat +{ + /** + * If it is unspecified, PROTO will be used. + * + * Generated from protobuf enum MESSAGE_FORMAT_UNSPECIFIED = 0; + */ + const MESSAGE_FORMAT_UNSPECIFIED = 0; + /** + * Pub/Sub message will be serialized proto. + * + * Generated from protobuf enum PROTO = 1; + */ + const PROTO = 1; + /** + * Pub/Sub message will be json. + * + * Generated from protobuf enum JSON = 2; + */ + const JSON = 2; + + private static $valueToName = [ + self::MESSAGE_FORMAT_UNSPECIFIED => 'MESSAGE_FORMAT_UNSPECIFIED', + self::PROTO => 'PROTO', + self::JSON => 'JSON', + ]; + + 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(MessageFormat::class, \Google\Cloud\Dialogflow\V2\NotificationConfig_MessageFormat::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig_MessageFormat.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig_MessageFormat.php new file mode 100644 index 000000000000..01f902a2b7e3 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig_MessageFormat.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.OriginalDetectIntentRequest + */ +class OriginalDetectIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The source of this request, e.g., `google`, `facebook`, `slack`. It is set + * by Dialogflow-owned servers. + * + * Generated from protobuf field string source = 1; + */ + protected $source = ''; + /** + * Optional. The version of the protocol used for this request. + * This field is AoG-specific. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + /** + * Optional. This field is set to the value of the `QueryParameters.payload` + * field passed in the request. Some integrations that query a Dialogflow + * agent may provide additional information in the payload. + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: + *
{
+     *  "telephony": {
+     *    "caller_id": "+18558363987"
+     *  }
+     * }
+ * Note: The caller ID field (`caller_id`) will be redacted for Trial + * Edition agents and populated with the caller ID in [E.164 + * format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. + * + * Generated from protobuf field .google.protobuf.Struct payload = 3; + */ + protected $payload = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source + * The source of this request, e.g., `google`, `facebook`, `slack`. It is set + * by Dialogflow-owned servers. + * @type string $version + * Optional. The version of the protocol used for this request. + * This field is AoG-specific. + * @type \Google\Protobuf\Struct $payload + * Optional. This field is set to the value of the `QueryParameters.payload` + * field passed in the request. Some integrations that query a Dialogflow + * agent may provide additional information in the payload. + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: + *
{
+     *            "telephony": {
+     *              "caller_id": "+18558363987"
+     *            }
+     *           }
+ * Note: The caller ID field (`caller_id`) will be redacted for Trial + * Edition agents and populated with the caller ID in [E.164 + * format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * The source of this request, e.g., `google`, `facebook`, `slack`. It is set + * by Dialogflow-owned servers. + * + * Generated from protobuf field string source = 1; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * The source of this request, e.g., `google`, `facebook`, `slack`. It is set + * by Dialogflow-owned servers. + * + * Generated from protobuf field string source = 1; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * Optional. The version of the protocol used for this request. + * This field is AoG-specific. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. The version of the protocol used for this request. + * This field is AoG-specific. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. This field is set to the value of the `QueryParameters.payload` + * field passed in the request. Some integrations that query a Dialogflow + * agent may provide additional information in the payload. + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: + *
{
+     *  "telephony": {
+     *    "caller_id": "+18558363987"
+     *  }
+     * }
+ * Note: The caller ID field (`caller_id`) will be redacted for Trial + * Edition agents and populated with the caller ID in [E.164 + * format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. + * + * Generated from protobuf field .google.protobuf.Struct payload = 3; + * @return \Google\Protobuf\Struct|null + */ + public function getPayload() + { + return $this->payload; + } + + public function hasPayload() + { + return isset($this->payload); + } + + public function clearPayload() + { + unset($this->payload); + } + + /** + * Optional. This field is set to the value of the `QueryParameters.payload` + * field passed in the request. Some integrations that query a Dialogflow + * agent may provide additional information in the payload. + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: + *
{
+     *  "telephony": {
+     *    "caller_id": "+18558363987"
+     *  }
+     * }
+ * Note: The caller ID field (`caller_id`) will be redacted for Trial + * Edition agents and populated with the caller ID in [E.164 + * format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. + * + * Generated from protobuf field .google.protobuf.Struct payload = 3; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->payload = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudio.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudio.php new file mode 100644 index 000000000000..33828b7f28cb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudio.php @@ -0,0 +1,115 @@ +google.cloud.dialogflow.v2.OutputAudio + */ +class OutputAudio extends \Google\Protobuf\Internal\Message +{ + /** + * Instructs the speech synthesizer how to generate the speech + * audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig config = 1; + */ + protected $config = null; + /** + * The natural language speech audio. + * + * Generated from protobuf field bytes audio = 2; + */ + protected $audio = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $config + * Instructs the speech synthesizer how to generate the speech + * audio. + * @type string $audio + * The natural language speech audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Instructs the speech synthesizer how to generate the speech + * audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig config = 1; + * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Instructs the speech synthesizer how to generate the speech + * audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig config = 1; + * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); + $this->config = $var; + + return $this; + } + + /** + * The natural language speech audio. + * + * Generated from protobuf field bytes audio = 2; + * @return string + */ + public function getAudio() + { + return $this->audio; + } + + /** + * The natural language speech audio. + * + * Generated from protobuf field bytes audio = 2; + * @param string $var + * @return $this + */ + public function setAudio($var) + { + GPBUtil::checkString($var, False); + $this->audio = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioConfig.php new file mode 100644 index 000000000000..0380436645b2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioConfig.php @@ -0,0 +1,163 @@ +google.cloud.dialogflow.v2.OutputAudioConfig + */ +class OutputAudioConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Audio encoding of the synthesized audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $audio_encoding = 0; + /** + * The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). + * + * Generated from protobuf field int32 sample_rate_hertz = 2; + */ + protected $sample_rate_hertz = 0; + /** + * Configuration of how speech should be synthesized. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3; + */ + protected $synthesize_speech_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $audio_encoding + * Required. Audio encoding of the synthesized audio content. + * @type int $sample_rate_hertz + * The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). + * @type \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig $synthesize_speech_config + * Configuration of how speech should be synthesized. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Audio encoding of the synthesized audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAudioEncoding() + { + return $this->audio_encoding; + } + + /** + * Required. Audio encoding of the synthesized audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAudioEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\OutputAudioEncoding::class); + $this->audio_encoding = $var; + + return $this; + } + + /** + * The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). + * + * Generated from protobuf field int32 sample_rate_hertz = 2; + * @return int + */ + public function getSampleRateHertz() + { + return $this->sample_rate_hertz; + } + + /** + * The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). + * + * Generated from protobuf field int32 sample_rate_hertz = 2; + * @param int $var + * @return $this + */ + public function setSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->sample_rate_hertz = $var; + + return $this; + } + + /** + * Configuration of how speech should be synthesized. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3; + * @return \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig|null + */ + public function getSynthesizeSpeechConfig() + { + return $this->synthesize_speech_config; + } + + public function hasSynthesizeSpeechConfig() + { + return isset($this->synthesize_speech_config); + } + + public function clearSynthesizeSpeechConfig() + { + unset($this->synthesize_speech_config); + } + + /** + * Configuration of how speech should be synthesized. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3; + * @param \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig $var + * @return $this + */ + public function setSynthesizeSpeechConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig::class); + $this->synthesize_speech_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioEncoding.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioEncoding.php new file mode 100644 index 000000000000..b8821bce4def --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioEncoding.php @@ -0,0 +1,86 @@ +google.cloud.dialogflow.v2.OutputAudioEncoding + */ +class OutputAudioEncoding +{ + /** + * Not specified. + * + * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; + */ + const OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; + /** + * Uncompressed 16-bit signed little-endian samples (Linear PCM). + * Audio content returned as LINEAR16 also contains a WAV header. + * + * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; + */ + const OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; + /** + * MP3 audio at 32kbps. + * + * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_MP3 = 2; + */ + const OUTPUT_AUDIO_ENCODING_MP3 = 2; + /** + * MP3 audio at 64kbps. + * + * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; + */ + const OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; + /** + * Opus encoded audio wrapped in an ogg container. The result will be a + * file which can be played natively on Android, and in browsers (at least + * Chrome and Firefox). The quality of the encoding is considerably higher + * than MP3 while using approximately the same bitrate. + * + * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; + */ + const OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; + /** + * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + * + * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_MULAW = 5; + */ + const OUTPUT_AUDIO_ENCODING_MULAW = 5; + + private static $valueToName = [ + self::OUTPUT_AUDIO_ENCODING_UNSPECIFIED => 'OUTPUT_AUDIO_ENCODING_UNSPECIFIED', + self::OUTPUT_AUDIO_ENCODING_LINEAR_16 => 'OUTPUT_AUDIO_ENCODING_LINEAR_16', + self::OUTPUT_AUDIO_ENCODING_MP3 => 'OUTPUT_AUDIO_ENCODING_MP3', + self::OUTPUT_AUDIO_ENCODING_MP3_64_KBPS => 'OUTPUT_AUDIO_ENCODING_MP3_64_KBPS', + self::OUTPUT_AUDIO_ENCODING_OGG_OPUS => 'OUTPUT_AUDIO_ENCODING_OGG_OPUS', + self::OUTPUT_AUDIO_ENCODING_MULAW => 'OUTPUT_AUDIO_ENCODING_MULAW', + ]; + + 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant.php new file mode 100644 index 000000000000..a569536d5160 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant.php @@ -0,0 +1,387 @@ +google.cloud.dialogflow.v2.Participant + */ +class Participant extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique identifier of this participant. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Immutable. The role this participant plays in the conversation. This field + * must be set during participant creation and is then immutable. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $role = 0; + /** + * Optional. Label applied to streams representing this participant in SIPREC + * XML metadata and SDP. This is used to assign transcriptions from that + * media stream to this participant. This field can be updated. + * + * Generated from protobuf field string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sip_recording_media_label = ''; + /** + * Optional. Obfuscated user id that should be associated with the created + * participant. + * You can specify a user id as follows: + * 1. If you set this field in + * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] + * or + * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], + * Dialogflow adds the obfuscated user id with the participant. + * 2. If you set this field in + * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] + * or + * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], + * Dialogflow will update + * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. + * Dialogflow returns an error if you try to add a user id for a + * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] + * participant. + * Dialogflow uses this user id for billing and measurement purposes. For + * example, Dialogflow determines whether a user in one conversation returned + * in a later conversation. + * Note: + * * Please never pass raw user ids to Dialogflow. Always obfuscate your user + * id first. + * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a + * hash function like SHA-512. + * * The length of the user id must be <= 256 characters. + * + * Generated from protobuf field string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $obfuscated_external_user_id = ''; + /** + * Optional. Key-value filters on the metadata of documents returned by + * article suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * values for a metadata key should be concatenated by comma. For example, + * filters to match all documents that have 'US' or 'CA' in their market + * metadata values and 'agent' in their user metadata values will be + * ``` + * documents_metadata_filters { + * key: "market" + * value: "US,CA" + * } + * documents_metadata_filters { + * key: "user" + * value: "agent" + * } + * ``` + * + * Generated from protobuf field map documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $documents_metadata_filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. The unique identifier of this participant. + * Format: `projects//locations//conversations//participants/`. + * @type int $role + * Immutable. The role this participant plays in the conversation. This field + * must be set during participant creation and is then immutable. + * @type string $sip_recording_media_label + * Optional. Label applied to streams representing this participant in SIPREC + * XML metadata and SDP. This is used to assign transcriptions from that + * media stream to this participant. This field can be updated. + * @type string $obfuscated_external_user_id + * Optional. Obfuscated user id that should be associated with the created + * participant. + * You can specify a user id as follows: + * 1. If you set this field in + * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] + * or + * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], + * Dialogflow adds the obfuscated user id with the participant. + * 2. If you set this field in + * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] + * or + * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], + * Dialogflow will update + * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. + * Dialogflow returns an error if you try to add a user id for a + * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] + * participant. + * Dialogflow uses this user id for billing and measurement purposes. For + * example, Dialogflow determines whether a user in one conversation returned + * in a later conversation. + * Note: + * * Please never pass raw user ids to Dialogflow. Always obfuscate your user + * id first. + * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a + * hash function like SHA-512. + * * The length of the user id must be <= 256 characters. + * @type array|\Google\Protobuf\Internal\MapField $documents_metadata_filters + * Optional. Key-value filters on the metadata of documents returned by + * article suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * values for a metadata key should be concatenated by comma. For example, + * filters to match all documents that have 'US' or 'CA' in their market + * metadata values and 'agent' in their user metadata values will be + * ``` + * documents_metadata_filters { + * key: "market" + * value: "US,CA" + * } + * documents_metadata_filters { + * key: "user" + * value: "agent" + * } + * ``` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique identifier of this participant. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. The unique identifier of this participant. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. The role this participant plays in the conversation. This field + * must be set during participant creation and is then immutable. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getRole() + { + return $this->role; + } + + /** + * Immutable. The role this participant plays in the conversation. This field + * must be set during participant creation and is then immutable. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); + $this->role = $var; + + return $this; + } + + /** + * Optional. Label applied to streams representing this participant in SIPREC + * XML metadata and SDP. This is used to assign transcriptions from that + * media stream to this participant. This field can be updated. + * + * Generated from protobuf field string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSipRecordingMediaLabel() + { + return $this->sip_recording_media_label; + } + + /** + * Optional. Label applied to streams representing this participant in SIPREC + * XML metadata and SDP. This is used to assign transcriptions from that + * media stream to this participant. This field can be updated. + * + * Generated from protobuf field string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSipRecordingMediaLabel($var) + { + GPBUtil::checkString($var, True); + $this->sip_recording_media_label = $var; + + return $this; + } + + /** + * Optional. Obfuscated user id that should be associated with the created + * participant. + * You can specify a user id as follows: + * 1. If you set this field in + * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] + * or + * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], + * Dialogflow adds the obfuscated user id with the participant. + * 2. If you set this field in + * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] + * or + * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], + * Dialogflow will update + * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. + * Dialogflow returns an error if you try to add a user id for a + * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] + * participant. + * Dialogflow uses this user id for billing and measurement purposes. For + * example, Dialogflow determines whether a user in one conversation returned + * in a later conversation. + * Note: + * * Please never pass raw user ids to Dialogflow. Always obfuscate your user + * id first. + * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a + * hash function like SHA-512. + * * The length of the user id must be <= 256 characters. + * + * Generated from protobuf field string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getObfuscatedExternalUserId() + { + return $this->obfuscated_external_user_id; + } + + /** + * Optional. Obfuscated user id that should be associated with the created + * participant. + * You can specify a user id as follows: + * 1. If you set this field in + * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] + * or + * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], + * Dialogflow adds the obfuscated user id with the participant. + * 2. If you set this field in + * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] + * or + * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], + * Dialogflow will update + * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. + * Dialogflow returns an error if you try to add a user id for a + * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] + * participant. + * Dialogflow uses this user id for billing and measurement purposes. For + * example, Dialogflow determines whether a user in one conversation returned + * in a later conversation. + * Note: + * * Please never pass raw user ids to Dialogflow. Always obfuscate your user + * id first. + * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a + * hash function like SHA-512. + * * The length of the user id must be <= 256 characters. + * + * Generated from protobuf field string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setObfuscatedExternalUserId($var) + { + GPBUtil::checkString($var, True); + $this->obfuscated_external_user_id = $var; + + return $this; + } + + /** + * Optional. Key-value filters on the metadata of documents returned by + * article suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * values for a metadata key should be concatenated by comma. For example, + * filters to match all documents that have 'US' or 'CA' in their market + * metadata values and 'agent' in their user metadata values will be + * ``` + * documents_metadata_filters { + * key: "market" + * value: "US,CA" + * } + * documents_metadata_filters { + * key: "user" + * value: "agent" + * } + * ``` + * + * Generated from protobuf field map documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDocumentsMetadataFilters() + { + return $this->documents_metadata_filters; + } + + /** + * Optional. Key-value filters on the metadata of documents returned by + * article suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * values for a metadata key should be concatenated by comma. For example, + * filters to match all documents that have 'US' or 'CA' in their market + * metadata values and 'agent' in their user metadata values will be + * ``` + * documents_metadata_filters { + * key: "market" + * value: "US,CA" + * } + * documents_metadata_filters { + * key: "user" + * value: "agent" + * } + * ``` + * + * Generated from protobuf field map documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDocumentsMetadataFilters($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->documents_metadata_filters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant/Role.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant/Role.php new file mode 100644 index 000000000000..f2fe378e35fe --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant/Role.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.Participant.Role + */ +class Role +{ + /** + * Participant role 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, such as a Dialogflow agent. + * + * Generated from protobuf enum AUTOMATED_AGENT = 2; + */ + const AUTOMATED_AGENT = 2; + /** + * Participant is an end user that has called or chatted with + * Dialogflow services. + * + * Generated from protobuf enum END_USER = 3; + */ + const END_USER = 3; + + private static $valueToName = [ + self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', + self::HUMAN_AGENT => 'HUMAN_AGENT', + self::AUTOMATED_AGENT => 'AUTOMATED_AGENT', + self::END_USER => 'END_USER', + ]; + + 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\Dialogflow\V2\Participant_Role::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant_Role.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant_Role.php new file mode 100644 index 000000000000..7f777a48eb17 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant_Role.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Participants/CreateParticipant', + $argument, + ['\Google\Cloud\Dialogflow\V2\Participant', 'decode'], + $metadata, $options); + } + + /** + * Retrieves a conversation participant. + * @param \Google\Cloud\Dialogflow\V2\GetParticipantRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetParticipant(\Google\Cloud\Dialogflow\V2\GetParticipantRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/GetParticipant', + $argument, + ['\Google\Cloud\Dialogflow\V2\Participant', 'decode'], + $metadata, $options); + } + + /** + * Returns the list of all participants in the specified conversation. + * @param \Google\Cloud\Dialogflow\V2\ListParticipantsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListParticipants(\Google\Cloud\Dialogflow\V2\ListParticipantsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/ListParticipants', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListParticipantsResponse', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified participant. + * @param \Google\Cloud\Dialogflow\V2\UpdateParticipantRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateParticipant(\Google\Cloud\Dialogflow\V2\UpdateParticipantRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/UpdateParticipant', + $argument, + ['\Google\Cloud\Dialogflow\V2\Participant', 'decode'], + $metadata, $options); + } + + /** + * Adds a text (chat, for example), or audio (phone recording, for example) + * message from a participant into the conversation. + * + * Note: Always use agent versions for production traffic + * sent to virtual agents. See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @param \Google\Cloud\Dialogflow\V2\AnalyzeContentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AnalyzeContent(\Google\Cloud\Dialogflow\V2\AnalyzeContentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/AnalyzeContent', + $argument, + ['\Google\Cloud\Dialogflow\V2\AnalyzeContentResponse', 'decode'], + $metadata, $options); + } + + /** + * Adds a text (chat, for example), or audio (phone recording, for example) + * message from a participant into the conversation. + * Note: This method is only available through the gRPC API (not REST). + * + * The top-level message sent to the client by the server is + * `StreamingAnalyzeContentResponse`. Multiple response messages can be + * returned in order. The first one or more messages contain the + * `recognition_result` field. Each result represents a more complete + * transcript of what the user said. The next message contains the + * `reply_text` field and potentially the `reply_audio` field. The message can + * also contain the `automated_agent_reply` field. + * + * Note: Always use agent versions for production traffic + * sent to virtual agents. See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\BidiStreamingCall + */ + public function StreamingAnalyzeContent($metadata = [], $options = []) { + return $this->_bidiRequest('/google.cloud.dialogflow.v2.Participants/StreamingAnalyzeContent', + ['\Google\Cloud\Dialogflow\V2\StreamingAnalyzeContentResponse','decode'], + $metadata, $options); + } + + /** + * Gets suggested articles for a participant based on specific historical + * messages. + * @param \Google\Cloud\Dialogflow\V2\SuggestArticlesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SuggestArticles(\Google\Cloud\Dialogflow\V2\SuggestArticlesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/SuggestArticles', + $argument, + ['\Google\Cloud\Dialogflow\V2\SuggestArticlesResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets suggested faq answers for a participant based on specific historical + * messages. + * @param \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SuggestFaqAnswers(\Google\Cloud\Dialogflow\V2\SuggestFaqAnswersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/SuggestFaqAnswers', + $argument, + ['\Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets smart replies for a participant based on specific historical + * messages. + * @param \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SuggestSmartReplies(\Google\Cloud\Dialogflow\V2\SuggestSmartRepliesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/SuggestSmartReplies', + $argument, + ['\Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryInput.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryInput.php new file mode 100644 index 000000000000..dcb659ad299e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryInput.php @@ -0,0 +1,148 @@ +google.cloud.dialogflow.v2.QueryInput + */ +class QueryInput extends \Google\Protobuf\Internal\Message +{ + protected $input; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\InputAudioConfig $audio_config + * Instructs the speech recognizer how to process the speech audio. + * @type \Google\Cloud\Dialogflow\V2\TextInput $text + * The natural language text to be processed. Text length must not exceed + * 256 character for virtual agent interactions. + * @type \Google\Cloud\Dialogflow\V2\EventInput $event + * The event to be processed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * Instructs the speech recognizer how to process the speech audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 1; + * @return \Google\Cloud\Dialogflow\V2\InputAudioConfig|null + */ + public function getAudioConfig() + { + return $this->readOneof(1); + } + + public function hasAudioConfig() + { + return $this->hasOneof(1); + } + + /** + * Instructs the speech recognizer how to process the speech audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 1; + * @param \Google\Cloud\Dialogflow\V2\InputAudioConfig $var + * @return $this + */ + public function setAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputAudioConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The natural language text to be processed. Text length must not exceed + * 256 character for virtual agent interactions. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput text = 2; + * @return \Google\Cloud\Dialogflow\V2\TextInput|null + */ + public function getText() + { + return $this->readOneof(2); + } + + public function hasText() + { + return $this->hasOneof(2); + } + + /** + * The natural language text to be processed. Text length must not exceed + * 256 character for virtual agent interactions. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput text = 2; + * @param \Google\Cloud\Dialogflow\V2\TextInput $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextInput::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The event to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput event = 3; + * @return \Google\Cloud\Dialogflow\V2\EventInput|null + */ + public function getEvent() + { + return $this->readOneof(3); + } + + public function hasEvent() + { + return $this->hasOneof(3); + } + + /** + * The event to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput event = 3; + * @param \Google\Cloud\Dialogflow\V2\EventInput $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getInput() + { + return $this->whichOneof("input"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryParameters.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryParameters.php new file mode 100644 index 000000000000..f6469b8c6266 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryParameters.php @@ -0,0 +1,415 @@ +google.cloud.dialogflow.v2.QueryParameters + */ +class QueryParameters extends \Google\Protobuf\Internal\Message +{ + /** + * The time zone of this conversational query from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. If not provided, the time zone specified in + * agent settings is used. + * + * Generated from protobuf field string time_zone = 1; + */ + protected $time_zone = ''; + /** + * The geo location of this conversational query. + * + * Generated from protobuf field .google.type.LatLng geo_location = 2; + */ + protected $geo_location = null; + /** + * The collection of contexts to be activated before this query is + * executed. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 3; + */ + private $contexts; + /** + * Specifies whether to delete all contexts in the current session + * before the new ones are activated. + * + * Generated from protobuf field bool reset_contexts = 4; + */ + protected $reset_contexts = false; + /** + * Additional session entity types to replace or extend developer + * entity types with. The entity synonyms apply to all languages and persist + * for the session of this query. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5; + */ + private $session_entity_types; + /** + * This field can be used to pass custom data to your webhook. + * Arbitrary JSON objects are supported. + * If supplied, the value is used to populate the + * `WebhookRequest.original_detect_intent_request.payload` + * field sent to your webhook. + * + * Generated from protobuf field .google.protobuf.Struct payload = 6; + */ + protected $payload = null; + /** + * Configures the type of sentiment analysis to perform. If not + * provided, sentiment analysis is not performed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; + */ + protected $sentiment_analysis_request_config = null; + /** + * This field can be used to pass HTTP headers for a webhook + * call. These headers will be sent to webhook along with the headers that + * have been configured through the Dialogflow web console. The headers + * defined within this field will overwrite the headers configured through the + * Dialogflow console if there is a conflict. Header names are + * case-insensitive. Google's specified headers are not allowed. Including: + * "Host", "Content-Length", "Connection", "From", "User-Agent", + * "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", + * etc. + * + * Generated from protobuf field map webhook_headers = 14; + */ + private $webhook_headers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $time_zone + * The time zone of this conversational query from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. If not provided, the time zone specified in + * agent settings is used. + * @type \Google\Type\LatLng $geo_location + * The geo location of this conversational query. + * @type array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $contexts + * The collection of contexts to be activated before this query is + * executed. + * @type bool $reset_contexts + * Specifies whether to delete all contexts in the current session + * before the new ones are activated. + * @type array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $session_entity_types + * Additional session entity types to replace or extend developer + * entity types with. The entity synonyms apply to all languages and persist + * for the session of this query. + * @type \Google\Protobuf\Struct $payload + * This field can be used to pass custom data to your webhook. + * Arbitrary JSON objects are supported. + * If supplied, the value is used to populate the + * `WebhookRequest.original_detect_intent_request.payload` + * field sent to your webhook. + * @type \Google\Cloud\Dialogflow\V2\SentimentAnalysisRequestConfig $sentiment_analysis_request_config + * Configures the type of sentiment analysis to perform. If not + * provided, sentiment analysis is not performed. + * @type array|\Google\Protobuf\Internal\MapField $webhook_headers + * This field can be used to pass HTTP headers for a webhook + * call. These headers will be sent to webhook along with the headers that + * have been configured through the Dialogflow web console. The headers + * defined within this field will overwrite the headers configured through the + * Dialogflow console if there is a conflict. Header names are + * case-insensitive. Google's specified headers are not allowed. Including: + * "Host", "Content-Length", "Connection", "From", "User-Agent", + * "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", + * etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * The time zone of this conversational query from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. If not provided, the time zone specified in + * agent settings is used. + * + * Generated from protobuf field string time_zone = 1; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * The time zone of this conversational query from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. If not provided, the time zone specified in + * agent settings is used. + * + * Generated from protobuf field string time_zone = 1; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * The geo location of this conversational query. + * + * Generated from protobuf field .google.type.LatLng geo_location = 2; + * @return \Google\Type\LatLng|null + */ + public function getGeoLocation() + { + return $this->geo_location; + } + + public function hasGeoLocation() + { + return isset($this->geo_location); + } + + public function clearGeoLocation() + { + unset($this->geo_location); + } + + /** + * The geo location of this conversational query. + * + * Generated from protobuf field .google.type.LatLng geo_location = 2; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setGeoLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->geo_location = $var; + + return $this; + } + + /** + * The collection of contexts to be activated before this query is + * executed. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContexts() + { + return $this->contexts; + } + + /** + * The collection of contexts to be activated before this query is + * executed. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 3; + * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); + $this->contexts = $arr; + + return $this; + } + + /** + * Specifies whether to delete all contexts in the current session + * before the new ones are activated. + * + * Generated from protobuf field bool reset_contexts = 4; + * @return bool + */ + public function getResetContexts() + { + return $this->reset_contexts; + } + + /** + * Specifies whether to delete all contexts in the current session + * before the new ones are activated. + * + * Generated from protobuf field bool reset_contexts = 4; + * @param bool $var + * @return $this + */ + public function setResetContexts($var) + { + GPBUtil::checkBool($var); + $this->reset_contexts = $var; + + return $this; + } + + /** + * Additional session entity types to replace or extend developer + * entity types with. The entity synonyms apply to all languages and persist + * for the session of this query. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSessionEntityTypes() + { + return $this->session_entity_types; + } + + /** + * Additional session entity types to replace or extend developer + * entity types with. The entity synonyms apply to all languages and persist + * for the session of this query. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5; + * @param array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSessionEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); + $this->session_entity_types = $arr; + + return $this; + } + + /** + * This field can be used to pass custom data to your webhook. + * Arbitrary JSON objects are supported. + * If supplied, the value is used to populate the + * `WebhookRequest.original_detect_intent_request.payload` + * field sent to your webhook. + * + * Generated from protobuf field .google.protobuf.Struct payload = 6; + * @return \Google\Protobuf\Struct|null + */ + public function getPayload() + { + return $this->payload; + } + + public function hasPayload() + { + return isset($this->payload); + } + + public function clearPayload() + { + unset($this->payload); + } + + /** + * This field can be used to pass custom data to your webhook. + * Arbitrary JSON objects are supported. + * If supplied, the value is used to populate the + * `WebhookRequest.original_detect_intent_request.payload` + * field sent to your webhook. + * + * Generated from protobuf field .google.protobuf.Struct payload = 6; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->payload = $var; + + return $this; + } + + /** + * Configures the type of sentiment analysis to perform. If not + * provided, sentiment analysis is not performed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; + * @return \Google\Cloud\Dialogflow\V2\SentimentAnalysisRequestConfig|null + */ + public function getSentimentAnalysisRequestConfig() + { + return $this->sentiment_analysis_request_config; + } + + public function hasSentimentAnalysisRequestConfig() + { + return isset($this->sentiment_analysis_request_config); + } + + public function clearSentimentAnalysisRequestConfig() + { + unset($this->sentiment_analysis_request_config); + } + + /** + * Configures the type of sentiment analysis to perform. If not + * provided, sentiment analysis is not performed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; + * @param \Google\Cloud\Dialogflow\V2\SentimentAnalysisRequestConfig $var + * @return $this + */ + public function setSentimentAnalysisRequestConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SentimentAnalysisRequestConfig::class); + $this->sentiment_analysis_request_config = $var; + + return $this; + } + + /** + * This field can be used to pass HTTP headers for a webhook + * call. These headers will be sent to webhook along with the headers that + * have been configured through the Dialogflow web console. The headers + * defined within this field will overwrite the headers configured through the + * Dialogflow console if there is a conflict. Header names are + * case-insensitive. Google's specified headers are not allowed. Including: + * "Host", "Content-Length", "Connection", "From", "User-Agent", + * "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", + * etc. + * + * Generated from protobuf field map webhook_headers = 14; + * @return \Google\Protobuf\Internal\MapField + */ + public function getWebhookHeaders() + { + return $this->webhook_headers; + } + + /** + * This field can be used to pass HTTP headers for a webhook + * call. These headers will be sent to webhook along with the headers that + * have been configured through the Dialogflow web console. The headers + * defined within this field will overwrite the headers configured through the + * Dialogflow console if there is a conflict. Header names are + * case-insensitive. Google's specified headers are not allowed. Including: + * "Host", "Content-Length", "Connection", "From", "User-Agent", + * "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", + * etc. + * + * Generated from protobuf field map webhook_headers = 14; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setWebhookHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->webhook_headers = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryResult.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryResult.php new file mode 100644 index 000000000000..f78289af3d1b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryResult.php @@ -0,0 +1,855 @@ +google.cloud.dialogflow.v2.QueryResult + */ +class QueryResult extends \Google\Protobuf\Internal\Message +{ + /** + * The original conversational query text: + * - If natural language text was provided as input, `query_text` contains + * a copy of the input. + * - If natural language speech audio was provided as input, `query_text` + * contains the speech recognition result. If speech recognizer produced + * multiple alternatives, a particular one is picked. + * - If automatic spell correction is enabled, `query_text` will contain the + * corrected user input. + * + * Generated from protobuf field string query_text = 1; + */ + protected $query_text = ''; + /** + * The language that was triggered during intent detection. + * See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 15; + */ + protected $language_code = ''; + /** + * The Speech recognition confidence between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. The default of 0.0 is a sentinel value indicating that confidence + * was not set. + * This field is not guaranteed to be accurate or set. In particular this + * field isn't set for StreamingDetectIntent since the streaming endpoint has + * separate confidence estimates per portion of the audio in + * StreamingRecognitionResult. + * + * Generated from protobuf field float speech_recognition_confidence = 2; + */ + protected $speech_recognition_confidence = 0.0; + /** + * The action name from the matched intent. + * + * Generated from protobuf field string action = 3; + */ + protected $action = ''; + /** + * The collection of extracted parameters. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * + * Generated from protobuf field .google.protobuf.Struct parameters = 4; + */ + protected $parameters = null; + /** + * This field is set to: + * - `false` if the matched intent has required parameters and not all of + * the required parameter values have been collected. + * - `true` if all required parameter values have been collected, or if the + * matched intent doesn't contain any required parameters. + * + * Generated from protobuf field bool all_required_params_present = 5; + */ + protected $all_required_params_present = false; + /** + * Indicates whether the conversational query triggers a cancellation for slot + * filling. For more information, see the [cancel slot filling + * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). + * + * Generated from protobuf field bool cancels_slot_filling = 21; + */ + protected $cancels_slot_filling = false; + /** + * The text to be pronounced to the user or shown on the screen. + * Note: This is a legacy field, `fulfillment_messages` should be preferred. + * + * Generated from protobuf field string fulfillment_text = 6; + */ + protected $fulfillment_text = ''; + /** + * The collection of rich messages to present to the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7; + */ + private $fulfillment_messages; + /** + * If the query was fulfilled by a webhook call, this field is set to the + * value of the `source` field returned in the webhook response. + * + * Generated from protobuf field string webhook_source = 8; + */ + protected $webhook_source = ''; + /** + * If the query was fulfilled by a webhook call, this field is set to the + * value of the `payload` field returned in the webhook response. + * + * Generated from protobuf field .google.protobuf.Struct webhook_payload = 9; + */ + protected $webhook_payload = null; + /** + * The collection of output contexts. If applicable, + * `output_contexts.parameters` contains entries with name + * `.original` containing the original parameter values + * before the query. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 10; + */ + private $output_contexts; + /** + * The intent that matched the conversational query. Some, not + * all fields are filled in this message, including but not limited to: + * `name`, `display_name`, `end_interaction` and `is_fallback`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 11; + */ + protected $intent = null; + /** + * The intent detection confidence. Values range from 0.0 + * (completely uncertain) to 1.0 (completely certain). + * This value is for informational purpose only and is only used to + * help match the best intent within the classification threshold. + * This value may change for the same end-user expression at any time due to a + * model retraining or change in implementation. + * If there are `multiple knowledge_answers` messages, this value is set to + * the greatest `knowledgeAnswers.match_confidence` value in the list. + * + * Generated from protobuf field float intent_detection_confidence = 12; + */ + protected $intent_detection_confidence = 0.0; + /** + * Free-form diagnostic information for the associated detect intent request. + * The fields of this data can change without notice, so you should not write + * code that depends on its structure. + * The data may contain: + * - webhook call latency + * - webhook errors + * + * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 14; + */ + protected $diagnostic_info = null; + /** + * The sentiment analysis result, which depends on the + * `sentiment_analysis_request_config` specified in the request. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; + */ + protected $sentiment_analysis_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query_text + * The original conversational query text: + * - If natural language text was provided as input, `query_text` contains + * a copy of the input. + * - If natural language speech audio was provided as input, `query_text` + * contains the speech recognition result. If speech recognizer produced + * multiple alternatives, a particular one is picked. + * - If automatic spell correction is enabled, `query_text` will contain the + * corrected user input. + * @type string $language_code + * The language that was triggered during intent detection. + * See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. + * @type float $speech_recognition_confidence + * The Speech recognition confidence between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. The default of 0.0 is a sentinel value indicating that confidence + * was not set. + * This field is not guaranteed to be accurate or set. In particular this + * field isn't set for StreamingDetectIntent since the streaming endpoint has + * separate confidence estimates per portion of the audio in + * StreamingRecognitionResult. + * @type string $action + * The action name from the matched intent. + * @type \Google\Protobuf\Struct $parameters + * The collection of extracted parameters. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * @type bool $all_required_params_present + * This field is set to: + * - `false` if the matched intent has required parameters and not all of + * the required parameter values have been collected. + * - `true` if all required parameter values have been collected, or if the + * matched intent doesn't contain any required parameters. + * @type bool $cancels_slot_filling + * Indicates whether the conversational query triggers a cancellation for slot + * filling. For more information, see the [cancel slot filling + * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). + * @type string $fulfillment_text + * The text to be pronounced to the user or shown on the screen. + * Note: This is a legacy field, `fulfillment_messages` should be preferred. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $fulfillment_messages + * The collection of rich messages to present to the user. + * @type string $webhook_source + * If the query was fulfilled by a webhook call, this field is set to the + * value of the `source` field returned in the webhook response. + * @type \Google\Protobuf\Struct $webhook_payload + * If the query was fulfilled by a webhook call, this field is set to the + * value of the `payload` field returned in the webhook response. + * @type array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $output_contexts + * The collection of output contexts. If applicable, + * `output_contexts.parameters` contains entries with name + * `.original` containing the original parameter values + * before the query. + * @type \Google\Cloud\Dialogflow\V2\Intent $intent + * The intent that matched the conversational query. Some, not + * all fields are filled in this message, including but not limited to: + * `name`, `display_name`, `end_interaction` and `is_fallback`. + * @type float $intent_detection_confidence + * The intent detection confidence. Values range from 0.0 + * (completely uncertain) to 1.0 (completely certain). + * This value is for informational purpose only and is only used to + * help match the best intent within the classification threshold. + * This value may change for the same end-user expression at any time due to a + * model retraining or change in implementation. + * If there are `multiple knowledge_answers` messages, this value is set to + * the greatest `knowledgeAnswers.match_confidence` value in the list. + * @type \Google\Protobuf\Struct $diagnostic_info + * Free-form diagnostic information for the associated detect intent request. + * The fields of this data can change without notice, so you should not write + * code that depends on its structure. + * The data may contain: + * - webhook call latency + * - webhook errors + * @type \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult $sentiment_analysis_result + * The sentiment analysis result, which depends on the + * `sentiment_analysis_request_config` specified in the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * The original conversational query text: + * - If natural language text was provided as input, `query_text` contains + * a copy of the input. + * - If natural language speech audio was provided as input, `query_text` + * contains the speech recognition result. If speech recognizer produced + * multiple alternatives, a particular one is picked. + * - If automatic spell correction is enabled, `query_text` will contain the + * corrected user input. + * + * Generated from protobuf field string query_text = 1; + * @return string + */ + public function getQueryText() + { + return $this->query_text; + } + + /** + * The original conversational query text: + * - If natural language text was provided as input, `query_text` contains + * a copy of the input. + * - If natural language speech audio was provided as input, `query_text` + * contains the speech recognition result. If speech recognizer produced + * multiple alternatives, a particular one is picked. + * - If automatic spell correction is enabled, `query_text` will contain the + * corrected user input. + * + * Generated from protobuf field string query_text = 1; + * @param string $var + * @return $this + */ + public function setQueryText($var) + { + GPBUtil::checkString($var, True); + $this->query_text = $var; + + return $this; + } + + /** + * The language that was triggered during intent detection. + * See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 15; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language that was triggered during intent detection. + * See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 15; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The Speech recognition confidence between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. The default of 0.0 is a sentinel value indicating that confidence + * was not set. + * This field is not guaranteed to be accurate or set. In particular this + * field isn't set for StreamingDetectIntent since the streaming endpoint has + * separate confidence estimates per portion of the audio in + * StreamingRecognitionResult. + * + * Generated from protobuf field float speech_recognition_confidence = 2; + * @return float + */ + public function getSpeechRecognitionConfidence() + { + return $this->speech_recognition_confidence; + } + + /** + * The Speech recognition confidence between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. The default of 0.0 is a sentinel value indicating that confidence + * was not set. + * This field is not guaranteed to be accurate or set. In particular this + * field isn't set for StreamingDetectIntent since the streaming endpoint has + * separate confidence estimates per portion of the audio in + * StreamingRecognitionResult. + * + * Generated from protobuf field float speech_recognition_confidence = 2; + * @param float $var + * @return $this + */ + public function setSpeechRecognitionConfidence($var) + { + GPBUtil::checkFloat($var); + $this->speech_recognition_confidence = $var; + + return $this; + } + + /** + * The action name from the matched intent. + * + * Generated from protobuf field string action = 3; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * The action name from the matched intent. + * + * Generated from protobuf field string action = 3; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + + /** + * The collection of extracted parameters. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * + * Generated from protobuf field .google.protobuf.Struct parameters = 4; + * @return \Google\Protobuf\Struct|null + */ + public function getParameters() + { + return $this->parameters; + } + + public function hasParameters() + { + return isset($this->parameters); + } + + public function clearParameters() + { + unset($this->parameters); + } + + /** + * The collection of extracted parameters. + * Depending on your protocol or client library language, this is a + * map, associative array, symbol table, dictionary, or JSON object + * composed of a collection of (MapKey, MapValue) pairs: + * - MapKey type: string + * - MapKey value: parameter name + * - MapValue type: + * - If parameter's entity type is a composite entity: map + * - Else: depending on parameter value type, could be one of string, + * number, boolean, null, list or map + * - MapValue value: + * - If parameter's entity type is a composite entity: + * map from composite entity property names to property values + * - Else: parameter value + * + * Generated from protobuf field .google.protobuf.Struct parameters = 4; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->parameters = $var; + + return $this; + } + + /** + * This field is set to: + * - `false` if the matched intent has required parameters and not all of + * the required parameter values have been collected. + * - `true` if all required parameter values have been collected, or if the + * matched intent doesn't contain any required parameters. + * + * Generated from protobuf field bool all_required_params_present = 5; + * @return bool + */ + public function getAllRequiredParamsPresent() + { + return $this->all_required_params_present; + } + + /** + * This field is set to: + * - `false` if the matched intent has required parameters and not all of + * the required parameter values have been collected. + * - `true` if all required parameter values have been collected, or if the + * matched intent doesn't contain any required parameters. + * + * Generated from protobuf field bool all_required_params_present = 5; + * @param bool $var + * @return $this + */ + public function setAllRequiredParamsPresent($var) + { + GPBUtil::checkBool($var); + $this->all_required_params_present = $var; + + return $this; + } + + /** + * Indicates whether the conversational query triggers a cancellation for slot + * filling. For more information, see the [cancel slot filling + * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). + * + * Generated from protobuf field bool cancels_slot_filling = 21; + * @return bool + */ + public function getCancelsSlotFilling() + { + return $this->cancels_slot_filling; + } + + /** + * Indicates whether the conversational query triggers a cancellation for slot + * filling. For more information, see the [cancel slot filling + * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). + * + * Generated from protobuf field bool cancels_slot_filling = 21; + * @param bool $var + * @return $this + */ + public function setCancelsSlotFilling($var) + { + GPBUtil::checkBool($var); + $this->cancels_slot_filling = $var; + + return $this; + } + + /** + * The text to be pronounced to the user or shown on the screen. + * Note: This is a legacy field, `fulfillment_messages` should be preferred. + * + * Generated from protobuf field string fulfillment_text = 6; + * @return string + */ + public function getFulfillmentText() + { + return $this->fulfillment_text; + } + + /** + * The text to be pronounced to the user or shown on the screen. + * Note: This is a legacy field, `fulfillment_messages` should be preferred. + * + * Generated from protobuf field string fulfillment_text = 6; + * @param string $var + * @return $this + */ + public function setFulfillmentText($var) + { + GPBUtil::checkString($var, True); + $this->fulfillment_text = $var; + + return $this; + } + + /** + * The collection of rich messages to present to the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFulfillmentMessages() + { + return $this->fulfillment_messages; + } + + /** + * The collection of rich messages to present to the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFulfillmentMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message::class); + $this->fulfillment_messages = $arr; + + return $this; + } + + /** + * If the query was fulfilled by a webhook call, this field is set to the + * value of the `source` field returned in the webhook response. + * + * Generated from protobuf field string webhook_source = 8; + * @return string + */ + public function getWebhookSource() + { + return $this->webhook_source; + } + + /** + * If the query was fulfilled by a webhook call, this field is set to the + * value of the `source` field returned in the webhook response. + * + * Generated from protobuf field string webhook_source = 8; + * @param string $var + * @return $this + */ + public function setWebhookSource($var) + { + GPBUtil::checkString($var, True); + $this->webhook_source = $var; + + return $this; + } + + /** + * If the query was fulfilled by a webhook call, this field is set to the + * value of the `payload` field returned in the webhook response. + * + * Generated from protobuf field .google.protobuf.Struct webhook_payload = 9; + * @return \Google\Protobuf\Struct|null + */ + public function getWebhookPayload() + { + return $this->webhook_payload; + } + + public function hasWebhookPayload() + { + return isset($this->webhook_payload); + } + + public function clearWebhookPayload() + { + unset($this->webhook_payload); + } + + /** + * If the query was fulfilled by a webhook call, this field is set to the + * value of the `payload` field returned in the webhook response. + * + * Generated from protobuf field .google.protobuf.Struct webhook_payload = 9; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setWebhookPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->webhook_payload = $var; + + return $this; + } + + /** + * The collection of output contexts. If applicable, + * `output_contexts.parameters` contains entries with name + * `.original` containing the original parameter values + * before the query. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOutputContexts() + { + return $this->output_contexts; + } + + /** + * The collection of output contexts. If applicable, + * `output_contexts.parameters` contains entries with name + * `.original` containing the original parameter values + * before the query. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 10; + * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOutputContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); + $this->output_contexts = $arr; + + return $this; + } + + /** + * The intent that matched the conversational query. Some, not + * all fields are filled in this message, including but not limited to: + * `name`, `display_name`, `end_interaction` and `is_fallback`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 11; + * @return \Google\Cloud\Dialogflow\V2\Intent|null + */ + public function getIntent() + { + return $this->intent; + } + + public function hasIntent() + { + return isset($this->intent); + } + + public function clearIntent() + { + unset($this->intent); + } + + /** + * The intent that matched the conversational query. Some, not + * all fields are filled in this message, including but not limited to: + * `name`, `display_name`, `end_interaction` and `is_fallback`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 11; + * @param \Google\Cloud\Dialogflow\V2\Intent $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent::class); + $this->intent = $var; + + return $this; + } + + /** + * The intent detection confidence. Values range from 0.0 + * (completely uncertain) to 1.0 (completely certain). + * This value is for informational purpose only and is only used to + * help match the best intent within the classification threshold. + * This value may change for the same end-user expression at any time due to a + * model retraining or change in implementation. + * If there are `multiple knowledge_answers` messages, this value is set to + * the greatest `knowledgeAnswers.match_confidence` value in the list. + * + * Generated from protobuf field float intent_detection_confidence = 12; + * @return float + */ + public function getIntentDetectionConfidence() + { + return $this->intent_detection_confidence; + } + + /** + * The intent detection confidence. Values range from 0.0 + * (completely uncertain) to 1.0 (completely certain). + * This value is for informational purpose only and is only used to + * help match the best intent within the classification threshold. + * This value may change for the same end-user expression at any time due to a + * model retraining or change in implementation. + * If there are `multiple knowledge_answers` messages, this value is set to + * the greatest `knowledgeAnswers.match_confidence` value in the list. + * + * Generated from protobuf field float intent_detection_confidence = 12; + * @param float $var + * @return $this + */ + public function setIntentDetectionConfidence($var) + { + GPBUtil::checkFloat($var); + $this->intent_detection_confidence = $var; + + return $this; + } + + /** + * Free-form diagnostic information for the associated detect intent request. + * The fields of this data can change without notice, so you should not write + * code that depends on its structure. + * The data may contain: + * - webhook call latency + * - webhook errors + * + * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 14; + * @return \Google\Protobuf\Struct|null + */ + public function getDiagnosticInfo() + { + return $this->diagnostic_info; + } + + public function hasDiagnosticInfo() + { + return isset($this->diagnostic_info); + } + + public function clearDiagnosticInfo() + { + unset($this->diagnostic_info); + } + + /** + * Free-form diagnostic information for the associated detect intent request. + * The fields of this data can change without notice, so you should not write + * code that depends on its structure. + * The data may contain: + * - webhook call latency + * - webhook errors + * + * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 14; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setDiagnosticInfo($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->diagnostic_info = $var; + + return $this; + } + + /** + * The sentiment analysis result, which depends on the + * `sentiment_analysis_request_config` specified in the request. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; + * @return \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult|null + */ + public function getSentimentAnalysisResult() + { + return $this->sentiment_analysis_result; + } + + public function hasSentimentAnalysisResult() + { + return isset($this->sentiment_analysis_result); + } + + public function clearSentimentAnalysisResult() + { + unset($this->sentiment_analysis_result); + } + + /** + * The sentiment analysis result, which depends on the + * `sentiment_analysis_request_config` specified in the request. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; + * @param \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult $var + * @return $this + */ + public function setSentimentAnalysisResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult::class); + $this->sentiment_analysis_result = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ReloadDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ReloadDocumentRequest.php new file mode 100644 index 000000000000..a3f8f6bec78f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ReloadDocumentRequest.php @@ -0,0 +1,203 @@ +google.cloud.dialogflow.v2.ReloadDocumentRequest + */ +class ReloadDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the document to reload. + * Format: `projects//locations//knowledgeBases//documents/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * + * Generated from protobuf field bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $import_gcs_custom_metadata = false; + /** + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. + * + * Generated from protobuf field bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $smart_messaging_partial_update = false; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the document to reload. + * Format: `projects//locations//knowledgeBases//documents/` + * @type string $content_uri + * Optional. The path of gcs source file for reloading document content. For + * now, only gcs uri is supported. + * For documents stored in Google Cloud Storage, these URIs must have + * the form `gs:///`. + * @type bool $import_gcs_custom_metadata + * Optional. Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * @type bool $smart_messaging_partial_update + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the document to reload. + * Format: `projects//locations//knowledgeBases//documents/` + * + * 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 document to reload. + * Format: `projects//locations//knowledgeBases//documents/` + * + * 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; + } + + /** + * Optional. The path of gcs source file for reloading document content. For + * now, only gcs uri is supported. + * For documents stored in Google Cloud Storage, these URIs must have + * the form `gs:///`. + * + * Generated from protobuf field string content_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getContentUri() + { + return $this->readOneof(3); + } + + public function hasContentUri() + { + return $this->hasOneof(3); + } + + /** + * Optional. The path of gcs source file for reloading document content. For + * now, only gcs uri is supported. + * For documents stored in Google Cloud Storage, these URIs must have + * the form `gs:///`. + * + * Generated from protobuf field string content_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setContentUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * + * Generated from protobuf field bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getImportGcsCustomMetadata() + { + return $this->import_gcs_custom_metadata; + } + + /** + * Optional. Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * + * Generated from protobuf field bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setImportGcsCustomMetadata($var) + { + GPBUtil::checkBool($var); + $this->import_gcs_custom_metadata = $var; + + return $this; + } + + /** + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. + * + * Generated from protobuf field bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSmartMessagingPartialUpdate() + { + return $this->smart_messaging_partial_update; + } + + /** + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. + * + * Generated from protobuf field bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSmartMessagingPartialUpdate($var) + { + GPBUtil::checkBool($var); + $this->smart_messaging_partial_update = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/RestoreAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/RestoreAgentRequest.php new file mode 100644 index 000000000000..19fa9863b9cd --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/RestoreAgentRequest.php @@ -0,0 +1,165 @@ +google.cloud.dialogflow.v2.RestoreAgentRequest + */ +class RestoreAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that the agent to restore is associated with. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + protected $agent; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project that the agent to restore is associated with. + * Format: `projects/`. + * @type string $agent_uri + * The URI to a Google Cloud Storage file containing the agent to restore. + * Note: The URI must start with "gs://". + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * @type string $agent_content + * Zip compressed raw byte content for agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that the agent to restore is associated with. + * Format: `projects/`. + * + * 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 project that the agent to restore is associated with. + * Format: `projects/`. + * + * 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 URI to a Google Cloud Storage file containing the agent to restore. + * Note: The URI must start with "gs://". + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * + * Generated from protobuf field string agent_uri = 2; + * @return string + */ + public function getAgentUri() + { + return $this->readOneof(2); + } + + public function hasAgentUri() + { + return $this->hasOneof(2); + } + + /** + * The URI to a Google Cloud Storage file containing the agent to restore. + * Note: The URI must start with "gs://". + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * + * Generated from protobuf field string agent_uri = 2; + * @param string $var + * @return $this + */ + public function setAgentUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Zip compressed raw byte content for agent. + * + * Generated from protobuf field bytes agent_content = 3; + * @return string + */ + public function getAgentContent() + { + return $this->readOneof(3); + } + + public function hasAgentContent() + { + return $this->hasOneof(3); + } + + /** + * Zip compressed raw byte content for agent. + * + * Generated from protobuf field bytes agent_content = 3; + * @param string $var + * @return $this + */ + public function setAgentContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getAgent() + { + return $this->whichOneof("agent"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsRequest.php new file mode 100644 index 000000000000..2b771e40ae28 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsRequest.php @@ -0,0 +1,144 @@ +google.cloud.dialogflow.v2.SearchAgentsRequest + */ +class SearchAgentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to list agents from. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to list agents from. + * Format: `projects/`. + * @type int $page_size + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to list agents from. + * Format: `projects/`. + * + * 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 project to list agents from. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous list request. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsResponse.php new file mode 100644 index 000000000000..65b54935d344 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.v2.SearchAgentsResponse + */ +class SearchAgentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of agents. There will be a maximum number of items returned based + * on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Agent agents = 1; + */ + private $agents; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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\Dialogflow\V2\Agent>|\Google\Protobuf\Internal\RepeatedField $agents + * The list of agents. There will be a maximum number of items returned based + * on the page_size field in the request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * The list of agents. There will be a maximum number of items returned based + * on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Agent agents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAgents() + { + return $this->agents; + } + + /** + * The list of agents. There will be a maximum number of items returned based + * on the page_size field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Agent agents = 1; + * @param array<\Google\Cloud\Dialogflow\V2\Agent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAgents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Agent::class); + $this->agents = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Sentiment.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Sentiment.php new file mode 100644 index 000000000000..2fb6df49acb2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Sentiment.php @@ -0,0 +1,112 @@ +google.cloud.dialogflow.v2.Sentiment + */ +class Sentiment extends \Google\Protobuf\Internal\Message +{ + /** + * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + * sentiment). + * + * Generated from protobuf field float score = 1; + */ + protected $score = 0.0; + /** + * A non-negative number in the [0, +inf) range, which represents the absolute + * magnitude of sentiment, regardless of score (positive or negative). + * + * Generated from protobuf field float magnitude = 2; + */ + protected $magnitude = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + * sentiment). + * @type float $magnitude + * A non-negative number in the [0, +inf) range, which represents the absolute + * magnitude of sentiment, regardless of score (positive or negative). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + * sentiment). + * + * Generated from protobuf field float score = 1; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + * sentiment). + * + * Generated from protobuf field float score = 1; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * A non-negative number in the [0, +inf) range, which represents the absolute + * magnitude of sentiment, regardless of score (positive or negative). + * + * Generated from protobuf field float magnitude = 2; + * @return float + */ + public function getMagnitude() + { + return $this->magnitude; + } + + /** + * A non-negative number in the [0, +inf) range, which represents the absolute + * magnitude of sentiment, regardless of score (positive or negative). + * + * Generated from protobuf field float magnitude = 2; + * @param float $var + * @return $this + */ + public function setMagnitude($var) + { + GPBUtil::checkFloat($var); + $this->magnitude = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisRequestConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisRequestConfig.php new file mode 100644 index 000000000000..996d88c8c1f7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisRequestConfig.php @@ -0,0 +1,75 @@ +google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig + */ +class SentimentAnalysisRequestConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Instructs the service to perform sentiment analysis on + * `query_text`. If not provided, sentiment analysis is not performed on + * `query_text`. + * + * Generated from protobuf field bool analyze_query_text_sentiment = 1; + */ + protected $analyze_query_text_sentiment = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $analyze_query_text_sentiment + * Instructs the service to perform sentiment analysis on + * `query_text`. If not provided, sentiment analysis is not performed on + * `query_text`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * Instructs the service to perform sentiment analysis on + * `query_text`. If not provided, sentiment analysis is not performed on + * `query_text`. + * + * Generated from protobuf field bool analyze_query_text_sentiment = 1; + * @return bool + */ + public function getAnalyzeQueryTextSentiment() + { + return $this->analyze_query_text_sentiment; + } + + /** + * Instructs the service to perform sentiment analysis on + * `query_text`. If not provided, sentiment analysis is not performed on + * `query_text`. + * + * Generated from protobuf field bool analyze_query_text_sentiment = 1; + * @param bool $var + * @return $this + */ + public function setAnalyzeQueryTextSentiment($var) + { + GPBUtil::checkBool($var); + $this->analyze_query_text_sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisResult.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisResult.php new file mode 100644 index 000000000000..a6e582c0eafb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisResult.php @@ -0,0 +1,89 @@ +google.cloud.dialogflow.v2.SentimentAnalysisResult + */ +class SentimentAnalysisResult extends \Google\Protobuf\Internal\Message +{ + /** + * The sentiment analysis result for `query_text`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Sentiment query_text_sentiment = 1; + */ + protected $query_text_sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Sentiment $query_text_sentiment + * The sentiment analysis result for `query_text`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * The sentiment analysis result for `query_text`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Sentiment query_text_sentiment = 1; + * @return \Google\Cloud\Dialogflow\V2\Sentiment|null + */ + public function getQueryTextSentiment() + { + return $this->query_text_sentiment; + } + + public function hasQueryTextSentiment() + { + return isset($this->query_text_sentiment); + } + + public function clearQueryTextSentiment() + { + unset($this->query_text_sentiment); + } + + /** + * The sentiment analysis result for `query_text`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Sentiment query_text_sentiment = 1; + * @param \Google\Cloud\Dialogflow\V2\Sentiment $var + * @return $this + */ + public function setQueryTextSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Sentiment::class); + $this->query_text_sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType.php new file mode 100644 index 000000000000..2e6fedf0262d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType.php @@ -0,0 +1,181 @@ +google.cloud.dialogflow.v2.SessionEntityType + */ +class SessionEntityType extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of this session entity type. Format: + * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * `` must be the display name of an existing entity + * type in the same agent that will be overridden or supplemented. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. Indicates whether the additional data should override or + * supplement the custom entity type definition. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_override_mode = 0; + /** + * Required. The collection of entities associated with this session entity + * type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entities; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique identifier of this session entity type. Format: + * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * `` must be the display name of an existing entity + * type in the same agent that will be overridden or supplemented. + * @type int $entity_override_mode + * Required. Indicates whether the additional data should override or + * supplement the custom entity type definition. + * @type array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * Required. The collection of entities associated with this session entity + * type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of this session entity type. Format: + * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * `` must be the display name of an existing entity + * type in the same agent that will be overridden or supplemented. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique identifier of this session entity type. Format: + * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * `` must be the display name of an existing entity + * type in the same agent that will be overridden or supplemented. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Indicates whether the additional data should override or + * supplement the custom entity type definition. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getEntityOverrideMode() + { + return $this->entity_override_mode; + } + + /** + * Required. Indicates whether the additional data should override or + * supplement the custom entity type definition. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setEntityOverrideMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SessionEntityType\EntityOverrideMode::class); + $this->entity_override_mode = $var; + + return $this; + } + + /** + * Required. The collection of entities associated with this session entity + * type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * Required. The collection of entities associated with this session entity + * type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType\Entity::class); + $this->entities = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType/EntityOverrideMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType/EntityOverrideMode.php new file mode 100644 index 000000000000..7d3d5edc239d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType/EntityOverrideMode.php @@ -0,0 +1,73 @@ +google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode + */ +class EntityOverrideMode +{ + /** + * Not specified. This value should be never used. + * + * Generated from protobuf enum ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; + */ + const ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; + /** + * The collection of session entities overrides the collection of entities + * in the corresponding custom entity type. + * + * Generated from protobuf enum ENTITY_OVERRIDE_MODE_OVERRIDE = 1; + */ + const ENTITY_OVERRIDE_MODE_OVERRIDE = 1; + /** + * The collection of session entities extends the collection of entities in + * the corresponding custom entity type. + * Note: Even in this override mode calls to `ListSessionEntityTypes`, + * `GetSessionEntityType`, `CreateSessionEntityType` and + * `UpdateSessionEntityType` only return the additional entities added in + * this session entity type. If you want to get the supplemented list, + * please call + * [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] + * on the custom entity type and merge. + * + * Generated from protobuf enum ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; + */ + const ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; + + private static $valueToName = [ + self::ENTITY_OVERRIDE_MODE_UNSPECIFIED => 'ENTITY_OVERRIDE_MODE_UNSPECIFIED', + self::ENTITY_OVERRIDE_MODE_OVERRIDE => 'ENTITY_OVERRIDE_MODE_OVERRIDE', + self::ENTITY_OVERRIDE_MODE_SUPPLEMENT => 'ENTITY_OVERRIDE_MODE_SUPPLEMENT', + ]; + + 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(EntityOverrideMode::class, \Google\Cloud\Dialogflow\V2\SessionEntityType_EntityOverrideMode::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType_EntityOverrideMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType_EntityOverrideMode.php new file mode 100644 index 000000000000..60b54495e2dd --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType_EntityOverrideMode.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/ListSessionEntityTypes', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListSessionEntityTypesResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified session entity type. + * + * This method doesn't work with Google Assistant integration. + * Contact Dialogflow support if you need to use session entities + * with Google Assistant integration. + * @param \Google\Cloud\Dialogflow\V2\GetSessionEntityTypeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetSessionEntityType(\Google\Cloud\Dialogflow\V2\GetSessionEntityTypeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/GetSessionEntityType', + $argument, + ['\Google\Cloud\Dialogflow\V2\SessionEntityType', 'decode'], + $metadata, $options); + } + + /** + * Creates a session entity type. + * + * If the specified session entity type already exists, overrides the session + * entity type. + * + * This method doesn't work with Google Assistant integration. + * Contact Dialogflow support if you need to use session entities + * with Google Assistant integration. + * @param \Google\Cloud\Dialogflow\V2\CreateSessionEntityTypeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateSessionEntityType(\Google\Cloud\Dialogflow\V2\CreateSessionEntityTypeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/CreateSessionEntityType', + $argument, + ['\Google\Cloud\Dialogflow\V2\SessionEntityType', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified session entity type. + * + * This method doesn't work with Google Assistant integration. + * Contact Dialogflow support if you need to use session entities + * with Google Assistant integration. + * @param \Google\Cloud\Dialogflow\V2\UpdateSessionEntityTypeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateSessionEntityType(\Google\Cloud\Dialogflow\V2\UpdateSessionEntityTypeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/UpdateSessionEntityType', + $argument, + ['\Google\Cloud\Dialogflow\V2\SessionEntityType', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified session entity type. + * + * This method doesn't work with Google Assistant integration. + * Contact Dialogflow support if you need to use session entities + * with Google Assistant integration. + * @param \Google\Cloud\Dialogflow\V2\DeleteSessionEntityTypeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteSessionEntityType(\Google\Cloud\Dialogflow\V2\DeleteSessionEntityTypeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/DeleteSessionEntityType', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionsGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionsGrpcClient.php new file mode 100644 index 000000000000..f582a416aaba --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionsGrpcClient.php @@ -0,0 +1,92 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Sessions/DetectIntent', + $argument, + ['\Google\Cloud\Dialogflow\V2\DetectIntentResponse', 'decode'], + $metadata, $options); + } + + /** + * Processes a natural language query in audio format in a streaming fashion + * and returns structured, actionable data as a result. This method is only + * available via the gRPC API (not REST). + * + * If you might use + * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + * or other CCAI products now or in the future, consider using + * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has + * additional functionality for Agent Assist and other CCAI products. + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\BidiStreamingCall + */ + public function StreamingDetectIntent($metadata = [], $options = []) { + return $this->_bidiRequest('/google.cloud.dialogflow.v2.Sessions/StreamingDetectIntent', + ['\Google\Cloud\Dialogflow\V2\StreamingDetectIntentResponse','decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetAgentRequest.php new file mode 100644 index 000000000000..2215742736b8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetAgentRequest.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.v2.SetAgentRequest + */ +class SetAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $agent = null; + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Agent $agent + * Required. The agent to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Agent|null + */ + public function getAgent() + { + return $this->agent; + } + + public function hasAgent() + { + return isset($this->agent); + } + + public function clearAgent() + { + unset($this->agent); + } + + /** + * Required. The agent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Agent $var + * @return $this + */ + public function setAgent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Agent::class); + $this->agent = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigOperationMetadata.php new file mode 100644 index 000000000000..72ad8f5015e9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigOperationMetadata.php @@ -0,0 +1,192 @@ +google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + */ +class SetSuggestionFeatureConfigOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the conversation profile. Format: + * `projects//locations//conversationProfiles/` + * + * Generated from protobuf field string conversation_profile = 1; + */ + protected $conversation_profile = ''; + /** + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $participant_role = 0; + /** + * Required. The type of the suggestion feature to add or update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $suggestion_feature_type = 0; + /** + * Timestamp whe the request was created. The time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_profile + * The resource name of the conversation profile. Format: + * `projects//locations//conversationProfiles/` + * @type int $participant_role + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * @type int $suggestion_feature_type + * Required. The type of the suggestion feature to add or update. + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp whe the request was created. The time is measured on server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the conversation profile. Format: + * `projects//locations//conversationProfiles/` + * + * Generated from protobuf field string conversation_profile = 1; + * @return string + */ + public function getConversationProfile() + { + return $this->conversation_profile; + } + + /** + * The resource name of the conversation profile. Format: + * `projects//locations//conversationProfiles/` + * + * Generated from protobuf field string conversation_profile = 1; + * @param string $var + * @return $this + */ + public function setConversationProfile($var) + { + GPBUtil::checkString($var, True); + $this->conversation_profile = $var; + + return $this; + } + + /** + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getParticipantRole() + { + return $this->participant_role; + } + + /** + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setParticipantRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); + $this->participant_role = $var; + + return $this; + } + + /** + * Required. The type of the suggestion feature to add or update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSuggestionFeatureType() + { + return $this->suggestion_feature_type; + } + + /** + * Required. The type of the suggestion feature to add or update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSuggestionFeatureType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type::class); + $this->suggestion_feature_type = $var; + + return $this; + } + + /** + * Timestamp whe the request was created. The time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @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); + } + + /** + * Timestamp whe the request was created. The time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigRequest.php new file mode 100644 index 000000000000..36a3490c3c87 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigRequest.php @@ -0,0 +1,158 @@ +google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + */ +class SetSuggestionFeatureConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation_profile = ''; + /** + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $participant_role = 0; + /** + * Required. The suggestion feature config to add or update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $suggestion_feature_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_profile + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * @type int $participant_role + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig $suggestion_feature_config + * Required. The suggestion feature config to add or update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getConversationProfile() + { + return $this->conversation_profile; + } + + /** + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * + * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setConversationProfile($var) + { + GPBUtil::checkString($var, True); + $this->conversation_profile = $var; + + return $this; + } + + /** + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getParticipantRole() + { + return $this->participant_role; + } + + /** + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setParticipantRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); + $this->participant_role = $var; + + return $this; + } + + /** + * Required. The suggestion feature config to add or update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig|null + */ + public function getSuggestionFeatureConfig() + { + return $this->suggestion_feature_config; + } + + public function hasSuggestionFeatureConfig() + { + return isset($this->suggestion_feature_config); + } + + public function clearSuggestionFeatureConfig() + { + unset($this->suggestion_feature_config); + } + + /** + * Required. The suggestion feature config to add or update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig $var + * @return $this + */ + public function setSuggestionFeatureConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig::class); + $this->suggestion_feature_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyAnswer.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyAnswer.php new file mode 100644 index 000000000000..3a2493d155e0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyAnswer.php @@ -0,0 +1,155 @@ +google.cloud.dialogflow.v2.SmartReplyAnswer + */ +class SmartReplyAnswer extends \Google\Protobuf\Internal\Message +{ + /** + * The content of the reply. + * + * Generated from protobuf field string reply = 1; + */ + protected $reply = ''; + /** + * Smart reply confidence. + * The system's confidence score that this reply is a good match for + * this conversation, as a value from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + /** + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * + * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { + */ + protected $answer_record = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $reply + * The content of the reply. + * @type float $confidence + * Smart reply confidence. + * The system's confidence score that this reply is a good match for + * this conversation, as a value from 0.0 (completely uncertain) to 1.0 + * (completely certain). + * @type string $answer_record + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::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; + } + + /** + * Smart reply confidence. + * The system's confidence score that this reply is a good match for + * this conversation, as a value 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; + } + + /** + * Smart reply confidence. + * The system's confidence score that this reply is a good match for + * this conversation, as a value 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; + } + + /** + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * + * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getAnswerRecord() + { + return $this->answer_record; + } + + /** + * The name of answer record, in the format of + * "projects//locations//answerRecords/" + * + * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAnswerRecord($var) + { + GPBUtil::checkString($var, True); + $this->answer_record = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics.php new file mode 100644 index 000000000000..b191f64c4706 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics.php @@ -0,0 +1,143 @@ +google.cloud.dialogflow.v2.SmartReplyMetrics + */ +class SmartReplyMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Percentage of target participant messages in the evaluation dataset for + * which similar messages have appeared at least once in the allowlist. Should + * be [0, 1]. + * + * Generated from protobuf field float allowlist_coverage = 1; + */ + protected $allowlist_coverage = 0.0; + /** + * Metrics of top n smart replies, sorted by [TopNMetric.n][]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics top_n_metrics = 2; + */ + private $top_n_metrics; + /** + * Total number of conversations used to generate this metric. + * + * Generated from protobuf field int64 conversation_count = 3; + */ + protected $conversation_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $allowlist_coverage + * Percentage of target participant messages in the evaluation dataset for + * which similar messages have appeared at least once in the allowlist. Should + * be [0, 1]. + * @type array<\Google\Cloud\Dialogflow\V2\SmartReplyMetrics\TopNMetrics>|\Google\Protobuf\Internal\RepeatedField $top_n_metrics + * Metrics of top n smart replies, sorted by [TopNMetric.n][]. + * @type int|string $conversation_count + * Total number of conversations used to generate this metric. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Percentage of target participant messages in the evaluation dataset for + * which similar messages have appeared at least once in the allowlist. Should + * be [0, 1]. + * + * Generated from protobuf field float allowlist_coverage = 1; + * @return float + */ + public function getAllowlistCoverage() + { + return $this->allowlist_coverage; + } + + /** + * Percentage of target participant messages in the evaluation dataset for + * which similar messages have appeared at least once in the allowlist. Should + * be [0, 1]. + * + * Generated from protobuf field float allowlist_coverage = 1; + * @param float $var + * @return $this + */ + public function setAllowlistCoverage($var) + { + GPBUtil::checkFloat($var); + $this->allowlist_coverage = $var; + + return $this; + } + + /** + * Metrics of top n smart replies, sorted by [TopNMetric.n][]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics top_n_metrics = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopNMetrics() + { + return $this->top_n_metrics; + } + + /** + * Metrics of top n smart replies, sorted by [TopNMetric.n][]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics top_n_metrics = 2; + * @param array<\Google\Cloud\Dialogflow\V2\SmartReplyMetrics\TopNMetrics>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopNMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SmartReplyMetrics\TopNMetrics::class); + $this->top_n_metrics = $arr; + + return $this; + } + + /** + * Total number of conversations used to generate this metric. + * + * Generated from protobuf field int64 conversation_count = 3; + * @return int|string + */ + public function getConversationCount() + { + return $this->conversation_count; + } + + /** + * Total number of conversations used to generate this metric. + * + * Generated from protobuf field int64 conversation_count = 3; + * @param int|string $var + * @return $this + */ + public function setConversationCount($var) + { + GPBUtil::checkInt64($var); + $this->conversation_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics/TopNMetrics.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics/TopNMetrics.php new file mode 100644 index 000000000000..eb1c7e7530cf --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics/TopNMetrics.php @@ -0,0 +1,124 @@ +google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics + */ +class TopNMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Number of retrieved smart replies. For example, when `n` is 3, this + * evaluation contains metrics for when Dialogflow retrieves 3 smart replies + * with the model. + * + * Generated from protobuf field int32 n = 1; + */ + protected $n = 0; + /** + * Defined as `number of queries whose top n smart replies have at least one + * similar (token match similarity above the defined threshold) reply as the + * real reply` divided by `number of queries with at least one smart reply`. + * Value ranges from 0.0 to 1.0 inclusive. + * + * Generated from protobuf field float recall = 2; + */ + protected $recall = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $n + * Number of retrieved smart replies. For example, when `n` is 3, this + * evaluation contains metrics for when Dialogflow retrieves 3 smart replies + * with the model. + * @type float $recall + * Defined as `number of queries whose top n smart replies have at least one + * similar (token match similarity above the defined threshold) reply as the + * real reply` divided by `number of queries with at least one smart reply`. + * Value ranges from 0.0 to 1.0 inclusive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Number of retrieved smart replies. For example, when `n` is 3, this + * evaluation contains metrics for when Dialogflow retrieves 3 smart replies + * with the model. + * + * Generated from protobuf field int32 n = 1; + * @return int + */ + public function getN() + { + return $this->n; + } + + /** + * Number of retrieved smart replies. For example, when `n` is 3, this + * evaluation contains metrics for when Dialogflow retrieves 3 smart replies + * with the model. + * + * Generated from protobuf field int32 n = 1; + * @param int $var + * @return $this + */ + public function setN($var) + { + GPBUtil::checkInt32($var); + $this->n = $var; + + return $this; + } + + /** + * Defined as `number of queries whose top n smart replies have at least one + * similar (token match similarity above the defined threshold) reply as the + * real reply` divided by `number of queries with at least one smart reply`. + * Value ranges from 0.0 to 1.0 inclusive. + * + * Generated from protobuf field float recall = 2; + * @return float + */ + public function getRecall() + { + return $this->recall; + } + + /** + * Defined as `number of queries whose top n smart replies have at least one + * similar (token match similarity above the defined threshold) reply as the + * real reply` divided by `number of queries with at least one smart reply`. + * Value ranges from 0.0 to 1.0 inclusive. + * + * Generated from protobuf field float recall = 2; + * @param float $var + * @return $this + */ + public function setRecall($var) + { + GPBUtil::checkFloat($var); + $this->recall = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TopNMetrics::class, \Google\Cloud\Dialogflow\V2\SmartReplyMetrics_TopNMetrics::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics_TopNMetrics.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics_TopNMetrics.php new file mode 100644 index 000000000000..1b2212b38487 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics_TopNMetrics.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.SmartReplyModelMetadata + */ +class SmartReplyModelMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Type of the smart reply model. If not provided, model_type is + * used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $training_model_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $training_model_type + * Optional. Type of the smart reply model. If not provided, model_type is + * used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Type of the smart reply model. If not provided, model_type is + * used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTrainingModelType() + { + return $this->training_model_type; + } + + /** + * Optional. Type of the smart reply model. If not provided, model_type is + * used. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTrainingModelType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationModel\ModelType::class); + $this->training_model_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechContext.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechContext.php new file mode 100644 index 000000000000..07a14528011f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechContext.php @@ -0,0 +1,162 @@ +google.cloud.dialogflow.v2.SpeechContext + */ +class SpeechContext extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of strings containing words and phrases that the speech + * recognizer should recognize with higher likelihood. + * This list can be used to: + * * improve accuracy for words and phrases you expect the user to say, + * e.g. typical commands for your Dialogflow agent + * * add additional words to the speech recognizer vocabulary + * * ... + * See the [Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/quotas) for usage + * limits. + * + * Generated from protobuf field repeated string phrases = 1; + */ + private $phrases; + /** + * Optional. Boost for this context compared to other contexts: + * * If the boost is positive, Dialogflow will increase the probability that + * the phrases in this context are recognized over similar sounding phrases. + * * If the boost is unspecified or non-positive, Dialogflow will not apply + * any boost. + * Dialogflow recommends that you use boosts in the range (0, 20] and that you + * find a value that fits your use case with binary search. + * + * Generated from protobuf field float boost = 2; + */ + protected $boost = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $phrases + * Optional. A list of strings containing words and phrases that the speech + * recognizer should recognize with higher likelihood. + * This list can be used to: + * * improve accuracy for words and phrases you expect the user to say, + * e.g. typical commands for your Dialogflow agent + * * add additional words to the speech recognizer vocabulary + * * ... + * See the [Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/quotas) for usage + * limits. + * @type float $boost + * Optional. Boost for this context compared to other contexts: + * * If the boost is positive, Dialogflow will increase the probability that + * the phrases in this context are recognized over similar sounding phrases. + * * If the boost is unspecified or non-positive, Dialogflow will not apply + * any boost. + * Dialogflow recommends that you use boosts in the range (0, 20] and that you + * find a value that fits your use case with binary search. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of strings containing words and phrases that the speech + * recognizer should recognize with higher likelihood. + * This list can be used to: + * * improve accuracy for words and phrases you expect the user to say, + * e.g. typical commands for your Dialogflow agent + * * add additional words to the speech recognizer vocabulary + * * ... + * See the [Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/quotas) for usage + * limits. + * + * Generated from protobuf field repeated string phrases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPhrases() + { + return $this->phrases; + } + + /** + * Optional. A list of strings containing words and phrases that the speech + * recognizer should recognize with higher likelihood. + * This list can be used to: + * * improve accuracy for words and phrases you expect the user to say, + * e.g. typical commands for your Dialogflow agent + * * add additional words to the speech recognizer vocabulary + * * ... + * See the [Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/quotas) for usage + * limits. + * + * Generated from protobuf field repeated string phrases = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPhrases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->phrases = $arr; + + return $this; + } + + /** + * Optional. Boost for this context compared to other contexts: + * * If the boost is positive, Dialogflow will increase the probability that + * the phrases in this context are recognized over similar sounding phrases. + * * If the boost is unspecified or non-positive, Dialogflow will not apply + * any boost. + * Dialogflow recommends that you use boosts in the range (0, 20] and that you + * find a value that fits your use case with binary search. + * + * Generated from protobuf field float boost = 2; + * @return float + */ + public function getBoost() + { + return $this->boost; + } + + /** + * Optional. Boost for this context compared to other contexts: + * * If the boost is positive, Dialogflow will increase the probability that + * the phrases in this context are recognized over similar sounding phrases. + * * If the boost is unspecified or non-positive, Dialogflow will not apply + * any boost. + * Dialogflow recommends that you use boosts in the range (0, 20] and that you + * find a value that fits your use case with binary search. + * + * Generated from protobuf field float boost = 2; + * @param float $var + * @return $this + */ + public function setBoost($var) + { + GPBUtil::checkFloat($var); + $this->boost = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechModelVariant.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechModelVariant.php new file mode 100644 index 000000000000..ea10fcdb7041 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechModelVariant.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.v2.SpeechModelVariant + */ +class SpeechModelVariant +{ + /** + * No model variant specified. In this case Dialogflow defaults to + * USE_BEST_AVAILABLE. + * + * Generated from protobuf enum SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; + */ + const SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; + /** + * Use the best available variant of the [Speech + * model][InputAudioConfig.model] that the caller is eligible for. + * Please see the [Dialogflow + * docs](https://cloud.google.com/dialogflow/docs/data-logging) for + * how to make your project eligible for enhanced models. + * + * Generated from protobuf enum USE_BEST_AVAILABLE = 1; + */ + const USE_BEST_AVAILABLE = 1; + /** + * Use standard model variant even if an enhanced model is available. See the + * [Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + * for details about enhanced models. + * + * Generated from protobuf enum USE_STANDARD = 2; + */ + const USE_STANDARD = 2; + /** + * Use an enhanced model variant: + * * If an enhanced variant does not exist for the given + * [model][google.cloud.dialogflow.v2.InputAudioConfig.model] and request + * language, Dialogflow falls back to the standard variant. + * The [Cloud Speech + * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + * describes which models have enhanced variants. + * * If the API caller isn't eligible for enhanced models, Dialogflow returns + * an error. Please see the [Dialogflow + * docs](https://cloud.google.com/dialogflow/docs/data-logging) + * for how to make your project eligible. + * + * Generated from protobuf enum USE_ENHANCED = 3; + */ + const USE_ENHANCED = 3; + + private static $valueToName = [ + self::SPEECH_MODEL_VARIANT_UNSPECIFIED => 'SPEECH_MODEL_VARIANT_UNSPECIFIED', + self::USE_BEST_AVAILABLE => 'USE_BEST_AVAILABLE', + self::USE_STANDARD => 'USE_STANDARD', + self::USE_ENHANCED => 'USE_ENHANCED', + ]; + + 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechToTextConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechToTextConfig.php new file mode 100644 index 000000000000..0015c8fb766a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechToTextConfig.php @@ -0,0 +1,158 @@ +google.cloud.dialogflow.v2.SpeechToTextConfig + */ +class SpeechToTextConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The speech model used in speech to text. + * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as + * `USE_ENHANCED`. It can be overridden in + * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] + * and + * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] + * request. If enhanced model variant is specified and an enhanced version of + * the specified model for the language does not exist, then it would emit an + * error. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1; + */ + protected $speech_model_variant = 0; + /** + * Which Speech model to select. Select the model best suited to your domain + * to get best results. If a model is not explicitly specified, then a default + * model is used. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + * for more details. + * + * Generated from protobuf field string model = 2; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $speech_model_variant + * The speech model used in speech to text. + * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as + * `USE_ENHANCED`. It can be overridden in + * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] + * and + * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] + * request. If enhanced model variant is specified and an enhanced version of + * the specified model for the language does not exist, then it would emit an + * error. + * @type string $model + * Which Speech model to select. Select the model best suited to your domain + * to get best results. If a model is not explicitly specified, then a default + * model is used. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + * for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * The speech model used in speech to text. + * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as + * `USE_ENHANCED`. It can be overridden in + * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] + * and + * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] + * request. If enhanced model variant is specified and an enhanced version of + * the specified model for the language does not exist, then it would emit an + * error. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1; + * @return int + */ + public function getSpeechModelVariant() + { + return $this->speech_model_variant; + } + + /** + * The speech model used in speech to text. + * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as + * `USE_ENHANCED`. It can be overridden in + * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] + * and + * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] + * request. If enhanced model variant is specified and an enhanced version of + * the specified model for the language does not exist, then it would emit an + * error. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1; + * @param int $var + * @return $this + */ + public function setSpeechModelVariant($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SpeechModelVariant::class); + $this->speech_model_variant = $var; + + return $this; + } + + /** + * Which Speech model to select. Select the model best suited to your domain + * to get best results. If a model is not explicitly specified, then a default + * model is used. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + * for more details. + * + * Generated from protobuf field string model = 2; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Which Speech model to select. Select the model best suited to your domain + * to get best results. If a model is not explicitly specified, then a default + * model is used. + * Refer to + * [Cloud Speech API + * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + * for more details. + * + * Generated from protobuf field string model = 2; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechWordInfo.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechWordInfo.php new file mode 100644 index 000000000000..6070b604df91 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechWordInfo.php @@ -0,0 +1,225 @@ +google.cloud.dialogflow.v2.SpeechWordInfo + */ +class SpeechWordInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The word this info is for. + * + * Generated from protobuf field string word = 3; + */ + protected $word = ''; + /** + * Time offset relative to the beginning of the audio that corresponds to the + * start of the spoken word. This is an experimental feature and the accuracy + * of the time offset can vary. + * + * Generated from protobuf field .google.protobuf.Duration start_offset = 1; + */ + protected $start_offset = null; + /** + * Time offset relative to the beginning of the audio that corresponds to the + * end of the spoken word. This is an experimental feature and the accuracy of + * the time offset can vary. + * + * Generated from protobuf field .google.protobuf.Duration end_offset = 2; + */ + protected $end_offset = null; + /** + * The Speech confidence between 0.0 and 1.0 for this word. A higher number + * indicates an estimated greater likelihood that the recognized word is + * correct. The default of 0.0 is a sentinel value indicating that confidence + * was not set. + * This field is not guaranteed to be fully stable over time for the same + * audio input. Users should also not rely on it to always be provided. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $word + * The word this info is for. + * @type \Google\Protobuf\Duration $start_offset + * Time offset relative to the beginning of the audio that corresponds to the + * start of the spoken word. This is an experimental feature and the accuracy + * of the time offset can vary. + * @type \Google\Protobuf\Duration $end_offset + * Time offset relative to the beginning of the audio that corresponds to the + * end of the spoken word. This is an experimental feature and the accuracy of + * the time offset can vary. + * @type float $confidence + * The Speech confidence between 0.0 and 1.0 for this word. A higher number + * indicates an estimated greater likelihood that the recognized word is + * correct. The default of 0.0 is a sentinel value indicating that confidence + * was not set. + * This field is not guaranteed to be fully stable over time for the same + * audio input. Users should also not rely on it to always be provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * The word this info is for. + * + * Generated from protobuf field string word = 3; + * @return string + */ + public function getWord() + { + return $this->word; + } + + /** + * The word this info is for. + * + * 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; + } + + /** + * Time offset relative to the beginning of the audio that corresponds to the + * start of the spoken word. This is an experimental feature and the accuracy + * of the time offset can vary. + * + * 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 relative to the beginning of the audio that corresponds to the + * start of the spoken word. This is an experimental feature and the accuracy + * of the time offset can vary. + * + * 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 relative to the beginning of the audio that corresponds to the + * end of the spoken word. This is an experimental feature and the accuracy of + * the time offset can vary. + * + * 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 relative to the beginning of the audio that corresponds to the + * end of the spoken word. This is an experimental feature and the accuracy of + * the time offset can vary. + * + * 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 Speech confidence between 0.0 and 1.0 for this word. A higher number + * indicates an estimated greater likelihood that the recognized word is + * correct. The default of 0.0 is a sentinel value indicating that confidence + * was not set. + * This field is not guaranteed to be fully stable over time for the same + * audio input. Users should also not rely on it to always be provided. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The Speech confidence between 0.0 and 1.0 for this word. A higher number + * indicates an estimated greater likelihood that the recognized word is + * correct. The default of 0.0 is a sentinel value indicating that confidence + * was not set. + * This field is not guaranteed to be fully stable over time for the same + * audio input. Users should also not rely on it to always be provided. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SsmlVoiceGender.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SsmlVoiceGender.php new file mode 100644 index 000000000000..2508c1bc6e5e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SsmlVoiceGender.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.v2.SsmlVoiceGender + */ +class SsmlVoiceGender +{ + /** + * An unspecified gender, which means that the client doesn't care which + * gender the selected voice will have. + * + * Generated from protobuf enum SSML_VOICE_GENDER_UNSPECIFIED = 0; + */ + const SSML_VOICE_GENDER_UNSPECIFIED = 0; + /** + * A male voice. + * + * Generated from protobuf enum SSML_VOICE_GENDER_MALE = 1; + */ + const SSML_VOICE_GENDER_MALE = 1; + /** + * A female voice. + * + * Generated from protobuf enum SSML_VOICE_GENDER_FEMALE = 2; + */ + const SSML_VOICE_GENDER_FEMALE = 2; + /** + * A gender-neutral voice. + * + * Generated from protobuf enum SSML_VOICE_GENDER_NEUTRAL = 3; + */ + const SSML_VOICE_GENDER_NEUTRAL = 3; + + private static $valueToName = [ + self::SSML_VOICE_GENDER_UNSPECIFIED => 'SSML_VOICE_GENDER_UNSPECIFIED', + self::SSML_VOICE_GENDER_MALE => 'SSML_VOICE_GENDER_MALE', + self::SSML_VOICE_GENDER_FEMALE => 'SSML_VOICE_GENDER_FEMALE', + self::SSML_VOICE_GENDER_NEUTRAL => 'SSML_VOICE_GENDER_NEUTRAL', + ]; + + 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentRequest.php new file mode 100644 index 000000000000..36e32de6425f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentRequest.php @@ -0,0 +1,565 @@ +google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest + */ +class StreamingAnalyzeContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the participant this text comes from. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $participant = ''; + /** + * Speech synthesis configuration. + * The speech synthesis settings for a virtual agent that may be configured + * for the associated conversation profile are not used when calling + * StreamingAnalyzeContent. If this configuration is not supplied, speech + * synthesis is disabled. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4; + */ + protected $reply_audio_config = null; + /** + * Parameters for a Dialogflow virtual-agent query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 7; + */ + protected $query_params = null; + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8; + */ + protected $assist_query_params = null; + /** + * Additional parameters to be put into Dialogflow CX session parameters. To + * remove a parameter from the session, clients should explicitly set the + * parameter value to null. + * Note: this field should only be used if you are connecting to a Dialogflow + * CX agent. + * + * Generated from protobuf field .google.protobuf.Struct cx_parameters = 13; + */ + protected $cx_parameters = null; + /** + * Enable partial virtual agent responses. If this flag is not enabled, + * response stream still contains only one final response even if some + * `Fulfillment`s in Dialogflow virtual agent have been configured to return + * partial responses. + * + * Generated from protobuf field bool enable_partial_automated_agent_reply = 12; + */ + protected $enable_partial_automated_agent_reply = false; + protected $config; + protected $input; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $participant + * Required. The name of the participant this text comes from. + * Format: `projects//locations//conversations//participants/`. + * @type \Google\Cloud\Dialogflow\V2\InputAudioConfig $audio_config + * Instructs the speech recognizer how to process the speech audio. + * @type \Google\Cloud\Dialogflow\V2\InputTextConfig $text_config + * The natural language text to be processed. + * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $reply_audio_config + * Speech synthesis configuration. + * The speech synthesis settings for a virtual agent that may be configured + * for the associated conversation profile are not used when calling + * StreamingAnalyzeContent. If this configuration is not supplied, speech + * synthesis is disabled. + * @type string $input_audio + * The input audio content to be recognized. Must be sent if `audio_config` + * is set in the first message. The complete audio over all streaming + * messages must not exceed 1 minute. + * @type string $input_text + * The UTF-8 encoded natural language text to be processed. Must be sent if + * `text_config` is set in the first message. Text length must not exceed + * 256 bytes for virtual agent interactions. The `input_text` field can be + * only sent once. + * @type \Google\Cloud\Dialogflow\V2\TelephonyDtmfEvents $input_dtmf + * The DTMF digits used to invoke intent and fill in parameter value. + * This input is ignored if the previous response indicated that DTMF input + * is not accepted. + * @type \Google\Cloud\Dialogflow\V2\QueryParameters $query_params + * Parameters for a Dialogflow virtual-agent query. + * @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params + * Parameters for a human assist query. + * @type \Google\Protobuf\Struct $cx_parameters + * Additional parameters to be put into Dialogflow CX session parameters. To + * remove a parameter from the session, clients should explicitly set the + * parameter value to null. + * Note: this field should only be used if you are connecting to a Dialogflow + * CX agent. + * @type bool $enable_partial_automated_agent_reply + * Enable partial virtual agent responses. If this flag is not enabled, + * response stream still contains only one final response even if some + * `Fulfillment`s in Dialogflow virtual agent have been configured to return + * partial responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the participant this text comes from. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParticipant() + { + return $this->participant; + } + + /** + * Required. The name of the participant this text comes from. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParticipant($var) + { + GPBUtil::checkString($var, True); + $this->participant = $var; + + return $this; + } + + /** + * Instructs the speech recognizer how to process the speech audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2; + * @return \Google\Cloud\Dialogflow\V2\InputAudioConfig|null + */ + public function getAudioConfig() + { + return $this->readOneof(2); + } + + public function hasAudioConfig() + { + return $this->hasOneof(2); + } + + /** + * Instructs the speech recognizer how to process the speech audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2; + * @param \Google\Cloud\Dialogflow\V2\InputAudioConfig $var + * @return $this + */ + public function setAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputAudioConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The natural language text to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputTextConfig text_config = 3; + * @return \Google\Cloud\Dialogflow\V2\InputTextConfig|null + */ + public function getTextConfig() + { + return $this->readOneof(3); + } + + public function hasTextConfig() + { + return $this->hasOneof(3); + } + + /** + * The natural language text to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.InputTextConfig text_config = 3; + * @param \Google\Cloud\Dialogflow\V2\InputTextConfig $var + * @return $this + */ + public function setTextConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputTextConfig::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Speech synthesis configuration. + * The speech synthesis settings for a virtual agent that may be configured + * for the associated conversation profile are not used when calling + * StreamingAnalyzeContent. If this configuration is not supplied, speech + * synthesis is disabled. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4; + * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null + */ + public function getReplyAudioConfig() + { + return $this->reply_audio_config; + } + + public function hasReplyAudioConfig() + { + return isset($this->reply_audio_config); + } + + public function clearReplyAudioConfig() + { + unset($this->reply_audio_config); + } + + /** + * Speech synthesis configuration. + * The speech synthesis settings for a virtual agent that may be configured + * for the associated conversation profile are not used when calling + * StreamingAnalyzeContent. If this configuration is not supplied, speech + * synthesis is disabled. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4; + * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var + * @return $this + */ + public function setReplyAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); + $this->reply_audio_config = $var; + + return $this; + } + + /** + * The input audio content to be recognized. Must be sent if `audio_config` + * is set in the first message. The complete audio over all streaming + * messages must not exceed 1 minute. + * + * Generated from protobuf field bytes input_audio = 5; + * @return string + */ + public function getInputAudio() + { + return $this->readOneof(5); + } + + public function hasInputAudio() + { + return $this->hasOneof(5); + } + + /** + * The input audio content to be recognized. Must be sent if `audio_config` + * is set in the first message. The complete audio over all streaming + * messages must not exceed 1 minute. + * + * Generated from protobuf field bytes input_audio = 5; + * @param string $var + * @return $this + */ + public function setInputAudio($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The UTF-8 encoded natural language text to be processed. Must be sent if + * `text_config` is set in the first message. Text length must not exceed + * 256 bytes for virtual agent interactions. The `input_text` field can be + * only sent once. + * + * Generated from protobuf field string input_text = 6; + * @return string + */ + public function getInputText() + { + return $this->readOneof(6); + } + + public function hasInputText() + { + return $this->hasOneof(6); + } + + /** + * The UTF-8 encoded natural language text to be processed. Must be sent if + * `text_config` is set in the first message. Text length must not exceed + * 256 bytes for virtual agent interactions. The `input_text` field can be + * only sent once. + * + * Generated from protobuf field string input_text = 6; + * @param string $var + * @return $this + */ + public function setInputText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The DTMF digits used to invoke intent and fill in parameter value. + * This input is ignored if the previous response indicated that DTMF input + * is not accepted. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9; + * @return \Google\Cloud\Dialogflow\V2\TelephonyDtmfEvents|null + */ + public function getInputDtmf() + { + return $this->readOneof(9); + } + + public function hasInputDtmf() + { + return $this->hasOneof(9); + } + + /** + * The DTMF digits used to invoke intent and fill in parameter value. + * This input is ignored if the previous response indicated that DTMF input + * is not accepted. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9; + * @param \Google\Cloud\Dialogflow\V2\TelephonyDtmfEvents $var + * @return $this + */ + public function setInputDtmf($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TelephonyDtmfEvents::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Parameters for a Dialogflow virtual-agent query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 7; + * @return \Google\Cloud\Dialogflow\V2\QueryParameters|null + */ + public function getQueryParams() + { + return $this->query_params; + } + + public function hasQueryParams() + { + return isset($this->query_params); + } + + public function clearQueryParams() + { + unset($this->query_params); + } + + /** + * Parameters for a Dialogflow virtual-agent query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 7; + * @param \Google\Cloud\Dialogflow\V2\QueryParameters $var + * @return $this + */ + public function setQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class); + $this->query_params = $var; + + return $this; + } + + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8; + * @return \Google\Cloud\Dialogflow\V2\AssistQueryParameters|null + */ + public function getAssistQueryParams() + { + return $this->assist_query_params; + } + + public function hasAssistQueryParams() + { + return isset($this->assist_query_params); + } + + public function clearAssistQueryParams() + { + unset($this->assist_query_params); + } + + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8; + * @param \Google\Cloud\Dialogflow\V2\AssistQueryParameters $var + * @return $this + */ + public function setAssistQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AssistQueryParameters::class); + $this->assist_query_params = $var; + + return $this; + } + + /** + * Additional parameters to be put into Dialogflow CX session parameters. To + * remove a parameter from the session, clients should explicitly set the + * parameter value to null. + * Note: this field should only be used if you are connecting to a Dialogflow + * CX agent. + * + * Generated from protobuf field .google.protobuf.Struct cx_parameters = 13; + * @return \Google\Protobuf\Struct|null + */ + public function getCxParameters() + { + return $this->cx_parameters; + } + + public function hasCxParameters() + { + return isset($this->cx_parameters); + } + + public function clearCxParameters() + { + unset($this->cx_parameters); + } + + /** + * Additional parameters to be put into Dialogflow CX session parameters. To + * remove a parameter from the session, clients should explicitly set the + * parameter value to null. + * Note: this field should only be used if you are connecting to a Dialogflow + * CX agent. + * + * Generated from protobuf field .google.protobuf.Struct cx_parameters = 13; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setCxParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->cx_parameters = $var; + + return $this; + } + + /** + * Enable partial virtual agent responses. If this flag is not enabled, + * response stream still contains only one final response even if some + * `Fulfillment`s in Dialogflow virtual agent have been configured to return + * partial responses. + * + * Generated from protobuf field bool enable_partial_automated_agent_reply = 12; + * @return bool + */ + public function getEnablePartialAutomatedAgentReply() + { + return $this->enable_partial_automated_agent_reply; + } + + /** + * Enable partial virtual agent responses. If this flag is not enabled, + * response stream still contains only one final response even if some + * `Fulfillment`s in Dialogflow virtual agent have been configured to return + * partial responses. + * + * Generated from protobuf field bool enable_partial_automated_agent_reply = 12; + * @param bool $var + * @return $this + */ + public function setEnablePartialAutomatedAgentReply($var) + { + GPBUtil::checkBool($var); + $this->enable_partial_automated_agent_reply = $var; + + return $this; + } + + /** + * @return string + */ + public function getConfig() + { + return $this->whichOneof("config"); + } + + /** + * @return string + */ + public function getInput() + { + return $this->whichOneof("input"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentResponse.php new file mode 100644 index 000000000000..1cbcdc00558b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentResponse.php @@ -0,0 +1,452 @@ += 1) messages contain + * `human_agent_suggestion_results`, `end_user_suggestion_results` or + * `message`. + * + * Generated from protobuf message google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse + */ +class StreamingAnalyzeContentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result of speech recognition. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 1; + */ + protected $recognition_result = null; + /** + * The output text content. + * This field is set if an automated agent responded with a text for the user. + * + * Generated from protobuf field string reply_text = 2; + */ + protected $reply_text = ''; + /** + * The audio data bytes encoded as specified in the request. + * This field is set if: + * - The `reply_audio_config` field is specified in the request. + * - The automated agent, which this output comes from, responded with audio. + * In such case, the `reply_audio.config` field contains settings used to + * synthesize the speech. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 3; + */ + protected $reply_audio = null; + /** + * Only set if a Dialogflow automated agent has responded. + * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] + * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] + * instead. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 4; + */ + protected $automated_agent_reply = null; + /** + * Message analyzed by CCAI. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 6; + */ + protected $message = null; + /** + * The suggestions for most recent human agent. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 7; + */ + private $human_agent_suggestion_results; + /** + * The suggestions for end user. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 8; + */ + private $end_user_suggestion_results; + /** + * Indicates the parameters of DTMF. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 10; + */ + protected $dtmf_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult $recognition_result + * The result of speech recognition. + * @type string $reply_text + * The output text content. + * This field is set if an automated agent responded with a text for the user. + * @type \Google\Cloud\Dialogflow\V2\OutputAudio $reply_audio + * The audio data bytes encoded as specified in the request. + * This field is set if: + * - The `reply_audio_config` field is specified in the request. + * - The automated agent, which this output comes from, responded with audio. + * In such case, the `reply_audio.config` field contains settings used to + * synthesize the speech. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * @type \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $automated_agent_reply + * Only set if a Dialogflow automated agent has responded. + * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] + * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] + * instead. + * @type \Google\Cloud\Dialogflow\V2\Message $message + * Message analyzed by CCAI. + * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $human_agent_suggestion_results + * The suggestions for most recent human agent. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. + * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $end_user_suggestion_results + * The suggestions for end user. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. + * @type \Google\Cloud\Dialogflow\V2\DtmfParameters $dtmf_parameters + * Indicates the parameters of DTMF. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * The result of speech recognition. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 1; + * @return \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult|null + */ + public function getRecognitionResult() + { + return $this->recognition_result; + } + + public function hasRecognitionResult() + { + return isset($this->recognition_result); + } + + public function clearRecognitionResult() + { + unset($this->recognition_result); + } + + /** + * The result of speech recognition. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 1; + * @param \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult $var + * @return $this + */ + public function setRecognitionResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult::class); + $this->recognition_result = $var; + + return $this; + } + + /** + * The output text content. + * This field is set if an automated agent responded with a text for the user. + * + * Generated from protobuf field string reply_text = 2; + * @return string + */ + public function getReplyText() + { + return $this->reply_text; + } + + /** + * The output text content. + * This field is set if an automated agent responded with a text for the user. + * + * Generated from protobuf field string reply_text = 2; + * @param string $var + * @return $this + */ + public function setReplyText($var) + { + GPBUtil::checkString($var, True); + $this->reply_text = $var; + + return $this; + } + + /** + * The audio data bytes encoded as specified in the request. + * This field is set if: + * - The `reply_audio_config` field is specified in the request. + * - The automated agent, which this output comes from, responded with audio. + * In such case, the `reply_audio.config` field contains settings used to + * synthesize the speech. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 3; + * @return \Google\Cloud\Dialogflow\V2\OutputAudio|null + */ + public function getReplyAudio() + { + return $this->reply_audio; + } + + public function hasReplyAudio() + { + return isset($this->reply_audio); + } + + public function clearReplyAudio() + { + unset($this->reply_audio); + } + + /** + * The audio data bytes encoded as specified in the request. + * This field is set if: + * - The `reply_audio_config` field is specified in the request. + * - The automated agent, which this output comes from, responded with audio. + * In such case, the `reply_audio.config` field contains settings used to + * synthesize the speech. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 3; + * @param \Google\Cloud\Dialogflow\V2\OutputAudio $var + * @return $this + */ + public function setReplyAudio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudio::class); + $this->reply_audio = $var; + + return $this; + } + + /** + * Only set if a Dialogflow automated agent has responded. + * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] + * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] + * instead. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 4; + * @return \Google\Cloud\Dialogflow\V2\AutomatedAgentReply|null + */ + public function getAutomatedAgentReply() + { + return $this->automated_agent_reply; + } + + public function hasAutomatedAgentReply() + { + return isset($this->automated_agent_reply); + } + + public function clearAutomatedAgentReply() + { + unset($this->automated_agent_reply); + } + + /** + * Only set if a Dialogflow automated agent has responded. + * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] + * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] + * instead. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 4; + * @param \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $var + * @return $this + */ + public function setAutomatedAgentReply($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AutomatedAgentReply::class); + $this->automated_agent_reply = $var; + + return $this; + } + + /** + * Message analyzed by CCAI. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 6; + * @return \Google\Cloud\Dialogflow\V2\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * Message analyzed by CCAI. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 6; + * @param \Google\Cloud\Dialogflow\V2\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Message::class); + $this->message = $var; + + return $this; + } + + /** + * The suggestions for most recent human agent. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHumanAgentSuggestionResults() + { + return $this->human_agent_suggestion_results; + } + + /** + * The suggestions for most recent human agent. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 7; + * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHumanAgentSuggestionResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); + $this->human_agent_suggestion_results = $arr; + + return $this; + } + + /** + * The suggestions for end user. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndUserSuggestionResults() + { + return $this->end_user_suggestion_results; + } + + /** + * The suggestions for end user. The order is the same as + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of + * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 8; + * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndUserSuggestionResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); + $this->end_user_suggestion_results = $arr; + + return $this; + } + + /** + * Indicates the parameters of DTMF. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 10; + * @return \Google\Cloud\Dialogflow\V2\DtmfParameters|null + */ + public function getDtmfParameters() + { + return $this->dtmf_parameters; + } + + public function hasDtmfParameters() + { + return isset($this->dtmf_parameters); + } + + public function clearDtmfParameters() + { + unset($this->dtmf_parameters); + } + + /** + * Indicates the parameters of DTMF. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 10; + * @param \Google\Cloud\Dialogflow\V2\DtmfParameters $var + * @return $this + */ + public function setDtmfParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\DtmfParameters::class); + $this->dtmf_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentRequest.php new file mode 100644 index 000000000000..3b1c1d8e9615 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentRequest.php @@ -0,0 +1,488 @@ +google.cloud.dialogflow.v2.StreamingDetectIntentRequest + */ +class StreamingDetectIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session the query is sent to. + * Format of the session name: + * `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment. If `User ID` is not specified, we are using + * "-". It's up to the API caller to choose an appropriate `Session ID` and + * `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $session = ''; + /** + * The parameters of this query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; + */ + protected $query_params = null; + /** + * Required. The input specification. It can be set to: + * 1. an audio config which instructs the speech recognizer how to process + * the speech audio, + * 2. a conversational query in the form of text, or + * 3. an event that specifies which intent to trigger. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query_input = null; + /** + * Please use + * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] + * instead. If `false` (default), recognition does not cease until the client + * closes the stream. If `true`, the recognizer will detect a single spoken + * utterance in input audio. Recognition ceases when it detects the audio's + * voice has stopped or paused. In this case, once a detected intent is + * received, the client should close the stream and start a new request with a + * new stream as needed. This setting is ignored when `query_input` is a piece + * of text or an event. + * + * Generated from protobuf field bool single_utterance = 4 [deprecated = true]; + * @deprecated + */ + protected $single_utterance = false; + /** + * Instructs the speech synthesizer how to generate the output + * audio. If this field is not set and agent-level speech synthesizer is not + * configured, no output audio is generated. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 5; + */ + protected $output_audio_config = null; + /** + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. + * + * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; + */ + protected $output_audio_config_mask = null; + /** + * The input audio content to be recognized. Must be sent if + * `query_input` was set to a streaming input audio config. The complete audio + * over all streaming messages must not exceed 1 minute. + * + * Generated from protobuf field bytes input_audio = 6; + */ + protected $input_audio = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $session + * Required. The name of the session the query is sent to. + * Format of the session name: + * `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment. If `User ID` is not specified, we are using + * "-". It's up to the API caller to choose an appropriate `Session ID` and + * `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @type \Google\Cloud\Dialogflow\V2\QueryParameters $query_params + * The parameters of this query. + * @type \Google\Cloud\Dialogflow\V2\QueryInput $query_input + * Required. The input specification. It can be set to: + * 1. an audio config which instructs the speech recognizer how to process + * the speech audio, + * 2. a conversational query in the form of text, or + * 3. an event that specifies which intent to trigger. + * @type bool $single_utterance + * Please use + * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] + * instead. If `false` (default), recognition does not cease until the client + * closes the stream. If `true`, the recognizer will detect a single spoken + * utterance in input audio. Recognition ceases when it detects the audio's + * voice has stopped or paused. In this case, once a detected intent is + * received, the client should close the stream and start a new request with a + * new stream as needed. This setting is ignored when `query_input` is a piece + * of text or an event. + * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $output_audio_config + * Instructs the speech synthesizer how to generate the output + * audio. If this field is not set and agent-level speech synthesizer is not + * configured, no output audio is generated. + * @type \Google\Protobuf\FieldMask $output_audio_config_mask + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. + * @type string $input_audio + * The input audio content to be recognized. Must be sent if + * `query_input` was set to a streaming input audio config. The complete audio + * over all streaming messages must not exceed 1 minute. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session the query is sent to. + * Format of the session name: + * `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment. If `User ID` is not specified, we are using + * "-". It's up to the API caller to choose an appropriate `Session ID` and + * `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * Required. The name of the session the query is sent to. + * Format of the session name: + * `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment. If `User ID` is not specified, we are using + * "-". It's up to the API caller to choose an appropriate `Session ID` and + * `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + + /** + * The parameters of this query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; + * @return \Google\Cloud\Dialogflow\V2\QueryParameters|null + */ + public function getQueryParams() + { + return $this->query_params; + } + + public function hasQueryParams() + { + return isset($this->query_params); + } + + public function clearQueryParams() + { + unset($this->query_params); + } + + /** + * The parameters of this query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; + * @param \Google\Cloud\Dialogflow\V2\QueryParameters $var + * @return $this + */ + public function setQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class); + $this->query_params = $var; + + return $this; + } + + /** + * Required. The input specification. It can be set to: + * 1. an audio config which instructs the speech recognizer how to process + * the speech audio, + * 2. a conversational query in the form of text, or + * 3. an event that specifies which intent to trigger. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\QueryInput|null + */ + public function getQueryInput() + { + return $this->query_input; + } + + public function hasQueryInput() + { + return isset($this->query_input); + } + + public function clearQueryInput() + { + unset($this->query_input); + } + + /** + * Required. The input specification. It can be set to: + * 1. an audio config which instructs the speech recognizer how to process + * the speech audio, + * 2. a conversational query in the form of text, or + * 3. an event that specifies which intent to trigger. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\QueryInput $var + * @return $this + */ + public function setQueryInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryInput::class); + $this->query_input = $var; + + return $this; + } + + /** + * Please use + * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] + * instead. If `false` (default), recognition does not cease until the client + * closes the stream. If `true`, the recognizer will detect a single spoken + * utterance in input audio. Recognition ceases when it detects the audio's + * voice has stopped or paused. In this case, once a detected intent is + * received, the client should close the stream and start a new request with a + * new stream as needed. This setting is ignored when `query_input` is a piece + * of text or an event. + * + * Generated from protobuf field bool single_utterance = 4 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getSingleUtterance() + { + @trigger_error('single_utterance is deprecated.', E_USER_DEPRECATED); + return $this->single_utterance; + } + + /** + * Please use + * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] + * instead. If `false` (default), recognition does not cease until the client + * closes the stream. If `true`, the recognizer will detect a single spoken + * utterance in input audio. Recognition ceases when it detects the audio's + * voice has stopped or paused. In this case, once a detected intent is + * received, the client should close the stream and start a new request with a + * new stream as needed. This setting is ignored when `query_input` is a piece + * of text or an event. + * + * Generated from protobuf field bool single_utterance = 4 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setSingleUtterance($var) + { + @trigger_error('single_utterance is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->single_utterance = $var; + + return $this; + } + + /** + * Instructs the speech synthesizer how to generate the output + * audio. If this field is not set and agent-level speech synthesizer is not + * configured, no output audio is generated. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 5; + * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null + */ + public function getOutputAudioConfig() + { + return $this->output_audio_config; + } + + public function hasOutputAudioConfig() + { + return isset($this->output_audio_config); + } + + public function clearOutputAudioConfig() + { + unset($this->output_audio_config); + } + + /** + * Instructs the speech synthesizer how to generate the output + * audio. If this field is not set and agent-level speech synthesizer is not + * configured, no output audio is generated. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 5; + * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var + * @return $this + */ + public function setOutputAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); + $this->output_audio_config = $var; + + return $this; + } + + /** + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. + * + * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; + * @return \Google\Protobuf\FieldMask|null + */ + public function getOutputAudioConfigMask() + { + return $this->output_audio_config_mask; + } + + public function hasOutputAudioConfigMask() + { + return isset($this->output_audio_config_mask); + } + + public function clearOutputAudioConfigMask() + { + unset($this->output_audio_config_mask); + } + + /** + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. + * + * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setOutputAudioConfigMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->output_audio_config_mask = $var; + + return $this; + } + + /** + * The input audio content to be recognized. Must be sent if + * `query_input` was set to a streaming input audio config. The complete audio + * over all streaming messages must not exceed 1 minute. + * + * Generated from protobuf field bytes input_audio = 6; + * @return string + */ + public function getInputAudio() + { + return $this->input_audio; + } + + /** + * The input audio content to be recognized. Must be sent if + * `query_input` was set to a streaming input audio config. The complete audio + * over all streaming messages must not exceed 1 minute. + * + * Generated from protobuf field bytes input_audio = 6; + * @param string $var + * @return $this + */ + public function setInputAudio($var) + { + GPBUtil::checkString($var, False); + $this->input_audio = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentResponse.php new file mode 100644 index 000000000000..fec0c3074dee --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentResponse.php @@ -0,0 +1,323 @@ +google.cloud.dialogflow.v2.StreamingDetectIntentResponse + */ +class StreamingDetectIntentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the response. It can be used to + * locate a response in the training example set or for reporting issues. + * + * Generated from protobuf field string response_id = 1; + */ + protected $response_id = ''; + /** + * The result of speech recognition. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 2; + */ + protected $recognition_result = null; + /** + * The result of the conversational query or event processing. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 3; + */ + protected $query_result = null; + /** + * Specifies the status of the webhook request. + * + * Generated from protobuf field .google.rpc.Status webhook_status = 4; + */ + protected $webhook_status = null; + /** + * The audio data bytes encoded as specified in the request. + * Note: The output audio is generated based on the values of default platform + * text responses found in the `query_result.fulfillment_messages` field. If + * multiple default text responses exist, they will be concatenated when + * generating audio. If no default platform text responses exist, the + * generated audio content will be empty. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field bytes output_audio = 5; + */ + protected $output_audio = ''; + /** + * The config used by the speech synthesizer to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; + */ + protected $output_audio_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $response_id + * The unique identifier of the response. It can be used to + * locate a response in the training example set or for reporting issues. + * @type \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult $recognition_result + * The result of speech recognition. + * @type \Google\Cloud\Dialogflow\V2\QueryResult $query_result + * The result of the conversational query or event processing. + * @type \Google\Rpc\Status $webhook_status + * Specifies the status of the webhook request. + * @type string $output_audio + * The audio data bytes encoded as specified in the request. + * Note: The output audio is generated based on the values of default platform + * text responses found in the `query_result.fulfillment_messages` field. If + * multiple default text responses exist, they will be concatenated when + * generating audio. If no default platform text responses exist, the + * generated audio content will be empty. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $output_audio_config + * The config used by the speech synthesizer to generate the output audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the response. It can be used to + * locate a response in the training example set or for reporting issues. + * + * Generated from protobuf field string response_id = 1; + * @return string + */ + public function getResponseId() + { + return $this->response_id; + } + + /** + * The unique identifier of the response. It can be used to + * locate a response in the training example set or for reporting issues. + * + * Generated from protobuf field string response_id = 1; + * @param string $var + * @return $this + */ + public function setResponseId($var) + { + GPBUtil::checkString($var, True); + $this->response_id = $var; + + return $this; + } + + /** + * The result of speech recognition. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 2; + * @return \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult|null + */ + public function getRecognitionResult() + { + return $this->recognition_result; + } + + public function hasRecognitionResult() + { + return isset($this->recognition_result); + } + + public function clearRecognitionResult() + { + unset($this->recognition_result); + } + + /** + * The result of speech recognition. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 2; + * @param \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult $var + * @return $this + */ + public function setRecognitionResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult::class); + $this->recognition_result = $var; + + return $this; + } + + /** + * The result of the conversational query or event processing. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 3; + * @return \Google\Cloud\Dialogflow\V2\QueryResult|null + */ + public function getQueryResult() + { + return $this->query_result; + } + + public function hasQueryResult() + { + return isset($this->query_result); + } + + public function clearQueryResult() + { + unset($this->query_result); + } + + /** + * The result of the conversational query or event processing. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 3; + * @param \Google\Cloud\Dialogflow\V2\QueryResult $var + * @return $this + */ + public function setQueryResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryResult::class); + $this->query_result = $var; + + return $this; + } + + /** + * Specifies the status of the webhook request. + * + * Generated from protobuf field .google.rpc.Status webhook_status = 4; + * @return \Google\Rpc\Status|null + */ + public function getWebhookStatus() + { + return $this->webhook_status; + } + + public function hasWebhookStatus() + { + return isset($this->webhook_status); + } + + public function clearWebhookStatus() + { + unset($this->webhook_status); + } + + /** + * Specifies the status of the webhook request. + * + * Generated from protobuf field .google.rpc.Status webhook_status = 4; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setWebhookStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->webhook_status = $var; + + return $this; + } + + /** + * The audio data bytes encoded as specified in the request. + * Note: The output audio is generated based on the values of default platform + * text responses found in the `query_result.fulfillment_messages` field. If + * multiple default text responses exist, they will be concatenated when + * generating audio. If no default platform text responses exist, the + * generated audio content will be empty. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field bytes output_audio = 5; + * @return string + */ + public function getOutputAudio() + { + return $this->output_audio; + } + + /** + * The audio data bytes encoded as specified in the request. + * Note: The output audio is generated based on the values of default platform + * text responses found in the `query_result.fulfillment_messages` field. If + * multiple default text responses exist, they will be concatenated when + * generating audio. If no default platform text responses exist, the + * generated audio content will be empty. + * In some scenarios, multiple output audio fields may be present in the + * response structure. In these cases, only the top-most-level audio output + * has content. + * + * Generated from protobuf field bytes output_audio = 5; + * @param string $var + * @return $this + */ + public function setOutputAudio($var) + { + GPBUtil::checkString($var, False); + $this->output_audio = $var; + + return $this; + } + + /** + * The config used by the speech synthesizer to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; + * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null + */ + public function getOutputAudioConfig() + { + return $this->output_audio_config; + } + + public function hasOutputAudioConfig() + { + return isset($this->output_audio_config); + } + + public function clearOutputAudioConfig() + { + unset($this->output_audio_config); + } + + /** + * The config used by the speech synthesizer to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; + * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var + * @return $this + */ + public function setOutputAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); + $this->output_audio_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult.php new file mode 100644 index 000000000000..705e93ee6d6d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult.php @@ -0,0 +1,363 @@ +google.cloud.dialogflow.v2.StreamingRecognitionResult + */ +class StreamingRecognitionResult extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the result message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType message_type = 1; + */ + protected $message_type = 0; + /** + * Transcript text representing the words that the user spoke. + * Populated if and only if `message_type` = `TRANSCRIPT`. + * + * Generated from protobuf field string transcript = 2; + */ + protected $transcript = ''; + /** + * If `false`, the `StreamingRecognitionResult` represents an + * interim result that may change. If `true`, the recognizer will not return + * any further hypotheses about this piece of the audio. May only be populated + * for `message_type` = `TRANSCRIPT`. + * + * Generated from protobuf field bool is_final = 3; + */ + protected $is_final = false; + /** + * The Speech confidence between 0.0 and 1.0 for the current portion of audio. + * A higher number indicates an estimated greater likelihood that the + * recognized words are correct. The default of 0.0 is a sentinel value + * indicating that confidence was not set. + * This field is typically only provided if `is_final` is true and you should + * not rely on it being accurate or even set. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + /** + * Word-specific information for the words recognized by Speech in + * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. + * Populated if and only if `message_type` = `TRANSCRIPT` and + * [InputAudioConfig.enable_word_info] is set. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechWordInfo speech_word_info = 7; + */ + private $speech_word_info; + /** + * Time offset of the end of this Speech recognition result relative to the + * beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. + * + * Generated from protobuf field .google.protobuf.Duration speech_end_offset = 8; + */ + protected $speech_end_offset = null; + /** + * Detected language code for the transcript. + * + * Generated from protobuf field string language_code = 10; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $message_type + * Type of the result message. + * @type string $transcript + * Transcript text representing the words that the user spoke. + * Populated if and only if `message_type` = `TRANSCRIPT`. + * @type bool $is_final + * If `false`, the `StreamingRecognitionResult` represents an + * interim result that may change. If `true`, the recognizer will not return + * any further hypotheses about this piece of the audio. May only be populated + * for `message_type` = `TRANSCRIPT`. + * @type float $confidence + * The Speech confidence between 0.0 and 1.0 for the current portion of audio. + * A higher number indicates an estimated greater likelihood that the + * recognized words are correct. The default of 0.0 is a sentinel value + * indicating that confidence was not set. + * This field is typically only provided if `is_final` is true and you should + * not rely on it being accurate or even set. + * @type array<\Google\Cloud\Dialogflow\V2\SpeechWordInfo>|\Google\Protobuf\Internal\RepeatedField $speech_word_info + * Word-specific information for the words recognized by Speech in + * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. + * Populated if and only if `message_type` = `TRANSCRIPT` and + * [InputAudioConfig.enable_word_info] is set. + * @type \Google\Protobuf\Duration $speech_end_offset + * Time offset of the end of this Speech recognition result relative to the + * beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. + * @type string $language_code + * Detected language code for the transcript. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * Type of the result message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType message_type = 1; + * @return int + */ + public function getMessageType() + { + return $this->message_type; + } + + /** + * Type of the result message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType message_type = 1; + * @param int $var + * @return $this + */ + public function setMessageType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult\MessageType::class); + $this->message_type = $var; + + return $this; + } + + /** + * Transcript text representing the words that the user spoke. + * Populated if and only if `message_type` = `TRANSCRIPT`. + * + * Generated from protobuf field string transcript = 2; + * @return string + */ + public function getTranscript() + { + return $this->transcript; + } + + /** + * Transcript text representing the words that the user spoke. + * Populated if and only if `message_type` = `TRANSCRIPT`. + * + * Generated from protobuf field string transcript = 2; + * @param string $var + * @return $this + */ + public function setTranscript($var) + { + GPBUtil::checkString($var, True); + $this->transcript = $var; + + return $this; + } + + /** + * If `false`, the `StreamingRecognitionResult` represents an + * interim result that may change. If `true`, the recognizer will not return + * any further hypotheses about this piece of the audio. May only be populated + * for `message_type` = `TRANSCRIPT`. + * + * Generated from protobuf field bool is_final = 3; + * @return bool + */ + public function getIsFinal() + { + return $this->is_final; + } + + /** + * If `false`, the `StreamingRecognitionResult` represents an + * interim result that may change. If `true`, the recognizer will not return + * any further hypotheses about this piece of the audio. May only be populated + * for `message_type` = `TRANSCRIPT`. + * + * Generated from protobuf field bool is_final = 3; + * @param bool $var + * @return $this + */ + public function setIsFinal($var) + { + GPBUtil::checkBool($var); + $this->is_final = $var; + + return $this; + } + + /** + * The Speech confidence between 0.0 and 1.0 for the current portion of audio. + * A higher number indicates an estimated greater likelihood that the + * recognized words are correct. The default of 0.0 is a sentinel value + * indicating that confidence was not set. + * This field is typically only provided if `is_final` is true and you should + * not rely on it being accurate or even set. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The Speech confidence between 0.0 and 1.0 for the current portion of audio. + * A higher number indicates an estimated greater likelihood that the + * recognized words are correct. The default of 0.0 is a sentinel value + * indicating that confidence was not set. + * This field is typically only provided if `is_final` is true and you should + * not rely on it being accurate or even set. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * Word-specific information for the words recognized by Speech in + * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. + * Populated if and only if `message_type` = `TRANSCRIPT` and + * [InputAudioConfig.enable_word_info] is set. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechWordInfo speech_word_info = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpeechWordInfo() + { + return $this->speech_word_info; + } + + /** + * Word-specific information for the words recognized by Speech in + * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. + * Populated if and only if `message_type` = `TRANSCRIPT` and + * [InputAudioConfig.enable_word_info] is set. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechWordInfo speech_word_info = 7; + * @param array<\Google\Cloud\Dialogflow\V2\SpeechWordInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpeechWordInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SpeechWordInfo::class); + $this->speech_word_info = $arr; + + return $this; + } + + /** + * Time offset of the end of this Speech recognition result relative to the + * beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. + * + * Generated from protobuf field .google.protobuf.Duration speech_end_offset = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getSpeechEndOffset() + { + return $this->speech_end_offset; + } + + public function hasSpeechEndOffset() + { + return isset($this->speech_end_offset); + } + + public function clearSpeechEndOffset() + { + unset($this->speech_end_offset); + } + + /** + * Time offset of the end of this Speech recognition result relative to the + * beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. + * + * Generated from protobuf field .google.protobuf.Duration speech_end_offset = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSpeechEndOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->speech_end_offset = $var; + + return $this; + } + + /** + * Detected language code for the transcript. + * + * Generated from protobuf field string language_code = 10; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Detected language code for the transcript. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult/MessageType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult/MessageType.php new file mode 100644 index 000000000000..f67361b923ee --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult/MessageType.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType + */ +class MessageType +{ + /** + * Not specified. Should never be used. + * + * Generated from protobuf enum MESSAGE_TYPE_UNSPECIFIED = 0; + */ + const MESSAGE_TYPE_UNSPECIFIED = 0; + /** + * Message contains a (possibly partial) transcript. + * + * Generated from protobuf enum TRANSCRIPT = 1; + */ + const TRANSCRIPT = 1; + /** + * Event indicates that the server has detected the end of the user's speech + * utterance and expects no additional inputs. + * Therefore, the server will not process additional audio (although it may + * subsequently return additional results). The client should stop sending + * additional audio data, half-close the gRPC connection, and wait for any + * additional results until the server closes the gRPC connection. This + * message is only sent if `single_utterance` was set to `true`, and is not + * used otherwise. + * + * Generated from protobuf enum END_OF_SINGLE_UTTERANCE = 2; + */ + const END_OF_SINGLE_UTTERANCE = 2; + + private static $valueToName = [ + self::MESSAGE_TYPE_UNSPECIFIED => 'MESSAGE_TYPE_UNSPECIFIED', + self::TRANSCRIPT => 'TRANSCRIPT', + self::END_OF_SINGLE_UTTERANCE => 'END_OF_SINGLE_UTTERANCE', + ]; + + 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(MessageType::class, \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult_MessageType::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult_MessageType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult_MessageType.php new file mode 100644 index 000000000000..9f4facbd7396 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult_MessageType.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.SuggestArticlesRequest + */ +class SuggestArticlesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $latest_message = ''; + /** + * Optional. Max number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. + * + * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $context_size = 0; + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; + */ + protected $assist_query_params = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * @type string $latest_message + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * @type int $context_size + * Optional. Max number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. + * @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params + * Parameters for a human assist query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * + * 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 name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getLatestMessage() + { + return $this->latest_message; + } + + /** + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestMessage($var) + { + GPBUtil::checkString($var, True); + $this->latest_message = $var; + + return $this; + } + + /** + * Optional. Max number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. + * + * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getContextSize() + { + return $this->context_size; + } + + /** + * Optional. Max number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. + * + * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setContextSize($var) + { + GPBUtil::checkInt32($var); + $this->context_size = $var; + + return $this; + } + + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; + * @return \Google\Cloud\Dialogflow\V2\AssistQueryParameters|null + */ + public function getAssistQueryParams() + { + return $this->assist_query_params; + } + + public function hasAssistQueryParams() + { + return isset($this->assist_query_params); + } + + public function clearAssistQueryParams() + { + unset($this->assist_query_params); + } + + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; + * @param \Google\Cloud\Dialogflow\V2\AssistQueryParameters $var + * @return $this + */ + public function setAssistQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AssistQueryParameters::class); + $this->assist_query_params = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesResponse.php new file mode 100644 index 000000000000..3d9372203970 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesResponse.php @@ -0,0 +1,168 @@ +google.cloud.dialogflow.v2.SuggestArticlesResponse + */ +class SuggestArticlesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Articles ordered by score in descending order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1; + */ + private $article_answers; + /** + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2; + */ + protected $latest_message = ''; + /** + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * + * Generated from protobuf field int32 context_size = 3; + */ + protected $context_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\ArticleAnswer>|\Google\Protobuf\Internal\RepeatedField $article_answers + * Articles ordered by score in descending order. + * @type string $latest_message + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * @type int $context_size + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Articles ordered by score in descending order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getArticleAnswers() + { + return $this->article_answers; + } + + /** + * Articles ordered by score in descending order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1; + * @param array<\Google\Cloud\Dialogflow\V2\ArticleAnswer>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setArticleAnswers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ArticleAnswer::class); + $this->article_answers = $arr; + + return $this; + } + + /** + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2; + * @return string + */ + public function getLatestMessage() + { + return $this->latest_message; + } + + /** + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2; + * @param string $var + * @return $this + */ + public function setLatestMessage($var) + { + GPBUtil::checkString($var, True); + $this->latest_message = $var; + + return $this; + } + + /** + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * + * Generated from protobuf field int32 context_size = 3; + * @return int + */ + public function getContextSize() + { + return $this->context_size; + } + + /** + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * + * Generated from protobuf field int32 context_size = 3; + * @param int $var + * @return $this + */ + public function setContextSize($var) + { + GPBUtil::checkInt32($var); + $this->context_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryRequest.php new file mode 100644 index 000000000000..293cf4a2d796 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryRequest.php @@ -0,0 +1,168 @@ +google.cloud.dialogflow.v2.SuggestConversationSummaryRequest + */ +class SuggestConversationSummaryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation to fetch suggestion for. + * Format: `projects//locations//conversations/`. + * + * Generated from protobuf field string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $conversation = ''; + /** + * The name of the latest conversation message used as context for + * compiling suggestion. If empty, the latest message of the conversation will + * be used. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 3 [(.google.api.resource_reference) = { + */ + protected $latest_message = ''; + /** + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 500 and at most 1000. + * + * Generated from protobuf field int32 context_size = 4; + */ + protected $context_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation + * Required. The conversation to fetch suggestion for. + * Format: `projects//locations//conversations/`. + * @type string $latest_message + * The name of the latest conversation message used as context for + * compiling suggestion. If empty, the latest message of the conversation will + * be used. + * Format: `projects//locations//conversations//messages/`. + * @type int $context_size + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 500 and at most 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation to fetch suggestion for. + * Format: `projects//locations//conversations/`. + * + * Generated from protobuf field string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getConversation() + { + return $this->conversation; + } + + /** + * Required. The conversation to fetch suggestion for. + * Format: `projects//locations//conversations/`. + * + * Generated from protobuf field string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkString($var, True); + $this->conversation = $var; + + return $this; + } + + /** + * The name of the latest conversation message used as context for + * compiling suggestion. If empty, the latest message of the conversation will + * be used. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getLatestMessage() + { + return $this->latest_message; + } + + /** + * The name of the latest conversation message used as context for + * compiling suggestion. If empty, the latest message of the conversation will + * be used. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestMessage($var) + { + GPBUtil::checkString($var, True); + $this->latest_message = $var; + + return $this; + } + + /** + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 500 and at most 1000. + * + * Generated from protobuf field int32 context_size = 4; + * @return int + */ + public function getContextSize() + { + return $this->context_size; + } + + /** + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 500 and at most 1000. + * + * Generated from protobuf field int32 context_size = 4; + * @param int $var + * @return $this + */ + public function setContextSize($var) + { + GPBUtil::checkInt32($var); + $this->context_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse.php new file mode 100644 index 000000000000..168c11a1ae16 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse.php @@ -0,0 +1,170 @@ +google.cloud.dialogflow.v2.SuggestConversationSummaryResponse + */ +class SuggestConversationSummaryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated summary. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; + */ + protected $summary = null; + /** + * The name of the latest conversation message used as context for + * compiling suggestion. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { + */ + protected $latest_message = ''; + /** + * Number of messages prior to and including + * [last_conversation_message][] used to compile the suggestion. It may be + * smaller than the [SuggestSummaryRequest.context_size][] field in the + * request if there weren't that many messages in the conversation. + * + * Generated from protobuf field int32 context_size = 3; + */ + protected $context_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse\Summary $summary + * Generated summary. + * @type string $latest_message + * The name of the latest conversation message used as context for + * compiling suggestion. + * Format: `projects//locations//conversations//messages/`. + * @type int $context_size + * Number of messages prior to and including + * [last_conversation_message][] used to compile the suggestion. It may be + * smaller than the [SuggestSummaryRequest.context_size][] field in the + * request if there weren't that many messages in the conversation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Generated summary. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; + * @return \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse\Summary|null + */ + public function getSummary() + { + return $this->summary; + } + + public function hasSummary() + { + return isset($this->summary); + } + + public function clearSummary() + { + unset($this->summary); + } + + /** + * Generated summary. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; + * @param \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse\Summary $var + * @return $this + */ + public function setSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse\Summary::class); + $this->summary = $var; + + return $this; + } + + /** + * The name of the latest conversation message used as context for + * compiling suggestion. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getLatestMessage() + { + return $this->latest_message; + } + + /** + * The name of the latest conversation message used as context for + * compiling suggestion. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestMessage($var) + { + GPBUtil::checkString($var, True); + $this->latest_message = $var; + + return $this; + } + + /** + * Number of messages prior to and including + * [last_conversation_message][] used to compile the suggestion. It may be + * smaller than the [SuggestSummaryRequest.context_size][] field in the + * request if there weren't that many messages in the conversation. + * + * Generated from protobuf field int32 context_size = 3; + * @return int + */ + public function getContextSize() + { + return $this->context_size; + } + + /** + * Number of messages prior to and including + * [last_conversation_message][] used to compile the suggestion. It may be + * smaller than the [SuggestSummaryRequest.context_size][] field in the + * request if there weren't that many messages in the conversation. + * + * Generated from protobuf field int32 context_size = 3; + * @param int $var + * @return $this + */ + public function setContextSize($var) + { + GPBUtil::checkInt32($var); + $this->context_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse/Summary.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse/Summary.php new file mode 100644 index 000000000000..8d14399a6a6a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse/Summary.php @@ -0,0 +1,150 @@ +google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary + */ +class Summary extends \Google\Protobuf\Internal\Message +{ + /** + * The summary content that is concatenated into one string. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * The summary 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 = 4; + */ + private $text_sections; + /** + * The name of the answer record. Format: + * "projects//answerRecords/" + * + * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { + */ + protected $answer_record = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The summary content that is concatenated into one string. + * @type array|\Google\Protobuf\Internal\MapField $text_sections + * The summary 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 string $answer_record + * The name of the answer record. Format: + * "projects//answerRecords/" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * The summary content that is concatenated into one string. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The summary 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 summary 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 = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTextSections() + { + return $this->text_sections; + } + + /** + * The summary 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 = 4; + * @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 name of the answer record. Format: + * "projects//answerRecords/" + * + * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getAnswerRecord() + { + return $this->answer_record; + } + + /** + * The name of the answer record. Format: + * "projects//answerRecords/" + * + * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAnswerRecord($var) + { + GPBUtil::checkString($var, True); + $this->answer_record = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Summary::class, \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse_Summary::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse_Summary.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse_Summary.php new file mode 100644 index 000000000000..7c5fd0823623 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse_Summary.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.SuggestFaqAnswersRequest + */ +class SuggestFaqAnswersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $latest_message = ''; + /** + * Optional. Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * + * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $context_size = 0; + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; + */ + protected $assist_query_params = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * @type string $latest_message + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * @type int $context_size + * Optional. Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params + * Parameters for a human assist query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * + * 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 name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getLatestMessage() + { + return $this->latest_message; + } + + /** + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestMessage($var) + { + GPBUtil::checkString($var, True); + $this->latest_message = $var; + + return $this; + } + + /** + * Optional. Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * + * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getContextSize() + { + return $this->context_size; + } + + /** + * Optional. Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * + * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setContextSize($var) + { + GPBUtil::checkInt32($var); + $this->context_size = $var; + + return $this; + } + + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; + * @return \Google\Cloud\Dialogflow\V2\AssistQueryParameters|null + */ + public function getAssistQueryParams() + { + return $this->assist_query_params; + } + + public function hasAssistQueryParams() + { + return isset($this->assist_query_params); + } + + public function clearAssistQueryParams() + { + unset($this->assist_query_params); + } + + /** + * Parameters for a human assist query. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; + * @param \Google\Cloud\Dialogflow\V2\AssistQueryParameters $var + * @return $this + */ + public function setAssistQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AssistQueryParameters::class); + $this->assist_query_params = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersResponse.php new file mode 100644 index 000000000000..2dc230acbb62 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersResponse.php @@ -0,0 +1,168 @@ +google.cloud.dialogflow.v2.SuggestFaqAnswersResponse + */ +class SuggestFaqAnswersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Answers extracted from FAQ documents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.FaqAnswer faq_answers = 1; + */ + private $faq_answers; + /** + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2; + */ + protected $latest_message = ''; + /** + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * + * Generated from protobuf field int32 context_size = 3; + */ + protected $context_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\FaqAnswer>|\Google\Protobuf\Internal\RepeatedField $faq_answers + * Answers extracted from FAQ documents. + * @type string $latest_message + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * @type int $context_size + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Answers extracted from FAQ documents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.FaqAnswer faq_answers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFaqAnswers() + { + return $this->faq_answers; + } + + /** + * Answers extracted from FAQ documents. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.FaqAnswer faq_answers = 1; + * @param array<\Google\Cloud\Dialogflow\V2\FaqAnswer>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFaqAnswers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\FaqAnswer::class); + $this->faq_answers = $arr; + + return $this; + } + + /** + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2; + * @return string + */ + public function getLatestMessage() + { + return $this->latest_message; + } + + /** + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2; + * @param string $var + * @return $this + */ + public function setLatestMessage($var) + { + GPBUtil::checkString($var, True); + $this->latest_message = $var; + + return $this; + } + + /** + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * + * Generated from protobuf field int32 context_size = 3; + * @return int + */ + public function getContextSize() + { + return $this->context_size; + } + + /** + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * + * Generated from protobuf field int32 context_size = 3; + * @param int $var + * @return $this + */ + public function setContextSize($var) + { + GPBUtil::checkInt32($var); + $this->context_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesRequest.php new file mode 100644 index 000000000000..b5a24d6b4548 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesRequest.php @@ -0,0 +1,216 @@ +google.cloud.dialogflow.v2.SuggestSmartRepliesRequest + */ +class SuggestSmartRepliesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The current natural language text segment to compile suggestion + * for. This provides a way for user to get follow up smart reply suggestion + * after a smart reply selection, without sending a text message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput current_text_input = 4; + */ + protected $current_text_input = null; + /** + * The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { + */ + protected $latest_message = ''; + /** + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * + * Generated from protobuf field int32 context_size = 3; + */ + protected $context_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * @type \Google\Cloud\Dialogflow\V2\TextInput $current_text_input + * The current natural language text segment to compile suggestion + * for. This provides a way for user to get follow up smart reply suggestion + * after a smart reply selection, without sending a text message. + * @type string $latest_message + * The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * @type int $context_size + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * + * 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 name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * + * 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 current natural language text segment to compile suggestion + * for. This provides a way for user to get follow up smart reply suggestion + * after a smart reply selection, without sending a text message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput current_text_input = 4; + * @return \Google\Cloud\Dialogflow\V2\TextInput|null + */ + public function getCurrentTextInput() + { + return $this->current_text_input; + } + + public function hasCurrentTextInput() + { + return isset($this->current_text_input); + } + + public function clearCurrentTextInput() + { + unset($this->current_text_input); + } + + /** + * The current natural language text segment to compile suggestion + * for. This provides a way for user to get follow up smart reply suggestion + * after a smart reply selection, without sending a text message. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput current_text_input = 4; + * @param \Google\Cloud\Dialogflow\V2\TextInput $var + * @return $this + */ + public function setCurrentTextInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextInput::class); + $this->current_text_input = $var; + + return $this; + } + + /** + * The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getLatestMessage() + { + return $this->latest_message; + } + + /** + * The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestMessage($var) + { + GPBUtil::checkString($var, True); + $this->latest_message = $var; + + return $this; + } + + /** + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * + * Generated from protobuf field int32 context_size = 3; + * @return int + */ + public function getContextSize() + { + return $this->context_size; + } + + /** + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * + * Generated from protobuf field int32 context_size = 3; + * @param int $var + * @return $this + */ + public function setContextSize($var) + { + GPBUtil::checkInt32($var); + $this->context_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesResponse.php new file mode 100644 index 000000000000..0938283c9e61 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesResponse.php @@ -0,0 +1,176 @@ +google.cloud.dialogflow.v2.SuggestSmartRepliesResponse + */ +class SuggestSmartRepliesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Multiple reply options provided by smart reply service. The + * order is based on the rank of the model prediction. + * The maximum number of the returned replies is set in SmartReplyConfig. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyAnswer smart_reply_answers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $smart_reply_answers; + /** + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { + */ + protected $latest_message = ''; + /** + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * + * Generated from protobuf field int32 context_size = 3; + */ + protected $context_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\SmartReplyAnswer>|\Google\Protobuf\Internal\RepeatedField $smart_reply_answers + * Output only. Multiple reply options provided by smart reply service. The + * order is based on the rank of the model prediction. + * The maximum number of the returned replies is set in SmartReplyConfig. + * @type string $latest_message + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * @type int $context_size + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Multiple reply options provided by smart reply service. The + * order is based on the rank of the model prediction. + * The maximum number of the returned replies is set in SmartReplyConfig. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyAnswer smart_reply_answers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSmartReplyAnswers() + { + return $this->smart_reply_answers; + } + + /** + * Output only. Multiple reply options provided by smart reply service. The + * order is based on the rank of the model prediction. + * The maximum number of the returned replies is set in SmartReplyConfig. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyAnswer smart_reply_answers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Dialogflow\V2\SmartReplyAnswer>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSmartReplyAnswers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SmartReplyAnswer::class); + $this->smart_reply_answers = $arr; + + return $this; + } + + /** + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getLatestMessage() + { + return $this->latest_message; + } + + /** + * The name of the latest conversation message used to compile + * suggestion for. + * Format: `projects//locations//conversations//messages/`. + * + * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestMessage($var) + { + GPBUtil::checkString($var, True); + $this->latest_message = $var; + + return $this; + } + + /** + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * + * Generated from protobuf field int32 context_size = 3; + * @return int + */ + public function getContextSize() + { + return $this->context_size; + } + + /** + * Number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. + * + * Generated from protobuf field int32 context_size = 3; + * @param int $var + * @return $this + */ + public function setContextSize($var) + { + GPBUtil::checkInt32($var); + $this->context_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature.php new file mode 100644 index 000000000000..f04dab6d457f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature.php @@ -0,0 +1,69 @@ +google.cloud.dialogflow.v2.SuggestionFeature + */ +class SuggestionFeature extends \Google\Protobuf\Internal\Message +{ + /** + * Type of Human Agent Assistant API feature to request. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type type = 1; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of Human Agent Assistant API feature to request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Type of Human Agent Assistant API feature to request. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of Human Agent Assistant API feature to request. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature/Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature/Type.php new file mode 100644 index 000000000000..fcc8a5082701 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature/Type.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.SuggestionFeature.Type + */ +class Type +{ + /** + * Unspecified feature type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Run article suggestion model for chat. + * + * Generated from protobuf enum ARTICLE_SUGGESTION = 1; + */ + const ARTICLE_SUGGESTION = 1; + /** + * Run FAQ model for chat. + * + * Generated from protobuf enum FAQ = 2; + */ + const FAQ = 2; + /** + * Run smart reply model for chat. + * + * Generated from protobuf enum SMART_REPLY = 3; + */ + const SMART_REPLY = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ARTICLE_SUGGESTION => 'ARTICLE_SUGGESTION', + self::FAQ => 'FAQ', + self::SMART_REPLY => 'SMART_REPLY', + ]; + + 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\Dialogflow\V2\SuggestionFeature_Type::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature_Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature_Type.php new file mode 100644 index 000000000000..596aebc4e398 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature_Type.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.SuggestionResult + */ +class SuggestionResult extends \Google\Protobuf\Internal\Message +{ + protected $suggestion_response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\Status $error + * Error status if the request failed. + * @type \Google\Cloud\Dialogflow\V2\SuggestArticlesResponse $suggest_articles_response + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + * @type \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse $suggest_faq_answers_response + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + * @type \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse $suggest_smart_replies_response + * SuggestSmartRepliesResponse if request is for SMART_REPLY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Error status if the request failed. + * + * Generated from protobuf field .google.rpc.Status error = 1; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->readOneof(1); + } + + public function hasError() + { + return $this->hasOneof(1); + } + + /** + * Error status if the request failed. + * + * Generated from protobuf field .google.rpc.Status error = 1; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestArticlesResponse suggest_articles_response = 2; + * @return \Google\Cloud\Dialogflow\V2\SuggestArticlesResponse|null + */ + public function getSuggestArticlesResponse() + { + return $this->readOneof(2); + } + + public function hasSuggestArticlesResponse() + { + return $this->hasOneof(2); + } + + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestArticlesResponse suggest_articles_response = 2; + * @param \Google\Cloud\Dialogflow\V2\SuggestArticlesResponse $var + * @return $this + */ + public function setSuggestArticlesResponse($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestArticlesResponse::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestFaqAnswersResponse suggest_faq_answers_response = 3; + * @return \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse|null + */ + public function getSuggestFaqAnswersResponse() + { + return $this->readOneof(3); + } + + public function hasSuggestFaqAnswersResponse() + { + return $this->hasOneof(3); + } + + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestFaqAnswersResponse suggest_faq_answers_response = 3; + * @param \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse $var + * @return $this + */ + public function setSuggestFaqAnswersResponse($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * SuggestSmartRepliesResponse if request is for SMART_REPLY. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestSmartRepliesResponse suggest_smart_replies_response = 4; + * @return \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse|null + */ + public function getSuggestSmartRepliesResponse() + { + return $this->readOneof(4); + } + + public function hasSuggestSmartRepliesResponse() + { + return $this->hasOneof(4); + } + + /** + * SuggestSmartRepliesResponse if request is for SMART_REPLY. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestSmartRepliesResponse suggest_smart_replies_response = 4; + * @param \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse $var + * @return $this + */ + public function setSuggestSmartRepliesResponse($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getSuggestionResponse() + { + return $this->whichOneof("suggestion_response"); + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SynthesizeSpeechConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SynthesizeSpeechConfig.php new file mode 100644 index 000000000000..d9426069bf0f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SynthesizeSpeechConfig.php @@ -0,0 +1,269 @@ +google.cloud.dialogflow.v2.SynthesizeSpeechConfig + */ +class SynthesizeSpeechConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal + * native speed supported by the specific voice. 2.0 is twice as fast, and + * 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any + * other values < 0.25 or > 4.0 will return an error. + * + * Generated from protobuf field double speaking_rate = 1; + */ + protected $speaking_rate = 0.0; + /** + * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 + * semitones from the original pitch. -20 means decrease 20 semitones from the + * original pitch. + * + * Generated from protobuf field double pitch = 2; + */ + protected $pitch = 0.0; + /** + * Optional. Volume gain (in dB) of the normal native volume supported by the + * specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of + * 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) + * will play at approximately half the amplitude of the normal native signal + * amplitude. A value of +6.0 (dB) will play at approximately twice the + * amplitude of the normal native signal amplitude. We strongly recommend not + * to exceed +10 (dB) as there's usually no effective increase in loudness for + * any value greater than that. + * + * Generated from protobuf field double volume_gain_db = 3; + */ + protected $volume_gain_db = 0.0; + /** + * Optional. An identifier which selects 'audio effects' profiles that are + * applied on (post synthesized) text to speech. Effects are applied on top of + * each other in the order they are given. + * + * Generated from protobuf field repeated string effects_profile_id = 5; + */ + private $effects_profile_id; + /** + * Optional. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.VoiceSelectionParams voice = 4; + */ + protected $voice = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $speaking_rate + * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal + * native speed supported by the specific voice. 2.0 is twice as fast, and + * 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any + * other values < 0.25 or > 4.0 will return an error. + * @type float $pitch + * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 + * semitones from the original pitch. -20 means decrease 20 semitones from the + * original pitch. + * @type float $volume_gain_db + * Optional. Volume gain (in dB) of the normal native volume supported by the + * specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of + * 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) + * will play at approximately half the amplitude of the normal native signal + * amplitude. A value of +6.0 (dB) will play at approximately twice the + * amplitude of the normal native signal amplitude. We strongly recommend not + * to exceed +10 (dB) as there's usually no effective increase in loudness for + * any value greater than that. + * @type array|\Google\Protobuf\Internal\RepeatedField $effects_profile_id + * Optional. An identifier which selects 'audio effects' profiles that are + * applied on (post synthesized) text to speech. Effects are applied on top of + * each other in the order they are given. + * @type \Google\Cloud\Dialogflow\V2\VoiceSelectionParams $voice + * Optional. The desired voice of the synthesized audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal + * native speed supported by the specific voice. 2.0 is twice as fast, and + * 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any + * other values < 0.25 or > 4.0 will return an error. + * + * Generated from protobuf field double speaking_rate = 1; + * @return float + */ + public function getSpeakingRate() + { + return $this->speaking_rate; + } + + /** + * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal + * native speed supported by the specific voice. 2.0 is twice as fast, and + * 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any + * other values < 0.25 or > 4.0 will return an error. + * + * Generated from protobuf field double speaking_rate = 1; + * @param float $var + * @return $this + */ + public function setSpeakingRate($var) + { + GPBUtil::checkDouble($var); + $this->speaking_rate = $var; + + return $this; + } + + /** + * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 + * semitones from the original pitch. -20 means decrease 20 semitones from the + * original pitch. + * + * Generated from protobuf field double pitch = 2; + * @return float + */ + public function getPitch() + { + return $this->pitch; + } + + /** + * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 + * semitones from the original pitch. -20 means decrease 20 semitones from the + * original pitch. + * + * Generated from protobuf field double pitch = 2; + * @param float $var + * @return $this + */ + public function setPitch($var) + { + GPBUtil::checkDouble($var); + $this->pitch = $var; + + return $this; + } + + /** + * Optional. Volume gain (in dB) of the normal native volume supported by the + * specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of + * 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) + * will play at approximately half the amplitude of the normal native signal + * amplitude. A value of +6.0 (dB) will play at approximately twice the + * amplitude of the normal native signal amplitude. We strongly recommend not + * to exceed +10 (dB) as there's usually no effective increase in loudness for + * any value greater than that. + * + * Generated from protobuf field double volume_gain_db = 3; + * @return float + */ + public function getVolumeGainDb() + { + return $this->volume_gain_db; + } + + /** + * Optional. Volume gain (in dB) of the normal native volume supported by the + * specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of + * 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) + * will play at approximately half the amplitude of the normal native signal + * amplitude. A value of +6.0 (dB) will play at approximately twice the + * amplitude of the normal native signal amplitude. We strongly recommend not + * to exceed +10 (dB) as there's usually no effective increase in loudness for + * any value greater than that. + * + * Generated from protobuf field double volume_gain_db = 3; + * @param float $var + * @return $this + */ + public function setVolumeGainDb($var) + { + GPBUtil::checkDouble($var); + $this->volume_gain_db = $var; + + return $this; + } + + /** + * Optional. An identifier which selects 'audio effects' profiles that are + * applied on (post synthesized) text to speech. Effects are applied on top of + * each other in the order they are given. + * + * Generated from protobuf field repeated string effects_profile_id = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEffectsProfileId() + { + return $this->effects_profile_id; + } + + /** + * Optional. An identifier which selects 'audio effects' profiles that are + * applied on (post synthesized) text to speech. Effects are applied on top of + * each other in the order they are given. + * + * Generated from protobuf field repeated string effects_profile_id = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEffectsProfileId($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->effects_profile_id = $arr; + + return $this; + } + + /** + * Optional. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.VoiceSelectionParams voice = 4; + * @return \Google\Cloud\Dialogflow\V2\VoiceSelectionParams|null + */ + public function getVoice() + { + return $this->voice; + } + + public function hasVoice() + { + return isset($this->voice); + } + + public function clearVoice() + { + unset($this->voice); + } + + /** + * Optional. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.VoiceSelectionParams voice = 4; + * @param \Google\Cloud\Dialogflow\V2\VoiceSelectionParams $var + * @return $this + */ + public function setVoice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\VoiceSelectionParams::class); + $this->voice = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmf.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmf.php new file mode 100644 index 000000000000..c647551cae30 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmf.php @@ -0,0 +1,160 @@ +google.cloud.dialogflow.v2.TelephonyDtmf + */ +class TelephonyDtmf +{ + /** + * Not specified. This value may be used to indicate an absent digit. + * + * Generated from protobuf enum TELEPHONY_DTMF_UNSPECIFIED = 0; + */ + const TELEPHONY_DTMF_UNSPECIFIED = 0; + /** + * Number: '1'. + * + * Generated from protobuf enum DTMF_ONE = 1; + */ + const DTMF_ONE = 1; + /** + * Number: '2'. + * + * Generated from protobuf enum DTMF_TWO = 2; + */ + const DTMF_TWO = 2; + /** + * Number: '3'. + * + * Generated from protobuf enum DTMF_THREE = 3; + */ + const DTMF_THREE = 3; + /** + * Number: '4'. + * + * Generated from protobuf enum DTMF_FOUR = 4; + */ + const DTMF_FOUR = 4; + /** + * Number: '5'. + * + * Generated from protobuf enum DTMF_FIVE = 5; + */ + const DTMF_FIVE = 5; + /** + * Number: '6'. + * + * Generated from protobuf enum DTMF_SIX = 6; + */ + const DTMF_SIX = 6; + /** + * Number: '7'. + * + * Generated from protobuf enum DTMF_SEVEN = 7; + */ + const DTMF_SEVEN = 7; + /** + * Number: '8'. + * + * Generated from protobuf enum DTMF_EIGHT = 8; + */ + const DTMF_EIGHT = 8; + /** + * Number: '9'. + * + * Generated from protobuf enum DTMF_NINE = 9; + */ + const DTMF_NINE = 9; + /** + * Number: '0'. + * + * Generated from protobuf enum DTMF_ZERO = 10; + */ + const DTMF_ZERO = 10; + /** + * Letter: 'A'. + * + * Generated from protobuf enum DTMF_A = 11; + */ + const DTMF_A = 11; + /** + * Letter: 'B'. + * + * Generated from protobuf enum DTMF_B = 12; + */ + const DTMF_B = 12; + /** + * Letter: 'C'. + * + * Generated from protobuf enum DTMF_C = 13; + */ + const DTMF_C = 13; + /** + * Letter: 'D'. + * + * Generated from protobuf enum DTMF_D = 14; + */ + const DTMF_D = 14; + /** + * Asterisk/star: '*'. + * + * Generated from protobuf enum DTMF_STAR = 15; + */ + const DTMF_STAR = 15; + /** + * Pound/diamond/hash/square/gate/octothorpe: '#'. + * + * Generated from protobuf enum DTMF_POUND = 16; + */ + const DTMF_POUND = 16; + + private static $valueToName = [ + self::TELEPHONY_DTMF_UNSPECIFIED => 'TELEPHONY_DTMF_UNSPECIFIED', + self::DTMF_ONE => 'DTMF_ONE', + self::DTMF_TWO => 'DTMF_TWO', + self::DTMF_THREE => 'DTMF_THREE', + self::DTMF_FOUR => 'DTMF_FOUR', + self::DTMF_FIVE => 'DTMF_FIVE', + self::DTMF_SIX => 'DTMF_SIX', + self::DTMF_SEVEN => 'DTMF_SEVEN', + self::DTMF_EIGHT => 'DTMF_EIGHT', + self::DTMF_NINE => 'DTMF_NINE', + self::DTMF_ZERO => 'DTMF_ZERO', + self::DTMF_A => 'DTMF_A', + self::DTMF_B => 'DTMF_B', + self::DTMF_C => 'DTMF_C', + self::DTMF_D => 'DTMF_D', + self::DTMF_STAR => 'DTMF_STAR', + self::DTMF_POUND => 'DTMF_POUND', + ]; + + 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmfEvents.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmfEvents.php new file mode 100644 index 000000000000..ad3a6c6a3f14 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmfEvents.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.v2.TelephonyDtmfEvents + */ +class TelephonyDtmfEvents extends \Google\Protobuf\Internal\Message +{ + /** + * A sequence of TelephonyDtmf digits. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.TelephonyDtmf dtmf_events = 1; + */ + private $dtmf_events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $dtmf_events + * A sequence of TelephonyDtmf digits. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * A sequence of TelephonyDtmf digits. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.TelephonyDtmf dtmf_events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDtmfEvents() + { + return $this->dtmf_events; + } + + /** + * A sequence of TelephonyDtmf digits. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.TelephonyDtmf dtmf_events = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDtmfEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\TelephonyDtmf::class); + $this->dtmf_events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextInput.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextInput.php new file mode 100644 index 000000000000..c9836cc74f9c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextInput.php @@ -0,0 +1,119 @@ +google.cloud.dialogflow.v2.TextInput + */ +class TextInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The UTF-8 encoded natural language text to be processed. + * Text length must not exceed 256 characters for virtual agent interactions. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $text = ''; + /** + * Required. The language of this conversational query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Required. The UTF-8 encoded natural language text to be processed. + * Text length must not exceed 256 characters for virtual agent interactions. + * @type string $language_code + * Required. The language of this conversational query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. The UTF-8 encoded natural language text to be processed. + * Text length must not exceed 256 characters for virtual agent interactions. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. The UTF-8 encoded natural language text to be processed. + * Text length must not exceed 256 characters for virtual agent interactions. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Required. The language of this conversational query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Required. The language of this conversational query. See [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. Note that queries in + * the same session do not necessarily need to specify the same language. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextToSpeechSettings.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextToSpeechSettings.php new file mode 100644 index 000000000000..ab020b9a6dfa --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextToSpeechSettings.php @@ -0,0 +1,197 @@ +google.cloud.dialogflow.v2.TextToSpeechSettings + */ +class TextToSpeechSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Indicates whether text to speech is enabled. Even when this field + * is false, other settings in this proto are still retained. + * + * Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_text_to_speech = false; + /** + * Required. Audio encoding of the synthesized audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_audio_encoding = 0; + /** + * Optional. The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). + * + * Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sample_rate_hertz = 0; + /** + * Optional. Configuration of how speech should be synthesized, mapping from + * language (https://cloud.google.com/dialogflow/docs/reference/language) to + * SynthesizeSpeechConfig. + * + * Generated from protobuf field map synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $synthesize_speech_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_text_to_speech + * Optional. Indicates whether text to speech is enabled. Even when this field + * is false, other settings in this proto are still retained. + * @type int $output_audio_encoding + * Required. Audio encoding of the synthesized audio content. + * @type int $sample_rate_hertz + * Optional. The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). + * @type array|\Google\Protobuf\Internal\MapField $synthesize_speech_configs + * Optional. Configuration of how speech should be synthesized, mapping from + * language (https://cloud.google.com/dialogflow/docs/reference/language) to + * SynthesizeSpeechConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Indicates whether text to speech is enabled. Even when this field + * is false, other settings in this proto are still retained. + * + * Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableTextToSpeech() + { + return $this->enable_text_to_speech; + } + + /** + * Optional. Indicates whether text to speech is enabled. Even when this field + * is false, other settings in this proto are still retained. + * + * Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableTextToSpeech($var) + { + GPBUtil::checkBool($var); + $this->enable_text_to_speech = $var; + + return $this; + } + + /** + * Required. Audio encoding of the synthesized audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getOutputAudioEncoding() + { + return $this->output_audio_encoding; + } + + /** + * Required. Audio encoding of the synthesized audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setOutputAudioEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\OutputAudioEncoding::class); + $this->output_audio_encoding = $var; + + return $this; + } + + /** + * Optional. The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). + * + * Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSampleRateHertz() + { + return $this->sample_rate_hertz; + } + + /** + * Optional. The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). + * + * Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->sample_rate_hertz = $var; + + return $this; + } + + /** + * Optional. Configuration of how speech should be synthesized, mapping from + * language (https://cloud.google.com/dialogflow/docs/reference/language) to + * SynthesizeSpeechConfig. + * + * Generated from protobuf field map synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSynthesizeSpeechConfigs() + { + return $this->synthesize_speech_configs; + } + + /** + * Optional. Configuration of how speech should be synthesized, mapping from + * language (https://cloud.google.com/dialogflow/docs/reference/language) to + * SynthesizeSpeechConfig. + * + * Generated from protobuf field map synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSynthesizeSpeechConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig::class); + $this->synthesize_speech_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TrainAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TrainAgentRequest.php new file mode 100644 index 000000000000..6657017d7d38 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TrainAgentRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.TrainAgentRequest + */ +class TrainAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that the agent to train is associated with. + * Format: `projects/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project that the agent to train is associated with. + * Format: `projects/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that the agent to train is associated with. + * Format: `projects/`. + * + * 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 project that the agent to train is associated with. + * Format: `projects/`. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelOperationMetadata.php new file mode 100644 index 000000000000..95fe6f8dccd8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelOperationMetadata.php @@ -0,0 +1,121 @@ +google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + */ +class UndeployConversationModelOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + */ + protected $conversation_model = ''; + /** + * Timestamp when the request to undeploy conversation model was submitted. + * The time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conversation_model + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp when the request to undeploy conversation model was submitted. + * The time is measured on server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + * @return string + */ + public function getConversationModel() + { + return $this->conversation_model; + } + + /** + * The resource name of the conversation model. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string conversation_model = 1; + * @param string $var + * @return $this + */ + public function setConversationModel($var) + { + GPBUtil::checkString($var, True); + $this->conversation_model = $var; + + return $this; + } + + /** + * Timestamp when the request to undeploy conversation model was submitted. + * The time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @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); + } + + /** + * Timestamp when the request to undeploy conversation model was submitted. + * The time is measured on server side. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelRequest.php new file mode 100644 index 000000000000..fcc391de050b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.v2.UndeployConversationModelRequest + */ +class UndeployConversationModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation model to undeploy. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The conversation model to undeploy. Format: + * `projects//conversationModels/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation model to undeploy. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The conversation model to undeploy. Format: + * `projects//conversationModels/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateAnswerRecordRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateAnswerRecordRequest.php new file mode 100644 index 000000000000..b4cb0c3ef350 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateAnswerRecordRequest.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.v2.UpdateAnswerRecordRequest + */ +class UpdateAnswerRecordRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Answer record to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerRecord answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $answer_record = null; + /** + * Required. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\AnswerRecord $answer_record + * Required. Answer record to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); + parent::__construct($data); + } + + /** + * Required. Answer record to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerRecord answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\AnswerRecord|null + */ + public function getAnswerRecord() + { + return $this->answer_record; + } + + public function hasAnswerRecord() + { + return isset($this->answer_record); + } + + public function clearAnswerRecord() + { + unset($this->answer_record); + } + + /** + * Required. Answer record to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerRecord answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\AnswerRecord $var + * @return $this + */ + public function setAnswerRecord($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AnswerRecord::class); + $this->answer_record = $var; + + return $this; + } + + /** + * Required. The mask to control which fields get 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 mask to control which fields get 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateContextRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateContextRequest.php new file mode 100644 index 000000000000..18619d49cce0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateContextRequest.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.v2.UpdateContextRequest + */ +class UpdateContextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The context to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = null; + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Context $context + * Required. The context to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); + parent::__construct($data); + } + + /** + * Required. The context to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Context|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Required. The context to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Context $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Context::class); + $this->context = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateConversationProfileRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateConversationProfileRequest.php new file mode 100644 index 000000000000..57db8a42bc88 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateConversationProfileRequest.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.v2.UpdateConversationProfileRequest + */ +class UpdateConversationProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The conversation profile to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation_profile = null; + /** + * Required. The mask to control which fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\ConversationProfile $conversation_profile + * Required. The conversation profile to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The mask to control which fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); + parent::__construct($data); + } + + /** + * Required. The conversation profile to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\ConversationProfile|null + */ + public function getConversationProfile() + { + return $this->conversation_profile; + } + + public function hasConversationProfile() + { + return isset($this->conversation_profile); + } + + public function clearConversationProfile() + { + unset($this->conversation_profile); + } + + /** + * Required. The conversation profile to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\ConversationProfile $var + * @return $this + */ + public function setConversationProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationProfile::class); + $this->conversation_profile = $var; + + return $this; + } + + /** + * Required. The mask to control which fields to update. + * + * 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 mask to control which fields to update. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateDocumentRequest.php new file mode 100644 index 000000000000..8e37d2863ba3 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateDocumentRequest.php @@ -0,0 +1,130 @@ +google.cloud.dialogflow.v2.UpdateDocumentRequest + */ +class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The document to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Document $document + * Required. The document to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The document to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The document to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Document::class); + $this->document = $var; + + return $this; + } + + /** + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEntityTypeRequest.php new file mode 100644 index 000000000000..532e1cb41944 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEntityTypeRequest.php @@ -0,0 +1,172 @@ +google.cloud.dialogflow.v2.UpdateEntityTypeRequest + */ +class UpdateEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The entity type to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_type = null; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\EntityType $entity_type + * Required. The entity type to update. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The entity type to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\EntityType|null + */ + public function getEntityType() + { + return $this->entity_type; + } + + public function hasEntityType() + { + return isset($this->entity_type); + } + + public function clearEntityType() + { + unset($this->entity_type); + } + + /** + * Required. The entity type to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\EntityType $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EntityType::class); + $this->entity_type = $var; + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEnvironmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEnvironmentRequest.php new file mode 100644 index 000000000000..de77205bc8d5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEnvironmentRequest.php @@ -0,0 +1,168 @@ +google.cloud.dialogflow.v2.UpdateEnvironmentRequest + */ +class UpdateEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The environment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment = null; + /** + * Required. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. This field is used to prevent accidental overwrite of the default + * environment, which is an operation that cannot be undone. To confirm that + * the caller desires this overwrite, this field must be explicitly set to + * true when updating the default environment (environment ID = `-`). + * + * Generated from protobuf field bool allow_load_to_draft_and_discard_changes = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_load_to_draft_and_discard_changes = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Environment $environment + * Required. The environment to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The mask to control which fields get updated. + * @type bool $allow_load_to_draft_and_discard_changes + * Optional. This field is used to prevent accidental overwrite of the default + * environment, which is an operation that cannot be undone. To confirm that + * the caller desires this overwrite, this field must be explicitly set to + * true when updating the default environment (environment ID = `-`). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The environment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Required. The environment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Environment::class); + $this->environment = $var; + + return $this; + } + + /** + * Required. The mask to control which fields get 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 mask to control which fields get 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; + } + + /** + * Optional. This field is used to prevent accidental overwrite of the default + * environment, which is an operation that cannot be undone. To confirm that + * the caller desires this overwrite, this field must be explicitly set to + * true when updating the default environment (environment ID = `-`). + * + * Generated from protobuf field bool allow_load_to_draft_and_discard_changes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowLoadToDraftAndDiscardChanges() + { + return $this->allow_load_to_draft_and_discard_changes; + } + + /** + * Optional. This field is used to prevent accidental overwrite of the default + * environment, which is an operation that cannot be undone. To confirm that + * the caller desires this overwrite, this field must be explicitly set to + * true when updating the default environment (environment ID = `-`). + * + * Generated from protobuf field bool allow_load_to_draft_and_discard_changes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowLoadToDraftAndDiscardChanges($var) + { + GPBUtil::checkBool($var); + $this->allow_load_to_draft_and_discard_changes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateFulfillmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateFulfillmentRequest.php new file mode 100644 index 000000000000..affd77840a10 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateFulfillmentRequest.php @@ -0,0 +1,126 @@ +google.cloud.dialogflow.v2.UpdateFulfillmentRequest + */ +class UpdateFulfillmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fulfillment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fulfillment = null; + /** + * Required. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Fulfillment $fulfillment + * Required. The fulfillment to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fulfillment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Fulfillment|null + */ + public function getFulfillment() + { + return $this->fulfillment; + } + + public function hasFulfillment() + { + return isset($this->fulfillment); + } + + public function clearFulfillment() + { + unset($this->fulfillment); + } + + /** + * Required. The fulfillment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Fulfillment $var + * @return $this + */ + public function setFulfillment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Fulfillment::class); + $this->fulfillment = $var; + + return $this; + } + + /** + * Required. The mask to control which fields get updated. If the mask is not + * present, all fields will 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 mask to control which fields get updated. If the mask is not + * present, all fields will 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateIntentRequest.php new file mode 100644 index 000000000000..d5b1f04df3b2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateIntentRequest.php @@ -0,0 +1,206 @@ +google.cloud.dialogflow.v2.UpdateIntentRequest + */ +class UpdateIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The intent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intent = null; + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $intent_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Intent $intent + * Required. The intent to update. + * @type string $language_code + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields get updated. + * @type int $intent_view + * Optional. The resource view to apply to the returned intent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The intent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Intent|null + */ + public function getIntent() + { + return $this->intent; + } + + public function hasIntent() + { + return isset($this->intent); + } + + public function clearIntent() + { + unset($this->intent); + } + + /** + * Required. The intent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Intent $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent::class); + $this->intent = $var; + + return $this; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIntentView() + { + return $this->intent_view; + } + + /** + * Optional. The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIntentView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); + $this->intent_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateKnowledgeBaseRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateKnowledgeBaseRequest.php new file mode 100644 index 000000000000..25415a229dee --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateKnowledgeBaseRequest.php @@ -0,0 +1,130 @@ +google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest + */ +class UpdateKnowledgeBaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The knowledge base to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $knowledge_base = null; + /** + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\KnowledgeBase $knowledge_base + * Required. The knowledge base to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The knowledge base to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\KnowledgeBase|null + */ + public function getKnowledgeBase() + { + return $this->knowledge_base; + } + + public function hasKnowledgeBase() + { + return isset($this->knowledge_base); + } + + public function clearKnowledgeBase() + { + unset($this->knowledge_base); + } + + /** + * Required. The knowledge base to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\KnowledgeBase $var + * @return $this + */ + public function setKnowledgeBase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\KnowledgeBase::class); + $this->knowledge_base = $var; + + return $this; + } + + /** + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateParticipantRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateParticipantRequest.php new file mode 100644 index 000000000000..e2ae18a72bb5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateParticipantRequest.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.v2.UpdateParticipantRequest + */ +class UpdateParticipantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The participant to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $participant = null; + /** + * Required. The mask to specify which fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Participant $participant + * Required. The participant to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The mask to specify which fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); + parent::__construct($data); + } + + /** + * Required. The participant to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Participant|null + */ + public function getParticipant() + { + return $this->participant; + } + + public function hasParticipant() + { + return isset($this->participant); + } + + public function clearParticipant() + { + unset($this->participant); + } + + /** + * Required. The participant to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Participant $var + * @return $this + */ + public function setParticipant($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Participant::class); + $this->participant = $var; + + return $this; + } + + /** + * Required. The mask to specify which fields to update. + * + * 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 mask to specify which fields to update. + * + * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateSessionEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateSessionEntityTypeRequest.php new file mode 100644 index 000000000000..4663a03d7417 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateSessionEntityTypeRequest.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest + */ +class UpdateSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The session entity type to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session_entity_type = null; + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\SessionEntityType $session_entity_type + * Required. The session entity type to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The session entity type to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\SessionEntityType|null + */ + public function getSessionEntityType() + { + return $this->session_entity_type; + } + + public function hasSessionEntityType() + { + return isset($this->session_entity_type); + } + + public function clearSessionEntityType() + { + unset($this->session_entity_type); + } + + /** + * Required. The session entity type to update. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\SessionEntityType $var + * @return $this + */ + public function setSessionEntityType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); + $this->session_entity_type = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateVersionRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateVersionRequest.php new file mode 100644 index 000000000000..b5f31afcf407 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateVersionRequest.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.v2.UpdateVersionRequest + */ +class UpdateVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The version to update. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = null; + /** + * Required. The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\V2\Version $version + * Required. The version to update. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The version to update. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\V2\Version|null + */ + public function getVersion() + { + return $this->version; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * Required. The version to update. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\V2\Version $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Version::class); + $this->version = $var; + + return $this; + } + + /** + * Required. The mask to control which fields get 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 mask to control which fields get 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError.php new file mode 100644 index 000000000000..a9216f15ccb6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError.php @@ -0,0 +1,183 @@ +google.cloud.dialogflow.v2.ValidationError + */ +class ValidationError extends \Google\Protobuf\Internal\Message +{ + /** + * The severity of the error. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ValidationError.Severity severity = 1; + */ + protected $severity = 0; + /** + * The names of the entries that the error is associated with. + * Format: + * - "projects//agent", if the error is associated with the entire + * agent. + * - "projects//agent/intents/", if the error is + * associated with certain intents. + * - "projects//agent/intents//trainingPhrases/", if the + * error is associated with certain intent training phrases. + * - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. + * - "projects//agent/entities/", if the error is + * associated with certain entities. + * + * Generated from protobuf field repeated string entries = 3; + */ + private $entries; + /** + * The detailed error message. + * + * Generated from protobuf field string error_message = 4; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $severity + * The severity of the error. + * @type array|\Google\Protobuf\Internal\RepeatedField $entries + * The names of the entries that the error is associated with. + * Format: + * - "projects//agent", if the error is associated with the entire + * agent. + * - "projects//agent/intents/", if the error is + * associated with certain intents. + * - "projects//agent/intents//trainingPhrases/", if the + * error is associated with certain intent training phrases. + * - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. + * - "projects//agent/entities/", if the error is + * associated with certain entities. + * @type string $error_message + * The detailed error message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ValidationResult::initOnce(); + parent::__construct($data); + } + + /** + * The severity of the error. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ValidationError.Severity severity = 1; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * The severity of the error. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.ValidationError.Severity severity = 1; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ValidationError\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * The names of the entries that the error is associated with. + * Format: + * - "projects//agent", if the error is associated with the entire + * agent. + * - "projects//agent/intents/", if the error is + * associated with certain intents. + * - "projects//agent/intents//trainingPhrases/", if the + * error is associated with certain intent training phrases. + * - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. + * - "projects//agent/entities/", if the error is + * associated with certain entities. + * + * Generated from protobuf field repeated string entries = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * The names of the entries that the error is associated with. + * Format: + * - "projects//agent", if the error is associated with the entire + * agent. + * - "projects//agent/intents/", if the error is + * associated with certain intents. + * - "projects//agent/intents//trainingPhrases/", if the + * error is associated with certain intent training phrases. + * - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. + * - "projects//agent/entities/", if the error is + * associated with certain entities. + * + * Generated from protobuf field repeated string entries = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->entries = $arr; + + return $this; + } + + /** + * The detailed error message. + * + * Generated from protobuf field string error_message = 4; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * The detailed error message. + * + * Generated from protobuf field string error_message = 4; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError/Severity.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError/Severity.php new file mode 100644 index 000000000000..893aa5c46a19 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError/Severity.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.v2.ValidationError.Severity + */ +class Severity +{ + /** + * Not specified. This value should never be used. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * The agent doesn't follow Dialogflow best practices. + * + * Generated from protobuf enum INFO = 1; + */ + const INFO = 1; + /** + * The agent may not behave as expected. + * + * Generated from protobuf enum WARNING = 2; + */ + const WARNING = 2; + /** + * The agent may experience partial failures. + * + * Generated from protobuf enum ERROR = 3; + */ + const ERROR = 3; + /** + * The agent may completely fail. + * + * Generated from protobuf enum CRITICAL = 4; + */ + const CRITICAL = 4; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::INFO => 'INFO', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + self::CRITICAL => 'CRITICAL', + ]; + + 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(Severity::class, \Google\Cloud\Dialogflow\V2\ValidationError_Severity::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError_Severity.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError_Severity.php new file mode 100644 index 000000000000..370f02480692 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError_Severity.php @@ -0,0 +1,16 @@ +google.cloud.dialogflow.v2.ValidationResult + */ +class ValidationResult extends \Google\Protobuf\Internal\Message +{ + /** + * Contains all validation errors. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ValidationError validation_errors = 1; + */ + private $validation_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\V2\ValidationError>|\Google\Protobuf\Internal\RepeatedField $validation_errors + * Contains all validation errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\ValidationResult::initOnce(); + parent::__construct($data); + } + + /** + * Contains all validation errors. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ValidationError validation_errors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValidationErrors() + { + return $this->validation_errors; + } + + /** + * Contains all validation errors. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ValidationError validation_errors = 1; + * @param array<\Google\Cloud\Dialogflow\V2\ValidationError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValidationErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ValidationError::class); + $this->validation_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version.php new file mode 100644 index 000000000000..8e7a86fa5836 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version.php @@ -0,0 +1,254 @@ +google.cloud.dialogflow.v2.Version + */ +class Version extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique identifier of this agent version. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. The developer-provided description of this version. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The sequential number of this version. This field is read-only + * which means it cannot be set by create and update methods. + * + * Generated from protobuf field int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version_number = 0; + /** + * Output only. The creation time of this version. This field is read-only, + * i.e., it cannot be set by create and update methods. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The status of this version. This field is read-only and cannot + * be set by create and update methods. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique identifier of this agent version. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * @type string $description + * Optional. The developer-provided description of this version. + * @type int $version_number + * Output only. The sequential number of this version. This field is read-only + * which means it cannot be set by create and update methods. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of this version. This field is read-only, + * i.e., it cannot be set by create and update methods. + * @type int $status + * Output only. The status of this version. This field is read-only and cannot + * be set by create and update methods. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique identifier of this agent version. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique identifier of this agent version. + * Supported formats: + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The developer-provided description of this version. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The developer-provided description of this version. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The sequential number of this version. This field is read-only + * which means it cannot be set by create and update methods. + * + * Generated from protobuf field int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVersionNumber() + { + return $this->version_number; + } + + /** + * Output only. The sequential number of this version. This field is read-only + * which means it cannot be set by create and update methods. + * + * Generated from protobuf field int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVersionNumber($var) + { + GPBUtil::checkInt32($var); + $this->version_number = $var; + + return $this; + } + + /** + * Output only. The creation time of this version. This field is read-only, + * i.e., it cannot be set by create and update methods. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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 creation time of this version. This field is read-only, + * i.e., it cannot be set by create and update methods. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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 status of this version. This field is read-only and cannot + * be set by create and update methods. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. The status of this version. This field is read-only and cannot + * be set by create and update methods. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Version\VersionStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version/VersionStatus.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version/VersionStatus.php new file mode 100644 index 000000000000..cafb8c2f098b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version/VersionStatus.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.v2.Version.VersionStatus + */ +class VersionStatus +{ + /** + * Not specified. This value is not used. + * + * Generated from protobuf enum VERSION_STATUS_UNSPECIFIED = 0; + */ + const VERSION_STATUS_UNSPECIFIED = 0; + /** + * Version is not ready to serve (e.g. training is in progress). + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * Version is ready to serve. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Version training failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::VERSION_STATUS_UNSPECIFIED => 'VERSION_STATUS_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::READY => 'READY', + self::FAILED => 'FAILED', + ]; + + 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(VersionStatus::class, \Google\Cloud\Dialogflow\V2\Version_VersionStatus::class); + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version_VersionStatus.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version_VersionStatus.php new file mode 100644 index 000000000000..cb9460da276c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version_VersionStatus.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.dialogflow.v2.Versions/ListVersions', + $argument, + ['\Google\Cloud\Dialogflow\V2\ListVersionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the specified agent version. + * @param \Google\Cloud\Dialogflow\V2\GetVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetVersion(\Google\Cloud\Dialogflow\V2\GetVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Versions/GetVersion', + $argument, + ['\Google\Cloud\Dialogflow\V2\Version', 'decode'], + $metadata, $options); + } + + /** + * Creates an agent version. + * + * The new version points to the agent instance in the "default" environment. + * @param \Google\Cloud\Dialogflow\V2\CreateVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateVersion(\Google\Cloud\Dialogflow\V2\CreateVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Versions/CreateVersion', + $argument, + ['\Google\Cloud\Dialogflow\V2\Version', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified agent version. + * + * Note that this method does not allow you to update the state of the agent + * the given version points to. It allows you to update only mutable + * properties of the version resource. + * @param \Google\Cloud\Dialogflow\V2\UpdateVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateVersion(\Google\Cloud\Dialogflow\V2\UpdateVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Versions/UpdateVersion', + $argument, + ['\Google\Cloud\Dialogflow\V2\Version', 'decode'], + $metadata, $options); + } + + /** + * Delete the specified agent version. + * @param \Google\Cloud\Dialogflow\V2\DeleteVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteVersion(\Google\Cloud\Dialogflow\V2\DeleteVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.dialogflow.v2.Versions/DeleteVersion', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VoiceSelectionParams.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VoiceSelectionParams.php new file mode 100644 index 000000000000..762f054c7ec1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VoiceSelectionParams.php @@ -0,0 +1,129 @@ +google.cloud.dialogflow.v2.VoiceSelectionParams + */ +class VoiceSelectionParams extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The name of the voice. If not set, the service will choose a + * voice based on the other parameters such as language_code and + * [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. The preferred gender of the voice. If not set, the service will + * choose a voice based on the other parameters such as language_code and + * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer should substitute a voice with a + * different gender rather than failing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2; + */ + protected $ssml_gender = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. The name of the voice. If not set, the service will choose a + * voice based on the other parameters such as language_code and + * [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. + * @type int $ssml_gender + * Optional. The preferred gender of the voice. If not set, the service will + * choose a voice based on the other parameters such as language_code and + * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer should substitute a voice with a + * different gender rather than failing the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The name of the voice. If not set, the service will choose a + * voice based on the other parameters such as language_code and + * [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. The name of the voice. If not set, the service will choose a + * voice based on the other parameters such as language_code and + * [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. + * + * 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; + } + + /** + * Optional. The preferred gender of the voice. If not set, the service will + * choose a voice based on the other parameters such as language_code and + * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer should substitute a voice with a + * different gender rather than failing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2; + * @return int + */ + public function getSsmlGender() + { + return $this->ssml_gender; + } + + /** + * Optional. The preferred gender of the voice. If not set, the service will + * choose a voice based on the other parameters such as language_code and + * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer should substitute a voice with a + * different gender rather than failing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2; + * @param int $var + * @return $this + */ + public function setSsmlGender($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SsmlVoiceGender::class); + $this->ssml_gender = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookRequest.php new file mode 100644 index 000000000000..e00b19da7256 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookRequest.php @@ -0,0 +1,217 @@ +google.cloud.dialogflow.v2.WebhookRequest + */ +class WebhookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of detectIntent request session. + * Can be used to identify end-user inside webhook implementation. + * Format: `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. + * + * Generated from protobuf field string session = 4; + */ + protected $session = ''; + /** + * The unique identifier of the response. Contains the same value as + * `[Streaming]DetectIntentResponse.response_id`. + * + * Generated from protobuf field string response_id = 1; + */ + protected $response_id = ''; + /** + * The result of the conversational query or event processing. Contains the + * same value as `[Streaming]DetectIntentResponse.query_result`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; + */ + protected $query_result = null; + /** + * Optional. The contents of the original request that was passed to + * `[Streaming]DetectIntent` call. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OriginalDetectIntentRequest original_detect_intent_request = 3; + */ + protected $original_detect_intent_request = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $session + * The unique identifier of detectIntent request session. + * Can be used to identify end-user inside webhook implementation. + * Format: `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. + * @type string $response_id + * The unique identifier of the response. Contains the same value as + * `[Streaming]DetectIntentResponse.response_id`. + * @type \Google\Cloud\Dialogflow\V2\QueryResult $query_result + * The result of the conversational query or event processing. Contains the + * same value as `[Streaming]DetectIntentResponse.query_result`. + * @type \Google\Cloud\Dialogflow\V2\OriginalDetectIntentRequest $original_detect_intent_request + * Optional. The contents of the original request that was passed to + * `[Streaming]DetectIntent` call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of detectIntent request session. + * Can be used to identify end-user inside webhook implementation. + * Format: `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. + * + * Generated from protobuf field string session = 4; + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * The unique identifier of detectIntent request session. + * Can be used to identify end-user inside webhook implementation. + * Format: `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. + * + * Generated from protobuf field string session = 4; + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + + /** + * The unique identifier of the response. Contains the same value as + * `[Streaming]DetectIntentResponse.response_id`. + * + * Generated from protobuf field string response_id = 1; + * @return string + */ + public function getResponseId() + { + return $this->response_id; + } + + /** + * The unique identifier of the response. Contains the same value as + * `[Streaming]DetectIntentResponse.response_id`. + * + * Generated from protobuf field string response_id = 1; + * @param string $var + * @return $this + */ + public function setResponseId($var) + { + GPBUtil::checkString($var, True); + $this->response_id = $var; + + return $this; + } + + /** + * The result of the conversational query or event processing. Contains the + * same value as `[Streaming]DetectIntentResponse.query_result`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; + * @return \Google\Cloud\Dialogflow\V2\QueryResult|null + */ + public function getQueryResult() + { + return $this->query_result; + } + + public function hasQueryResult() + { + return isset($this->query_result); + } + + public function clearQueryResult() + { + unset($this->query_result); + } + + /** + * The result of the conversational query or event processing. Contains the + * same value as `[Streaming]DetectIntentResponse.query_result`. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; + * @param \Google\Cloud\Dialogflow\V2\QueryResult $var + * @return $this + */ + public function setQueryResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryResult::class); + $this->query_result = $var; + + return $this; + } + + /** + * Optional. The contents of the original request that was passed to + * `[Streaming]DetectIntent` call. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OriginalDetectIntentRequest original_detect_intent_request = 3; + * @return \Google\Cloud\Dialogflow\V2\OriginalDetectIntentRequest|null + */ + public function getOriginalDetectIntentRequest() + { + return $this->original_detect_intent_request; + } + + public function hasOriginalDetectIntentRequest() + { + return isset($this->original_detect_intent_request); + } + + public function clearOriginalDetectIntentRequest() + { + unset($this->original_detect_intent_request); + } + + /** + * Optional. The contents of the original request that was passed to + * `[Streaming]DetectIntent` call. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.OriginalDetectIntentRequest original_detect_intent_request = 3; + * @param \Google\Cloud\Dialogflow\V2\OriginalDetectIntentRequest $var + * @return $this + */ + public function setOriginalDetectIntentRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OriginalDetectIntentRequest::class); + $this->original_detect_intent_request = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookResponse.php new file mode 100644 index 000000000000..df629dd7b5f3 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookResponse.php @@ -0,0 +1,430 @@ +google.cloud.dialogflow.v2.WebhookResponse + */ +class WebhookResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The text response message intended for the end-user. + * It is recommended to use `fulfillment_messages.text.text[0]` instead. + * When provided, Dialogflow uses this field to populate + * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] + * sent to the integration or API caller. + * + * Generated from protobuf field string fulfillment_text = 1; + */ + protected $fulfillment_text = ''; + /** + * Optional. The rich response messages intended for the end-user. + * When provided, Dialogflow uses this field to populate + * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] + * sent to the integration or API caller. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; + */ + private $fulfillment_messages; + /** + * Optional. A custom field used to identify the webhook source. + * Arbitrary strings are supported. + * When provided, Dialogflow uses this field to populate + * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] + * sent to the integration or API caller. + * + * Generated from protobuf field string source = 3; + */ + protected $source = ''; + /** + * Optional. This field can be used to pass custom data from your webhook to + * the integration or API caller. Arbitrary JSON objects are supported. When + * provided, Dialogflow uses this field to populate + * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] + * sent to the integration or API caller. This field is also used by the + * [Google Assistant + * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + * for rich response messages. + * See the format definition at [Google Assistant Dialogflow webhook + * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) + * + * Generated from protobuf field .google.protobuf.Struct payload = 4; + */ + protected $payload = null; + /** + * Optional. The collection of output contexts that will overwrite currently + * active contexts for the session and reset their lifespans. + * When provided, Dialogflow uses this field to populate + * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] + * sent to the integration or API caller. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; + */ + private $output_contexts; + /** + * Optional. Invokes the supplied events. + * When this field is set, Dialogflow ignores the `fulfillment_text`, + * `fulfillment_messages`, and `payload` fields. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput followup_event_input = 6; + */ + protected $followup_event_input = null; + /** + * Optional. Additional session entity types to replace or extend developer + * entity types with. The entity synonyms apply to all languages and persist + * for the session. Setting this data from a webhook overwrites + * the session entity types that have been set using `detectIntent`, + * `streamingDetectIntent` or + * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] + * management methods. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; + */ + private $session_entity_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $fulfillment_text + * Optional. The text response message intended for the end-user. + * It is recommended to use `fulfillment_messages.text.text[0]` instead. + * When provided, Dialogflow uses this field to populate + * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] + * sent to the integration or API caller. + * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $fulfillment_messages + * Optional. The rich response messages intended for the end-user. + * When provided, Dialogflow uses this field to populate + * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] + * sent to the integration or API caller. + * @type string $source + * Optional. A custom field used to identify the webhook source. + * Arbitrary strings are supported. + * When provided, Dialogflow uses this field to populate + * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] + * sent to the integration or API caller. + * @type \Google\Protobuf\Struct $payload + * Optional. This field can be used to pass custom data from your webhook to + * the integration or API caller. Arbitrary JSON objects are supported. When + * provided, Dialogflow uses this field to populate + * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] + * sent to the integration or API caller. This field is also used by the + * [Google Assistant + * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + * for rich response messages. + * See the format definition at [Google Assistant Dialogflow webhook + * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) + * @type array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $output_contexts + * Optional. The collection of output contexts that will overwrite currently + * active contexts for the session and reset their lifespans. + * When provided, Dialogflow uses this field to populate + * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] + * sent to the integration or API caller. + * @type \Google\Cloud\Dialogflow\V2\EventInput $followup_event_input + * Optional. Invokes the supplied events. + * When this field is set, Dialogflow ignores the `fulfillment_text`, + * `fulfillment_messages`, and `payload` fields. + * @type array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $session_entity_types + * Optional. Additional session entity types to replace or extend developer + * entity types with. The entity synonyms apply to all languages and persist + * for the session. Setting this data from a webhook overwrites + * the session entity types that have been set using `detectIntent`, + * `streamingDetectIntent` or + * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] + * management methods. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\V2\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The text response message intended for the end-user. + * It is recommended to use `fulfillment_messages.text.text[0]` instead. + * When provided, Dialogflow uses this field to populate + * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] + * sent to the integration or API caller. + * + * Generated from protobuf field string fulfillment_text = 1; + * @return string + */ + public function getFulfillmentText() + { + return $this->fulfillment_text; + } + + /** + * Optional. The text response message intended for the end-user. + * It is recommended to use `fulfillment_messages.text.text[0]` instead. + * When provided, Dialogflow uses this field to populate + * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] + * sent to the integration or API caller. + * + * Generated from protobuf field string fulfillment_text = 1; + * @param string $var + * @return $this + */ + public function setFulfillmentText($var) + { + GPBUtil::checkString($var, True); + $this->fulfillment_text = $var; + + return $this; + } + + /** + * Optional. The rich response messages intended for the end-user. + * When provided, Dialogflow uses this field to populate + * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] + * sent to the integration or API caller. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFulfillmentMessages() + { + return $this->fulfillment_messages; + } + + /** + * Optional. The rich response messages intended for the end-user. + * When provided, Dialogflow uses this field to populate + * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] + * sent to the integration or API caller. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; + * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFulfillmentMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message::class); + $this->fulfillment_messages = $arr; + + return $this; + } + + /** + * Optional. A custom field used to identify the webhook source. + * Arbitrary strings are supported. + * When provided, Dialogflow uses this field to populate + * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] + * sent to the integration or API caller. + * + * Generated from protobuf field string source = 3; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Optional. A custom field used to identify the webhook source. + * Arbitrary strings are supported. + * When provided, Dialogflow uses this field to populate + * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] + * sent to the integration or API caller. + * + * Generated from protobuf field string source = 3; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * Optional. This field can be used to pass custom data from your webhook to + * the integration or API caller. Arbitrary JSON objects are supported. When + * provided, Dialogflow uses this field to populate + * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] + * sent to the integration or API caller. This field is also used by the + * [Google Assistant + * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + * for rich response messages. + * See the format definition at [Google Assistant Dialogflow webhook + * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) + * + * Generated from protobuf field .google.protobuf.Struct payload = 4; + * @return \Google\Protobuf\Struct|null + */ + public function getPayload() + { + return $this->payload; + } + + public function hasPayload() + { + return isset($this->payload); + } + + public function clearPayload() + { + unset($this->payload); + } + + /** + * Optional. This field can be used to pass custom data from your webhook to + * the integration or API caller. Arbitrary JSON objects are supported. When + * provided, Dialogflow uses this field to populate + * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] + * sent to the integration or API caller. This field is also used by the + * [Google Assistant + * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + * for rich response messages. + * See the format definition at [Google Assistant Dialogflow webhook + * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) + * + * Generated from protobuf field .google.protobuf.Struct payload = 4; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->payload = $var; + + return $this; + } + + /** + * Optional. The collection of output contexts that will overwrite currently + * active contexts for the session and reset their lifespans. + * When provided, Dialogflow uses this field to populate + * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] + * sent to the integration or API caller. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOutputContexts() + { + return $this->output_contexts; + } + + /** + * Optional. The collection of output contexts that will overwrite currently + * active contexts for the session and reset their lifespans. + * When provided, Dialogflow uses this field to populate + * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] + * sent to the integration or API caller. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; + * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOutputContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); + $this->output_contexts = $arr; + + return $this; + } + + /** + * Optional. Invokes the supplied events. + * When this field is set, Dialogflow ignores the `fulfillment_text`, + * `fulfillment_messages`, and `payload` fields. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput followup_event_input = 6; + * @return \Google\Cloud\Dialogflow\V2\EventInput|null + */ + public function getFollowupEventInput() + { + return $this->followup_event_input; + } + + public function hasFollowupEventInput() + { + return isset($this->followup_event_input); + } + + public function clearFollowupEventInput() + { + unset($this->followup_event_input); + } + + /** + * Optional. Invokes the supplied events. + * When this field is set, Dialogflow ignores the `fulfillment_text`, + * `fulfillment_messages`, and `payload` fields. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput followup_event_input = 6; + * @param \Google\Cloud\Dialogflow\V2\EventInput $var + * @return $this + */ + public function setFollowupEventInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class); + $this->followup_event_input = $var; + + return $this; + } + + /** + * Optional. Additional session entity types to replace or extend developer + * entity types with. The entity synonyms apply to all languages and persist + * for the session. Setting this data from a webhook overwrites + * the session entity types that have been set using `detectIntent`, + * `streamingDetectIntent` or + * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] + * management methods. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSessionEntityTypes() + { + return $this->session_entity_types; + } + + /** + * Optional. Additional session entity types to replace or extend developer + * entity types with. The entity synonyms apply to all languages and persist + * for the session. Setting this data from a webhook overwrites + * the session entity types that have been set using `detectIntent`, + * `streamingDetectIntent` or + * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] + * management methods. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; + * @param array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSessionEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); + $this->session_entity_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/delete_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/delete_agent.php new file mode 100644 index 000000000000..6a566c87c5b5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/delete_agent.php @@ -0,0 +1,65 @@ +`. Please see + * {@see AgentsClient::projectName()} for help formatting this field. + */ +function delete_agent_sample(string $formattedParent): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Call the API and handle any network failures. + try { + $agentsClient->deleteAgent($formattedParent); + 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 +{ + $formattedParent = AgentsClient::projectName('[PROJECT]'); + + delete_agent_sample($formattedParent); +} +// [END dialogflow_v2_generated_Agents_DeleteAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/export_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/export_agent.php new file mode 100644 index 000000000000..aa0b05ec1335 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/export_agent.php @@ -0,0 +1,99 @@ +`. Please see + * {@see AgentsClient::projectName()} for help formatting this field. + * @param string $agentUri The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. + * + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + */ +function export_agent_sample(string $formattedParent, string $agentUri): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $agentsClient->exportAgent($formattedParent, $agentUri); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportAgentResponse $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 = AgentsClient::projectName('[PROJECT]'); + $agentUri = '[AGENT_URI]'; + + export_agent_sample($formattedParent, $agentUri); +} +// [END dialogflow_v2_generated_Agents_ExportAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_agent.php new file mode 100644 index 000000000000..50c7f1b26a0d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_agent.php @@ -0,0 +1,67 @@ +`. Please see + * {@see AgentsClient::projectName()} for help formatting this field. + */ +function get_agent_sample(string $formattedParent): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Call the API and handle any network failures. + try { + /** @var Agent $response */ + $response = $agentsClient->getAgent($formattedParent); + 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 = AgentsClient::projectName('[PROJECT]'); + + get_agent_sample($formattedParent); +} +// [END dialogflow_v2_generated_Agents_GetAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_location.php new file mode 100644 index 000000000000..31f5636f0173 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Agents_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_validation_result.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_validation_result.php new file mode 100644 index 000000000000..0aeae9968fb0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_validation_result.php @@ -0,0 +1,68 @@ +`. Please see + * {@see AgentsClient::projectName()} for help formatting this field. + */ +function get_validation_result_sample(string $formattedParent): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Call the API and handle any network failures. + try { + /** @var ValidationResult $response */ + $response = $agentsClient->getValidationResult($formattedParent); + 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 = AgentsClient::projectName('[PROJECT]'); + + get_validation_result_sample($formattedParent); +} +// [END dialogflow_v2_generated_Agents_GetValidationResult_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/import_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/import_agent.php new file mode 100644 index 000000000000..c810d6d346c1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/import_agent.php @@ -0,0 +1,102 @@ +`. Please see + * {@see AgentsClient::projectName()} for help formatting this field. + */ +function import_agent_sample(string $formattedParent): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $agentsClient->importAgent($formattedParent); + $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 +{ + $formattedParent = AgentsClient::projectName('[PROJECT]'); + + import_agent_sample($formattedParent); +} +// [END dialogflow_v2_generated_Agents_ImportAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/list_locations.php new file mode 100644 index 000000000000..c1a90db03466 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Agents_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/restore_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/restore_agent.php new file mode 100644 index 000000000000..2576c7a2ccc6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/restore_agent.php @@ -0,0 +1,100 @@ +`. Please see + * {@see AgentsClient::projectName()} for help formatting this field. + */ +function restore_agent_sample(string $formattedParent): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $agentsClient->restoreAgent($formattedParent); + $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 +{ + $formattedParent = AgentsClient::projectName('[PROJECT]'); + + restore_agent_sample($formattedParent); +} +// [END dialogflow_v2_generated_Agents_RestoreAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/search_agents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/search_agents.php new file mode 100644 index 000000000000..69eeaff5244e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/search_agents.php @@ -0,0 +1,78 @@ +`. Please see + * {@see AgentsClient::projectName()} for help formatting this field. + */ +function search_agents_sample(string $formattedParent): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $agentsClient->searchAgents($formattedParent); + + /** @var Agent $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 = AgentsClient::projectName('[PROJECT]'); + + search_agents_sample($formattedParent); +} +// [END dialogflow_v2_generated_Agents_SearchAgents_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/set_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/set_agent.php new file mode 100644 index 000000000000..a4149c56d3d7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/set_agent.php @@ -0,0 +1,99 @@ +`. Please see + * {@see AgentsClient::projectName()} for help formatting this field. + * @param string $agentDisplayName The name of this agent. + * @param string $agentDefaultLanguageCode The default language of the agent as a language tag. See + * [Language + * Support](https://cloud.google.com/dialogflow/docs/reference/language) + * for a list of the currently supported language codes. This field cannot be + * set by the `Update` method. + * @param string $agentTimeZone The time zone of this agent from the + * [time zone database](https://www.iana.org/time-zones), e.g., + * America/New_York, Europe/Paris. + */ +function set_agent_sample( + string $formattedAgentParent, + string $agentDisplayName, + string $agentDefaultLanguageCode, + string $agentTimeZone +): void { + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $agent = (new Agent()) + ->setParent($formattedAgentParent) + ->setDisplayName($agentDisplayName) + ->setDefaultLanguageCode($agentDefaultLanguageCode) + ->setTimeZone($agentTimeZone); + + // Call the API and handle any network failures. + try { + /** @var Agent $response */ + $response = $agentsClient->setAgent($agent); + 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 +{ + $formattedAgentParent = AgentsClient::projectName('[PROJECT]'); + $agentDisplayName = '[DISPLAY_NAME]'; + $agentDefaultLanguageCode = '[DEFAULT_LANGUAGE_CODE]'; + $agentTimeZone = '[TIME_ZONE]'; + + set_agent_sample( + $formattedAgentParent, + $agentDisplayName, + $agentDefaultLanguageCode, + $agentTimeZone + ); +} +// [END dialogflow_v2_generated_Agents_SetAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/train_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/train_agent.php new file mode 100644 index 000000000000..52e6ece194ac --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/train_agent.php @@ -0,0 +1,89 @@ +`. Please see + * {@see AgentsClient::projectName()} for help formatting this field. + */ +function train_agent_sample(string $formattedParent): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $agentsClient->trainAgent($formattedParent); + $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 +{ + $formattedParent = AgentsClient::projectName('[PROJECT]'); + + train_agent_sample($formattedParent); +} +// [END dialogflow_v2_generated_Agents_TrainAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/get_location.php new file mode 100644 index 000000000000..4c45237cb172 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_AnswerRecords_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_answer_records.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_answer_records.php new file mode 100644 index 000000000000..383b871f120b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_answer_records.php @@ -0,0 +1,74 @@ +/locations/`. Please see + * {@see AnswerRecordsClient::projectName()} for help formatting this field. + */ +function list_answer_records_sample(string $formattedParent): void +{ + // Create a client. + $answerRecordsClient = new AnswerRecordsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $answerRecordsClient->listAnswerRecords($formattedParent); + + /** @var AnswerRecord $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 = AnswerRecordsClient::projectName('[PROJECT]'); + + list_answer_records_sample($formattedParent); +} +// [END dialogflow_v2_generated_AnswerRecords_ListAnswerRecords_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_locations.php new file mode 100644 index 000000000000..67f38d2cc8fc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_AnswerRecords_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/update_answer_record.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/update_answer_record.php new file mode 100644 index 000000000000..dbb982702e80 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/update_answer_record.php @@ -0,0 +1,61 @@ +setAnswerFeedback($answerRecordAnswerFeedback); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var AnswerRecord $response */ + $response = $answerRecordsClient->updateAnswerRecord($answerRecord, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_AnswerRecords_UpdateAnswerRecord_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/create_context.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/create_context.php new file mode 100644 index 000000000000..f34d47416957 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/create_context.php @@ -0,0 +1,95 @@ +/agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. Please see + * {@see ContextsClient::sessionName()} for help formatting this field. + * @param string $contextName The unique identifier of the context. Format: + * `projects//agent/sessions//contexts/`, + * or `projects//agent/environments//users//sessions//contexts/`. + * + * The `Context ID` is always converted to lowercase, may only contain + * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + * + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * The following context names are reserved for internal use by Dialogflow. + * You should not use these contexts or create contexts with these names: + * + * * `__system_counters__` + * * `*_id_dialog_context` + * * `*_dialog_params_size` + */ +function create_context_sample(string $formattedParent, string $contextName): void +{ + // Create a client. + $contextsClient = new ContextsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $context = (new Context()) + ->setName($contextName); + + // Call the API and handle any network failures. + try { + /** @var Context $response */ + $response = $contextsClient->createContext($formattedParent, $context); + 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 = ContextsClient::sessionName('[PROJECT]', '[SESSION]'); + $contextName = '[NAME]'; + + create_context_sample($formattedParent, $contextName); +} +// [END dialogflow_v2_generated_Contexts_CreateContext_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_all_contexts.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_all_contexts.php new file mode 100644 index 000000000000..9943ce9523ac --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_all_contexts.php @@ -0,0 +1,69 @@ +/agent/sessions/` or `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified we assume default 'draft' environment. + * If `User ID` is not specified, we assume default '-' user. Please see + * {@see ContextsClient::sessionName()} for help formatting this field. + */ +function delete_all_contexts_sample(string $formattedParent): void +{ + // Create a client. + $contextsClient = new ContextsClient(); + + // Call the API and handle any network failures. + try { + $contextsClient->deleteAllContexts($formattedParent); + 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 +{ + $formattedParent = ContextsClient::sessionName('[PROJECT]', '[SESSION]'); + + delete_all_contexts_sample($formattedParent); +} +// [END dialogflow_v2_generated_Contexts_DeleteAllContexts_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_context.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_context.php new file mode 100644 index 000000000000..9139cff88fab --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_context.php @@ -0,0 +1,69 @@ +/agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. Please see + * {@see ContextsClient::contextName()} for help formatting this field. + */ +function delete_context_sample(string $formattedName): void +{ + // Create a client. + $contextsClient = new ContextsClient(); + + // Call the API and handle any network failures. + try { + $contextsClient->deleteContext($formattedName); + 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 = ContextsClient::contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); + + delete_context_sample($formattedName); +} +// [END dialogflow_v2_generated_Contexts_DeleteContext_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_context.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_context.php new file mode 100644 index 000000000000..327dd437a96f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_context.php @@ -0,0 +1,71 @@ +/agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. Please see + * {@see ContextsClient::contextName()} for help formatting this field. + */ +function get_context_sample(string $formattedName): void +{ + // Create a client. + $contextsClient = new ContextsClient(); + + // Call the API and handle any network failures. + try { + /** @var Context $response */ + $response = $contextsClient->getContext($formattedName); + 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 = ContextsClient::contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); + + get_context_sample($formattedName); +} +// [END dialogflow_v2_generated_Contexts_GetContext_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_location.php new file mode 100644 index 000000000000..1e34a3e5b84b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Contexts_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_contexts.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_contexts.php new file mode 100644 index 000000000000..156c35a9edf3 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_contexts.php @@ -0,0 +1,76 @@ +/agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. Please see + * {@see ContextsClient::sessionName()} for help formatting this field. + */ +function list_contexts_sample(string $formattedParent): void +{ + // Create a client. + $contextsClient = new ContextsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contextsClient->listContexts($formattedParent); + + /** @var Context $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 = ContextsClient::sessionName('[PROJECT]', '[SESSION]'); + + list_contexts_sample($formattedParent); +} +// [END dialogflow_v2_generated_Contexts_ListContexts_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_locations.php new file mode 100644 index 000000000000..b0269323ae6f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Contexts_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/update_context.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/update_context.php new file mode 100644 index 000000000000..02496e0818b3 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/update_context.php @@ -0,0 +1,85 @@ +/agent/sessions//contexts/`, + * or `projects//agent/environments//users//sessions//contexts/`. + * + * The `Context ID` is always converted to lowercase, may only contain + * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + * + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * The following context names are reserved for internal use by Dialogflow. + * You should not use these contexts or create contexts with these names: + * + * * `__system_counters__` + * * `*_id_dialog_context` + * * `*_dialog_params_size` + */ +function update_context_sample(string $contextName): void +{ + // Create a client. + $contextsClient = new ContextsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $context = (new Context()) + ->setName($contextName); + + // Call the API and handle any network failures. + try { + /** @var Context $response */ + $response = $contextsClient->updateContext($context); + 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 +{ + $contextName = '[NAME]'; + + update_context_sample($contextName); +} +// [END dialogflow_v2_generated_Contexts_UpdateContext_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php new file mode 100644 index 000000000000..bd0bf6bf824c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php @@ -0,0 +1,95 @@ +/locations/` + * @param string $conversationDatasetDisplayName The display name of the dataset. Maximum of 64 bytes. + */ +function create_conversation_dataset_sample( + string $parent, + string $conversationDatasetDisplayName +): void { + // Create a client. + $conversationDatasetsClient = new ConversationDatasetsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $conversationDataset = (new ConversationDataset()) + ->setDisplayName($conversationDatasetDisplayName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationDatasetsClient->createConversationDataset($parent, $conversationDataset); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConversationDataset $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 +{ + $parent = '[PARENT]'; + $conversationDatasetDisplayName = '[DISPLAY_NAME]'; + + create_conversation_dataset_sample($parent, $conversationDatasetDisplayName); +} +// [END dialogflow_v2_generated_ConversationDatasets_CreateConversationDataset_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php new file mode 100644 index 000000000000..a7ca14130f04 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php @@ -0,0 +1,90 @@ +/locations//conversationDatasets/` + * Please see {@see ConversationDatasetsClient::conversationDatasetName()} for help formatting this field. + */ +function delete_conversation_dataset_sample(string $formattedName): void +{ + // Create a client. + $conversationDatasetsClient = new ConversationDatasetsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationDatasetsClient->deleteConversationDataset($formattedName); + $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 = ConversationDatasetsClient::conversationDatasetName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION_DATASET]' + ); + + delete_conversation_dataset_sample($formattedName); +} +// [END dialogflow_v2_generated_ConversationDatasets_DeleteConversationDataset_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_conversation_dataset.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_conversation_dataset.php new file mode 100644 index 000000000000..23594786b5bc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_conversation_dataset.php @@ -0,0 +1,72 @@ +/locations//conversationDatasets/` + * Please see {@see ConversationDatasetsClient::conversationDatasetName()} for help formatting this field. + */ +function get_conversation_dataset_sample(string $formattedName): void +{ + // Create a client. + $conversationDatasetsClient = new ConversationDatasetsClient(); + + // Call the API and handle any network failures. + try { + /** @var ConversationDataset $response */ + $response = $conversationDatasetsClient->getConversationDataset($formattedName); + 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 = ConversationDatasetsClient::conversationDatasetName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION_DATASET]' + ); + + get_conversation_dataset_sample($formattedName); +} +// [END dialogflow_v2_generated_ConversationDatasets_GetConversationDataset_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_location.php new file mode 100644 index 000000000000..7ae630003275 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_ConversationDatasets_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/import_conversation_data.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/import_conversation_data.php new file mode 100644 index 000000000000..34195388d043 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/import_conversation_data.php @@ -0,0 +1,99 @@ +/locations//conversationDatasets/` + * Please see {@see ConversationDatasetsClient::conversationDatasetName()} for help formatting this field. + */ +function import_conversation_data_sample(string $formattedName): void +{ + // Create a client. + $conversationDatasetsClient = new ConversationDatasetsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $inputConfig = new InputConfig(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationDatasetsClient->importConversationData($formattedName, $inputConfig); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportConversationDataOperationResponse $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 = ConversationDatasetsClient::conversationDatasetName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION_DATASET]' + ); + + import_conversation_data_sample($formattedName); +} +// [END dialogflow_v2_generated_ConversationDatasets_ImportConversationData_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_conversation_datasets.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_conversation_datasets.php new file mode 100644 index 000000000000..94496edfd14a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_conversation_datasets.php @@ -0,0 +1,73 @@ +/locations/` + * Please see {@see ConversationDatasetsClient::locationName()} for help formatting this field. + */ +function list_conversation_datasets_sample(string $formattedParent): void +{ + // Create a client. + $conversationDatasetsClient = new ConversationDatasetsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conversationDatasetsClient->listConversationDatasets($formattedParent); + + /** @var ConversationDataset $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 = ConversationDatasetsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_conversation_datasets_sample($formattedParent); +} +// [END dialogflow_v2_generated_ConversationDatasets_ListConversationDatasets_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_locations.php new file mode 100644 index 000000000000..8eed2dab7c09 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_ConversationDatasets_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model.php new file mode 100644 index 000000000000..d860bc74438f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model.php @@ -0,0 +1,109 @@ +/locations//conversationDatasets/` + * Please see {@see ConversationModelsClient::conversationDatasetName()} for help formatting this field. + */ +function create_conversation_model_sample( + string $conversationModelDisplayName, + string $formattedConversationModelDatasetsDataset +): void { + // Create a client. + $conversationModelsClient = new ConversationModelsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $inputDataset = (new InputDataset()) + ->setDataset($formattedConversationModelDatasetsDataset); + $conversationModelDatasets = [$inputDataset,]; + $conversationModel = (new ConversationModel()) + ->setDisplayName($conversationModelDisplayName) + ->setDatasets($conversationModelDatasets); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationModelsClient->createConversationModel($conversationModel); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConversationModel $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 +{ + $conversationModelDisplayName = '[DISPLAY_NAME]'; + $formattedConversationModelDatasetsDataset = ConversationModelsClient::conversationDatasetName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION_DATASET]' + ); + + create_conversation_model_sample( + $conversationModelDisplayName, + $formattedConversationModelDatasetsDataset + ); +} +// [END dialogflow_v2_generated_ConversationModels_CreateConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model_evaluation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model_evaluation.php new file mode 100644 index 000000000000..01fa5edadfaf --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model_evaluation.php @@ -0,0 +1,90 @@ +/locations//conversationModels/` + * Please see {@see ConversationModelsClient::conversationModelName()} for help formatting this field. + */ +function create_conversation_model_evaluation_sample(string $formattedParent): void +{ + // Create a client. + $conversationModelsClient = new ConversationModelsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $conversationModelEvaluation = new ConversationModelEvaluation(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationModelsClient->createConversationModelEvaluation( + $formattedParent, + $conversationModelEvaluation + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConversationModelEvaluation $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 = ConversationModelsClient::conversationModelName( + '[PROJECT]', + '[LOCATION]', + '[CONVERSATION_MODEL]' + ); + + create_conversation_model_evaluation_sample($formattedParent); +} +// [END dialogflow_v2_generated_ConversationModels_CreateConversationModelEvaluation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/delete_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/delete_conversation_model.php new file mode 100644 index 000000000000..e7bf8d38290c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/delete_conversation_model.php @@ -0,0 +1,84 @@ +/conversationModels/` + */ +function delete_conversation_model_sample(string $name): void +{ + // Create a client. + $conversationModelsClient = new ConversationModelsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationModelsClient->deleteConversationModel($name); + $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 +{ + $name = '[NAME]'; + + delete_conversation_model_sample($name); +} +// [END dialogflow_v2_generated_ConversationModels_DeleteConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/deploy_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/deploy_conversation_model.php new file mode 100644 index 000000000000..953c43c9be97 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/deploy_conversation_model.php @@ -0,0 +1,87 @@ +/conversationModels/` + */ +function deploy_conversation_model_sample(string $name): void +{ + // Create a client. + $conversationModelsClient = new ConversationModelsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationModelsClient->deployConversationModel($name); + $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 +{ + $name = '[NAME]'; + + deploy_conversation_model_sample($name); +} +// [END dialogflow_v2_generated_ConversationModels_DeployConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model.php new file mode 100644 index 000000000000..7e452efa6591 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model.php @@ -0,0 +1,66 @@ +/conversationModels/` + */ +function get_conversation_model_sample(string $name): void +{ + // Create a client. + $conversationModelsClient = new ConversationModelsClient(); + + // Call the API and handle any network failures. + try { + /** @var ConversationModel $response */ + $response = $conversationModelsClient->getConversationModel($name); + 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 +{ + $name = '[NAME]'; + + get_conversation_model_sample($name); +} +// [END dialogflow_v2_generated_ConversationModels_GetConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model_evaluation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model_evaluation.php new file mode 100644 index 000000000000..76b76eb683e4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model_evaluation.php @@ -0,0 +1,67 @@ +/conversationModels//evaluations/` + */ +function get_conversation_model_evaluation_sample(string $name): void +{ + // Create a client. + $conversationModelsClient = new ConversationModelsClient(); + + // Call the API and handle any network failures. + try { + /** @var ConversationModelEvaluation $response */ + $response = $conversationModelsClient->getConversationModelEvaluation($name); + 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 +{ + $name = '[NAME]'; + + get_conversation_model_evaluation_sample($name); +} +// [END dialogflow_v2_generated_ConversationModels_GetConversationModelEvaluation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_location.php new file mode 100644 index 000000000000..c1cbdff88eef --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_ConversationModels_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_model_evaluations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_model_evaluations.php new file mode 100644 index 000000000000..7339240d4d43 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_model_evaluations.php @@ -0,0 +1,71 @@ +/conversationModels/` + */ +function list_conversation_model_evaluations_sample(string $parent): void +{ + // Create a client. + $conversationModelsClient = new ConversationModelsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conversationModelsClient->listConversationModelEvaluations($parent); + + /** @var ConversationModelEvaluation $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 +{ + $parent = '[PARENT]'; + + list_conversation_model_evaluations_sample($parent); +} +// [END dialogflow_v2_generated_ConversationModels_ListConversationModelEvaluations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_models.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_models.php new file mode 100644 index 000000000000..06886c759433 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_models.php @@ -0,0 +1,71 @@ +` + */ +function list_conversation_models_sample(string $parent): void +{ + // Create a client. + $conversationModelsClient = new ConversationModelsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conversationModelsClient->listConversationModels($parent); + + /** @var ConversationModel $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 +{ + $parent = '[PARENT]'; + + list_conversation_models_sample($parent); +} +// [END dialogflow_v2_generated_ConversationModels_ListConversationModels_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_locations.php new file mode 100644 index 000000000000..6366d82ab9d6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_ConversationModels_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/undeploy_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/undeploy_conversation_model.php new file mode 100644 index 000000000000..46282f73ea7f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/undeploy_conversation_model.php @@ -0,0 +1,87 @@ +/conversationModels/` + */ +function undeploy_conversation_model_sample(string $name): void +{ + // Create a client. + $conversationModelsClient = new ConversationModelsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationModelsClient->undeployConversationModel($name); + $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 +{ + $name = '[NAME]'; + + undeploy_conversation_model_sample($name); +} +// [END dialogflow_v2_generated_ConversationModels_UndeployConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php new file mode 100644 index 000000000000..f1acaafdca1b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php @@ -0,0 +1,107 @@ +/locations//conversationProfiles/`. + * @param int $participantRole The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * @param int $suggestionFeatureType The type of the suggestion feature to remove. + */ +function clear_suggestion_feature_config_sample( + string $conversationProfile, + int $participantRole, + int $suggestionFeatureType +): void { + // Create a client. + $conversationProfilesClient = new ConversationProfilesClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationProfilesClient->clearSuggestionFeatureConfig( + $conversationProfile, + $participantRole, + $suggestionFeatureType + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConversationProfile $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 +{ + $conversationProfile = '[CONVERSATION_PROFILE]'; + $participantRole = Role::ROLE_UNSPECIFIED; + $suggestionFeatureType = Type::TYPE_UNSPECIFIED; + + clear_suggestion_feature_config_sample( + $conversationProfile, + $participantRole, + $suggestionFeatureType + ); +} +// [END dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/create_conversation_profile.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/create_conversation_profile.php new file mode 100644 index 000000000000..35bf9f51a8d9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/create_conversation_profile.php @@ -0,0 +1,83 @@ +/locations/`. Please see + * {@see ConversationProfilesClient::projectName()} for help formatting this field. + * @param string $conversationProfileDisplayName Human readable name for this profile. Max length 1024 bytes. + */ +function create_conversation_profile_sample( + string $formattedParent, + string $conversationProfileDisplayName +): void { + // Create a client. + $conversationProfilesClient = new ConversationProfilesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $conversationProfile = (new ConversationProfile()) + ->setDisplayName($conversationProfileDisplayName); + + // Call the API and handle any network failures. + try { + /** @var ConversationProfile $response */ + $response = $conversationProfilesClient->createConversationProfile( + $formattedParent, + $conversationProfile + ); + 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 = ConversationProfilesClient::projectName('[PROJECT]'); + $conversationProfileDisplayName = '[DISPLAY_NAME]'; + + create_conversation_profile_sample($formattedParent, $conversationProfileDisplayName); +} +// [END dialogflow_v2_generated_ConversationProfiles_CreateConversationProfile_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/delete_conversation_profile.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/delete_conversation_profile.php new file mode 100644 index 000000000000..43eaedb46d5b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/delete_conversation_profile.php @@ -0,0 +1,69 @@ +/locations//conversationProfiles/`. Please see + * {@see ConversationProfilesClient::conversationProfileName()} for help formatting this field. + */ +function delete_conversation_profile_sample(string $formattedName): void +{ + // Create a client. + $conversationProfilesClient = new ConversationProfilesClient(); + + // Call the API and handle any network failures. + try { + $conversationProfilesClient->deleteConversationProfile($formattedName); + 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 = ConversationProfilesClient::conversationProfileName( + '[PROJECT]', + '[CONVERSATION_PROFILE]' + ); + + delete_conversation_profile_sample($formattedName); +} +// [END dialogflow_v2_generated_ConversationProfiles_DeleteConversationProfile_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_conversation_profile.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_conversation_profile.php new file mode 100644 index 000000000000..9b041dbbd200 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_conversation_profile.php @@ -0,0 +1,71 @@ +/locations//conversationProfiles/`. Please see + * {@see ConversationProfilesClient::conversationProfileName()} for help formatting this field. + */ +function get_conversation_profile_sample(string $formattedName): void +{ + // Create a client. + $conversationProfilesClient = new ConversationProfilesClient(); + + // Call the API and handle any network failures. + try { + /** @var ConversationProfile $response */ + $response = $conversationProfilesClient->getConversationProfile($formattedName); + 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 = ConversationProfilesClient::conversationProfileName( + '[PROJECT]', + '[CONVERSATION_PROFILE]' + ); + + get_conversation_profile_sample($formattedName); +} +// [END dialogflow_v2_generated_ConversationProfiles_GetConversationProfile_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_location.php new file mode 100644 index 000000000000..8a45817c9f46 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_ConversationProfiles_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_conversation_profiles.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_conversation_profiles.php new file mode 100644 index 000000000000..8ca68b838171 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_conversation_profiles.php @@ -0,0 +1,72 @@ +/locations/`. Please see + * {@see ConversationProfilesClient::projectName()} for help formatting this field. + */ +function list_conversation_profiles_sample(string $formattedParent): void +{ + // Create a client. + $conversationProfilesClient = new ConversationProfilesClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conversationProfilesClient->listConversationProfiles($formattedParent); + + /** @var ConversationProfile $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 = ConversationProfilesClient::projectName('[PROJECT]'); + + list_conversation_profiles_sample($formattedParent); +} +// [END dialogflow_v2_generated_ConversationProfiles_ListConversationProfiles_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_locations.php new file mode 100644 index 000000000000..148aeddbe4fa --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_ConversationProfiles_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php new file mode 100644 index 000000000000..d0d3c9d38e9e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php @@ -0,0 +1,110 @@ +/locations//conversationProfiles/`. + * @param int $participantRole The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + */ +function set_suggestion_feature_config_sample( + string $conversationProfile, + int $participantRole +): void { + // Create a client. + $conversationProfilesClient = new ConversationProfilesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $suggestionFeatureConfig = new SuggestionFeatureConfig(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $conversationProfilesClient->setSuggestionFeatureConfig( + $conversationProfile, + $participantRole, + $suggestionFeatureConfig + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConversationProfile $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 +{ + $conversationProfile = '[CONVERSATION_PROFILE]'; + $participantRole = Role::ROLE_UNSPECIFIED; + + set_suggestion_feature_config_sample($conversationProfile, $participantRole); +} +// [END dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/update_conversation_profile.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/update_conversation_profile.php new file mode 100644 index 000000000000..b26048c43bfb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/update_conversation_profile.php @@ -0,0 +1,79 @@ +setDisplayName($conversationProfileDisplayName); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var ConversationProfile $response */ + $response = $conversationProfilesClient->updateConversationProfile( + $conversationProfile, + $updateMask + ); + 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 +{ + $conversationProfileDisplayName = '[DISPLAY_NAME]'; + + update_conversation_profile_sample($conversationProfileDisplayName); +} +// [END dialogflow_v2_generated_ConversationProfiles_UpdateConversationProfile_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/complete_conversation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/complete_conversation.php new file mode 100644 index 000000000000..21bae124175b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/complete_conversation.php @@ -0,0 +1,69 @@ +/locations//conversations/`. Please see + * {@see ConversationsClient::conversationName()} for help formatting this field. + */ +function complete_conversation_sample(string $formattedName): void +{ + // Create a client. + $conversationsClient = new ConversationsClient(); + + // Call the API and handle any network failures. + try { + /** @var Conversation $response */ + $response = $conversationsClient->completeConversation($formattedName); + 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 = ConversationsClient::conversationName('[PROJECT]', '[CONVERSATION]'); + + complete_conversation_sample($formattedName); +} +// [END dialogflow_v2_generated_Conversations_CompleteConversation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/create_conversation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/create_conversation.php new file mode 100644 index 000000000000..0058b3844d75 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/create_conversation.php @@ -0,0 +1,102 @@ +/locations/`. Please see + * {@see ConversationsClient::projectName()} for help formatting this field. + * @param string $formattedConversationConversationProfile The Conversation Profile to be used to configure this + * Conversation. This field cannot be updated. + * Format: `projects//locations//conversationProfiles/`. Please see + * {@see ConversationsClient::conversationProfileName()} for help formatting this field. + */ +function create_conversation_sample( + string $formattedParent, + string $formattedConversationConversationProfile +): void { + // Create a client. + $conversationsClient = new ConversationsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $conversation = (new Conversation()) + ->setConversationProfile($formattedConversationConversationProfile); + + // Call the API and handle any network failures. + try { + /** @var Conversation $response */ + $response = $conversationsClient->createConversation($formattedParent, $conversation); + 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 = ConversationsClient::projectName('[PROJECT]'); + $formattedConversationConversationProfile = ConversationsClient::conversationProfileName( + '[PROJECT]', + '[CONVERSATION_PROFILE]' + ); + + create_conversation_sample($formattedParent, $formattedConversationConversationProfile); +} +// [END dialogflow_v2_generated_Conversations_CreateConversation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_conversation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_conversation.php new file mode 100644 index 000000000000..b2b22f9c1260 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_conversation.php @@ -0,0 +1,68 @@ +/locations//conversations/`. Please see + * {@see ConversationsClient::conversationName()} for help formatting this field. + */ +function get_conversation_sample(string $formattedName): void +{ + // Create a client. + $conversationsClient = new ConversationsClient(); + + // Call the API and handle any network failures. + try { + /** @var Conversation $response */ + $response = $conversationsClient->getConversation($formattedName); + 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 = ConversationsClient::conversationName('[PROJECT]', '[CONVERSATION]'); + + get_conversation_sample($formattedName); +} +// [END dialogflow_v2_generated_Conversations_GetConversation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_location.php new file mode 100644 index 000000000000..da5654088478 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Conversations_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_conversations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_conversations.php new file mode 100644 index 000000000000..1a0a89e1d2f6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_conversations.php @@ -0,0 +1,72 @@ +/locations/`. Please see + * {@see ConversationsClient::projectName()} for help formatting this field. + */ +function list_conversations_sample(string $formattedParent): void +{ + // Create a client. + $conversationsClient = new ConversationsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conversationsClient->listConversations($formattedParent); + + /** @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 = ConversationsClient::projectName('[PROJECT]'); + + list_conversations_sample($formattedParent); +} +// [END dialogflow_v2_generated_Conversations_ListConversations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_locations.php new file mode 100644 index 000000000000..05a399ae5d23 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Conversations_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_messages.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_messages.php new file mode 100644 index 000000000000..844f41f4bf32 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_messages.php @@ -0,0 +1,77 @@ + + * [first item's create_time of previous request]` and empty page_token. + * + * @param string $formattedParent The name of the conversation to list messages for. + * Format: `projects//locations//conversations/` + * Please see {@see ConversationsClient::conversationName()} for help formatting this field. + */ +function list_messages_sample(string $formattedParent): void +{ + // Create a client. + $conversationsClient = new ConversationsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conversationsClient->listMessages($formattedParent); + + /** @var Message $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 = ConversationsClient::conversationName('[PROJECT]', '[CONVERSATION]'); + + list_messages_sample($formattedParent); +} +// [END dialogflow_v2_generated_Conversations_ListMessages_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/suggest_conversation_summary.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/suggest_conversation_summary.php new file mode 100644 index 000000000000..5caae9706ccc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/suggest_conversation_summary.php @@ -0,0 +1,70 @@ +/locations//conversations/`. Please see + * {@see ConversationsClient::conversationName()} for help formatting this field. + */ +function suggest_conversation_summary_sample(string $formattedConversation): void +{ + // Create a client. + $conversationsClient = new ConversationsClient(); + + // Call the API and handle any network failures. + try { + /** @var SuggestConversationSummaryResponse $response */ + $response = $conversationsClient->suggestConversationSummary($formattedConversation); + 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 +{ + $formattedConversation = ConversationsClient::conversationName('[PROJECT]', '[CONVERSATION]'); + + suggest_conversation_summary_sample($formattedConversation); +} +// [END dialogflow_v2_generated_Conversations_SuggestConversationSummary_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/create_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/create_document.php new file mode 100644 index 000000000000..87db832c0b28 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/create_document.php @@ -0,0 +1,112 @@ +/locations//knowledgeBases/`. Please see + * {@see DocumentsClient::knowledgeBaseName()} for help formatting this field. + * @param string $documentDisplayName The display name of the document. The name must be 1024 bytes or + * less; otherwise, the creation request fails. + * @param string $documentMimeType The MIME type of this document. + * @param int $documentKnowledgeTypesElement The knowledge type of document content. + */ +function create_document_sample( + string $formattedParent, + string $documentDisplayName, + string $documentMimeType, + int $documentKnowledgeTypesElement +): void { + // Create a client. + $documentsClient = new DocumentsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $documentKnowledgeTypes = [$documentKnowledgeTypesElement,]; + $document = (new Document()) + ->setDisplayName($documentDisplayName) + ->setMimeType($documentMimeType) + ->setKnowledgeTypes($documentKnowledgeTypes); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentsClient->createDocument($formattedParent, $document); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Document $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 = DocumentsClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + $documentDisplayName = '[DISPLAY_NAME]'; + $documentMimeType = '[MIME_TYPE]'; + $documentKnowledgeTypesElement = KnowledgeType::KNOWLEDGE_TYPE_UNSPECIFIED; + + create_document_sample( + $formattedParent, + $documentDisplayName, + $documentMimeType, + $documentKnowledgeTypesElement + ); +} +// [END dialogflow_v2_generated_Documents_CreateDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/delete_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/delete_document.php new file mode 100644 index 000000000000..c9ea62d3ec8e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/delete_document.php @@ -0,0 +1,86 @@ +/locations//knowledgeBases//documents/`. Please see + * {@see DocumentsClient::documentName()} for help formatting this field. + */ +function delete_document_sample(string $formattedName): void +{ + // Create a client. + $documentsClient = new DocumentsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentsClient->deleteDocument($formattedName); + $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 = DocumentsClient::documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + + delete_document_sample($formattedName); +} +// [END dialogflow_v2_generated_Documents_DeleteDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/export_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/export_document.php new file mode 100644 index 000000000000..b13f17f549c2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/export_document.php @@ -0,0 +1,89 @@ +/locations//knowledgeBases//documents/`. Please see + * {@see DocumentsClient::documentName()} for help formatting this field. + */ +function export_document_sample(string $formattedName): void +{ + // Create a client. + $documentsClient = new DocumentsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentsClient->exportDocument($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Document $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 = DocumentsClient::documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + + export_document_sample($formattedName); +} +// [END dialogflow_v2_generated_Documents_ExportDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_document.php new file mode 100644 index 000000000000..b121f8bf3e81 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_document.php @@ -0,0 +1,68 @@ +/locations//knowledgeBases//documents/`. Please see + * {@see DocumentsClient::documentName()} for help formatting this field. + */ +function get_document_sample(string $formattedName): void +{ + // Create a client. + $documentsClient = new DocumentsClient(); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $documentsClient->getDocument($formattedName); + 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 = DocumentsClient::documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + + get_document_sample($formattedName); +} +// [END dialogflow_v2_generated_Documents_GetDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_location.php new file mode 100644 index 000000000000..88fc99f2603a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Documents_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/import_documents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/import_documents.php new file mode 100644 index 000000000000..70de52c51255 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/import_documents.php @@ -0,0 +1,110 @@ +/locations//knowledgeBases/`. Please see + * {@see DocumentsClient::knowledgeBaseName()} for help formatting this field. + * @param string $documentTemplateMimeType The MIME type of the document. + * @param int $documentTemplateKnowledgeTypesElement The knowledge type of document content. + */ +function import_documents_sample( + string $formattedParent, + string $documentTemplateMimeType, + int $documentTemplateKnowledgeTypesElement +): void { + // Create a client. + $documentsClient = new DocumentsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $documentTemplateKnowledgeTypes = [$documentTemplateKnowledgeTypesElement,]; + $documentTemplate = (new ImportDocumentTemplate()) + ->setMimeType($documentTemplateMimeType) + ->setKnowledgeTypes($documentTemplateKnowledgeTypes); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentsClient->importDocuments($formattedParent, $documentTemplate); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportDocumentsResponse $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 = DocumentsClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + $documentTemplateMimeType = '[MIME_TYPE]'; + $documentTemplateKnowledgeTypesElement = KnowledgeType::KNOWLEDGE_TYPE_UNSPECIFIED; + + import_documents_sample( + $formattedParent, + $documentTemplateMimeType, + $documentTemplateKnowledgeTypesElement + ); +} +// [END dialogflow_v2_generated_Documents_ImportDocuments_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_documents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_documents.php new file mode 100644 index 000000000000..17f89159977c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_documents.php @@ -0,0 +1,73 @@ +/locations//knowledgeBases/`. Please see + * {@see DocumentsClient::knowledgeBaseName()} for help formatting this field. + */ +function list_documents_sample(string $formattedParent): void +{ + // Create a client. + $documentsClient = new DocumentsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $documentsClient->listDocuments($formattedParent); + + /** @var Document $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 = DocumentsClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + + list_documents_sample($formattedParent); +} +// [END dialogflow_v2_generated_Documents_ListDocuments_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_locations.php new file mode 100644 index 000000000000..880cffa907ee --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Documents_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/reload_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/reload_document.php new file mode 100644 index 000000000000..e99ac519bddc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/reload_document.php @@ -0,0 +1,94 @@ +/locations//knowledgeBases//documents/` + * Please see {@see DocumentsClient::documentName()} for help formatting this field. + */ +function reload_document_sample(string $formattedName): void +{ + // Create a client. + $documentsClient = new DocumentsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentsClient->reloadDocument($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Document $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 = DocumentsClient::documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + + reload_document_sample($formattedName); +} +// [END dialogflow_v2_generated_Documents_ReloadDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/update_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/update_document.php new file mode 100644 index 000000000000..931a71194e3f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/update_document.php @@ -0,0 +1,101 @@ +setDisplayName($documentDisplayName) + ->setMimeType($documentMimeType) + ->setKnowledgeTypes($documentKnowledgeTypes); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentsClient->updateDocument($document); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Document $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 +{ + $documentDisplayName = '[DISPLAY_NAME]'; + $documentMimeType = '[MIME_TYPE]'; + $documentKnowledgeTypesElement = KnowledgeType::KNOWLEDGE_TYPE_UNSPECIFIED; + + update_document_sample($documentDisplayName, $documentMimeType, $documentKnowledgeTypesElement); +} +// [END dialogflow_v2_generated_Documents_UpdateDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_create_entities.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_create_entities.php new file mode 100644 index 000000000000..09b5645c2a02 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_create_entities.php @@ -0,0 +1,121 @@ +/agent/entityTypes/`. Please see + * {@see EntityTypesClient::entityTypeName()} for help formatting this field. + * @param string $entitiesValue The primary value associated with this entity entry. + * For example, if the entity type is *vegetable*, the value could be + * *scallions*. + * + * For `KIND_MAP` entity types: + * + * * A reference value to be used in place of synonyms. + * + * For `KIND_LIST` entity types: + * + * * A string that can contain references to other entity types (with or + * without aliases). + * @param string $entitiesSynonymsElement A collection of value synonyms. For example, if the entity type + * is *vegetable*, and `value` is *scallions*, a synonym could be *green + * onions*. + * + * For `KIND_LIST` entity types: + * + * * This collection must contain exactly one synonym equal to `value`. + */ +function batch_create_entities_sample( + string $formattedParent, + string $entitiesValue, + string $entitiesSynonymsElement +): void { + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $entitiesSynonyms = [$entitiesSynonymsElement,]; + $entity = (new Entity()) + ->setValue($entitiesValue) + ->setSynonyms($entitiesSynonyms); + $entities = [$entity,]; + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $entityTypesClient->batchCreateEntities($formattedParent, $entities); + $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 +{ + $formattedParent = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $entitiesValue = '[VALUE]'; + $entitiesSynonymsElement = '[SYNONYMS]'; + + batch_create_entities_sample($formattedParent, $entitiesValue, $entitiesSynonymsElement); +} +// [END dialogflow_v2_generated_EntityTypes_BatchCreateEntities_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entities.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entities.php new file mode 100644 index 000000000000..cf7d4a263026 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entities.php @@ -0,0 +1,96 @@ +/agent/entityTypes/`. Please see + * {@see EntityTypesClient::entityTypeName()} for help formatting this field. + * @param string $entityValuesElement The reference `values` of the entities to delete. Note that + * these are not fully-qualified names, i.e. they don't start with + * `projects/`. + */ +function batch_delete_entities_sample(string $formattedParent, string $entityValuesElement): void +{ + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $entityValues = [$entityValuesElement,]; + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $entityTypesClient->batchDeleteEntities($formattedParent, $entityValues); + $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 +{ + $formattedParent = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $entityValuesElement = '[ENTITY_VALUES]'; + + batch_delete_entities_sample($formattedParent, $entityValuesElement); +} +// [END dialogflow_v2_generated_EntityTypes_BatchDeleteEntities_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entity_types.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entity_types.php new file mode 100644 index 000000000000..6e8a38460aa6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entity_types.php @@ -0,0 +1,97 @@ +/agent`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + * @param string $entityTypeNamesElement The names entity types to delete. All names must point to the + * same agent as `parent`. + */ +function batch_delete_entity_types_sample( + string $formattedParent, + string $entityTypeNamesElement +): void { + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $entityTypeNames = [$entityTypeNamesElement,]; + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $entityTypesClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); + $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 +{ + $formattedParent = EntityTypesClient::agentName('[PROJECT]'); + $entityTypeNamesElement = '[ENTITY_TYPE_NAMES]'; + + batch_delete_entity_types_sample($formattedParent, $entityTypeNamesElement); +} +// [END dialogflow_v2_generated_EntityTypes_BatchDeleteEntityTypes_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entities.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entities.php new file mode 100644 index 000000000000..4322ae722973 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entities.php @@ -0,0 +1,124 @@ +/agent/entityTypes/`. Please see + * {@see EntityTypesClient::entityTypeName()} for help formatting this field. + * @param string $entitiesValue The primary value associated with this entity entry. + * For example, if the entity type is *vegetable*, the value could be + * *scallions*. + * + * For `KIND_MAP` entity types: + * + * * A reference value to be used in place of synonyms. + * + * For `KIND_LIST` entity types: + * + * * A string that can contain references to other entity types (with or + * without aliases). + * @param string $entitiesSynonymsElement A collection of value synonyms. For example, if the entity type + * is *vegetable*, and `value` is *scallions*, a synonym could be *green + * onions*. + * + * For `KIND_LIST` entity types: + * + * * This collection must contain exactly one synonym equal to `value`. + */ +function batch_update_entities_sample( + string $formattedParent, + string $entitiesValue, + string $entitiesSynonymsElement +): void { + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $entitiesSynonyms = [$entitiesSynonymsElement,]; + $entity = (new Entity()) + ->setValue($entitiesValue) + ->setSynonyms($entitiesSynonyms); + $entities = [$entity,]; + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $entityTypesClient->batchUpdateEntities($formattedParent, $entities); + $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 +{ + $formattedParent = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $entitiesValue = '[VALUE]'; + $entitiesSynonymsElement = '[SYNONYMS]'; + + batch_update_entities_sample($formattedParent, $entitiesValue, $entitiesSynonymsElement); +} +// [END dialogflow_v2_generated_EntityTypes_BatchUpdateEntities_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entity_types.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entity_types.php new file mode 100644 index 000000000000..232403a7967d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entity_types.php @@ -0,0 +1,92 @@ +/agent`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + */ +function batch_update_entity_types_sample(string $formattedParent): void +{ + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $entityTypesClient->batchUpdateEntityTypes($formattedParent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchUpdateEntityTypesResponse $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 = EntityTypesClient::agentName('[PROJECT]'); + + batch_update_entity_types_sample($formattedParent); +} +// [END dialogflow_v2_generated_EntityTypes_BatchUpdateEntityTypes_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/create_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/create_entity_type.php new file mode 100644 index 000000000000..dc4cce6aa718 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/create_entity_type.php @@ -0,0 +1,84 @@ +/agent`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + * @param string $entityTypeDisplayName The name of the entity type. + * @param int $entityTypeKind Indicates the kind of entity type. + */ +function create_entity_type_sample( + string $formattedParent, + string $entityTypeDisplayName, + int $entityTypeKind +): void { + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $entityType = (new EntityType()) + ->setDisplayName($entityTypeDisplayName) + ->setKind($entityTypeKind); + + // Call the API and handle any network failures. + try { + /** @var EntityType $response */ + $response = $entityTypesClient->createEntityType($formattedParent, $entityType); + 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 = EntityTypesClient::agentName('[PROJECT]'); + $entityTypeDisplayName = '[DISPLAY_NAME]'; + $entityTypeKind = Kind::KIND_UNSPECIFIED; + + create_entity_type_sample($formattedParent, $entityTypeDisplayName, $entityTypeKind); +} +// [END dialogflow_v2_generated_EntityTypes_CreateEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/delete_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/delete_entity_type.php new file mode 100644 index 000000000000..5748edf82816 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/delete_entity_type.php @@ -0,0 +1,69 @@ +/agent/entityTypes/`. Please see + * {@see EntityTypesClient::entityTypeName()} for help formatting this field. + */ +function delete_entity_type_sample(string $formattedName): void +{ + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Call the API and handle any network failures. + try { + $entityTypesClient->deleteEntityType($formattedName); + 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 = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + + delete_entity_type_sample($formattedName); +} +// [END dialogflow_v2_generated_EntityTypes_DeleteEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_entity_type.php new file mode 100644 index 000000000000..b685238b0d6d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_entity_type.php @@ -0,0 +1,67 @@ +/agent/entityTypes/`. Please see + * {@see EntityTypesClient::entityTypeName()} for help formatting this field. + */ +function get_entity_type_sample(string $formattedName): void +{ + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Call the API and handle any network failures. + try { + /** @var EntityType $response */ + $response = $entityTypesClient->getEntityType($formattedName); + 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 = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + + get_entity_type_sample($formattedName); +} +// [END dialogflow_v2_generated_EntityTypes_GetEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_location.php new file mode 100644 index 000000000000..51363603853e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_EntityTypes_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_entity_types.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_entity_types.php new file mode 100644 index 000000000000..f15ab41a2438 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_entity_types.php @@ -0,0 +1,72 @@ +/agent`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + */ +function list_entity_types_sample(string $formattedParent): void +{ + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $entityTypesClient->listEntityTypes($formattedParent); + + /** @var EntityType $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 = EntityTypesClient::agentName('[PROJECT]'); + + list_entity_types_sample($formattedParent); +} +// [END dialogflow_v2_generated_EntityTypes_ListEntityTypes_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_locations.php new file mode 100644 index 000000000000..bf04677e2266 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_EntityTypes_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/update_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/update_entity_type.php new file mode 100644 index 000000000000..6a8325f6f610 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/update_entity_type.php @@ -0,0 +1,77 @@ +setDisplayName($entityTypeDisplayName) + ->setKind($entityTypeKind); + + // Call the API and handle any network failures. + try { + /** @var EntityType $response */ + $response = $entityTypesClient->updateEntityType($entityType); + 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 +{ + $entityTypeDisplayName = '[DISPLAY_NAME]'; + $entityTypeKind = Kind::KIND_UNSPECIFIED; + + update_entity_type_sample($entityTypeDisplayName, $entityTypeKind); +} +// [END dialogflow_v2_generated_EntityTypes_UpdateEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/create_environment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/create_environment.php new file mode 100644 index 000000000000..380c9a53b612 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/create_environment.php @@ -0,0 +1,75 @@ +/agent` + * - `projects//locations//agent` + * Please see {@see EnvironmentsClient::agentName()} for help formatting this field. + * @param string $environmentId The unique id of the new environment. + */ +function create_environment_sample(string $formattedParent, string $environmentId): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $environment = new Environment(); + + // Call the API and handle any network failures. + try { + /** @var Environment $response */ + $response = $environmentsClient->createEnvironment($formattedParent, $environment, $environmentId); + 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 = EnvironmentsClient::agentName('[PROJECT]'); + $environmentId = '[ENVIRONMENT_ID]'; + + create_environment_sample($formattedParent, $environmentId); +} +// [END dialogflow_v2_generated_Environments_CreateEnvironment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/delete_environment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/delete_environment.php new file mode 100644 index 000000000000..d45813d8fbc0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/delete_environment.php @@ -0,0 +1,71 @@ +/agent/environments/` + * - `projects//locations//agent/environments/` + * + * The environment ID for the default environment is `-`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + */ +function delete_environment_sample(string $formattedName): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Call the API and handle any network failures. + try { + $environmentsClient->deleteEnvironment($formattedName); + 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 = EnvironmentsClient::environmentName('[PROJECT]', '[ENVIRONMENT]'); + + delete_environment_sample($formattedName); +} +// [END dialogflow_v2_generated_Environments_DeleteEnvironment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment.php new file mode 100644 index 000000000000..3c4e7c3168fa --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment.php @@ -0,0 +1,73 @@ +/agent/environments/` + * - `projects//locations//agent/environments/` + * + * The environment ID for the default environment is `-`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + */ +function get_environment_sample(string $formattedName): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Call the API and handle any network failures. + try { + /** @var Environment $response */ + $response = $environmentsClient->getEnvironment($formattedName); + 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 = EnvironmentsClient::environmentName('[PROJECT]', '[ENVIRONMENT]'); + + get_environment_sample($formattedName); +} +// [END dialogflow_v2_generated_Environments_GetEnvironment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment_history.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment_history.php new file mode 100644 index 000000000000..c45844906edc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment_history.php @@ -0,0 +1,78 @@ +/agent/environments/` + * - `projects//locations//agent/environments/` + * + * The environment ID for the default environment is `-`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + */ +function get_environment_history_sample(string $formattedParent): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $environmentsClient->getEnvironmentHistory($formattedParent); + + /** @var Entry $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 = EnvironmentsClient::environmentName('[PROJECT]', '[ENVIRONMENT]'); + + get_environment_history_sample($formattedParent); +} +// [END dialogflow_v2_generated_Environments_GetEnvironmentHistory_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_location.php new file mode 100644 index 000000000000..27b2a0f62e63 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Environments_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_environments.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_environments.php new file mode 100644 index 000000000000..100b48c84eb0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_environments.php @@ -0,0 +1,75 @@ +/agent` + * - `projects//locations//agent` + * Please see {@see EnvironmentsClient::agentName()} for help formatting this field. + */ +function list_environments_sample(string $formattedParent): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $environmentsClient->listEnvironments($formattedParent); + + /** @var Environment $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 = EnvironmentsClient::agentName('[PROJECT]'); + + list_environments_sample($formattedParent); +} +// [END dialogflow_v2_generated_Environments_ListEnvironments_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_locations.php new file mode 100644 index 000000000000..07d7be30e536 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Environments_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/update_environment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/update_environment.php new file mode 100644 index 000000000000..af5123c261bb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/update_environment.php @@ -0,0 +1,69 @@ +updateEnvironment($environment, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Environments_UpdateEnvironment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_fulfillment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_fulfillment.php new file mode 100644 index 000000000000..c9c592e7244a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_fulfillment.php @@ -0,0 +1,67 @@ +/agent/fulfillment`. Please see + * {@see FulfillmentsClient::fulfillmentName()} for help formatting this field. + */ +function get_fulfillment_sample(string $formattedName): void +{ + // Create a client. + $fulfillmentsClient = new FulfillmentsClient(); + + // Call the API and handle any network failures. + try { + /** @var Fulfillment $response */ + $response = $fulfillmentsClient->getFulfillment($formattedName); + 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 = FulfillmentsClient::fulfillmentName('[PROJECT]'); + + get_fulfillment_sample($formattedName); +} +// [END dialogflow_v2_generated_Fulfillments_GetFulfillment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_location.php new file mode 100644 index 000000000000..c146dfd4f52c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Fulfillments_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/list_locations.php new file mode 100644 index 000000000000..808b1eff5ec9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Fulfillments_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/update_fulfillment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/update_fulfillment.php new file mode 100644 index 000000000000..c5d24f04f450 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/update_fulfillment.php @@ -0,0 +1,77 @@ +/agent/fulfillment` + * - `projects//locations//agent/fulfillment` + * + * This field is not used for Fulfillment in an Environment. + */ +function update_fulfillment_sample(string $fulfillmentName): void +{ + // Create a client. + $fulfillmentsClient = new FulfillmentsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $fulfillment = (new Fulfillment()) + ->setName($fulfillmentName); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var Fulfillment $response */ + $response = $fulfillmentsClient->updateFulfillment($fulfillment, $updateMask); + 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 +{ + $fulfillmentName = '[NAME]'; + + update_fulfillment_sample($fulfillmentName); +} +// [END dialogflow_v2_generated_Fulfillments_UpdateFulfillment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_delete_intents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_delete_intents.php new file mode 100644 index 000000000000..0709129cd8d1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_delete_intents.php @@ -0,0 +1,97 @@ +/agent`. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + * @param string $intentsDisplayName The name of this intent. + */ +function batch_delete_intents_sample(string $formattedParent, string $intentsDisplayName): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $intent = (new Intent()) + ->setDisplayName($intentsDisplayName); + $intents = [$intent,]; + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $intentsClient->batchDeleteIntents($formattedParent, $intents); + $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 +{ + $formattedParent = IntentsClient::agentName('[PROJECT]'); + $intentsDisplayName = '[DISPLAY_NAME]'; + + batch_delete_intents_sample($formattedParent, $intentsDisplayName); +} +// [END dialogflow_v2_generated_Intents_BatchDeleteIntents_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_update_intents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_update_intents.php new file mode 100644 index 000000000000..a9faa4b5d3a4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_update_intents.php @@ -0,0 +1,92 @@ +/agent`. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + */ +function batch_update_intents_sample(string $formattedParent): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $intentsClient->batchUpdateIntents($formattedParent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchUpdateIntentsResponse $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 = IntentsClient::agentName('[PROJECT]'); + + batch_update_intents_sample($formattedParent); +} +// [END dialogflow_v2_generated_Intents_BatchUpdateIntents_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/create_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/create_intent.php new file mode 100644 index 000000000000..2307c22737e6 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/create_intent.php @@ -0,0 +1,77 @@ +/agent`. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + * @param string $intentDisplayName The name of this intent. + */ +function create_intent_sample(string $formattedParent, string $intentDisplayName): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $intent = (new Intent()) + ->setDisplayName($intentDisplayName); + + // Call the API and handle any network failures. + try { + /** @var Intent $response */ + $response = $intentsClient->createIntent($formattedParent, $intent); + 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 = IntentsClient::agentName('[PROJECT]'); + $intentDisplayName = '[DISPLAY_NAME]'; + + create_intent_sample($formattedParent, $intentDisplayName); +} +// [END dialogflow_v2_generated_Intents_CreateIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/delete_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/delete_intent.php new file mode 100644 index 000000000000..4a3d19ec1f44 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/delete_intent.php @@ -0,0 +1,70 @@ +/agent/intents/`. Please see + * {@see IntentsClient::intentName()} for help formatting this field. + */ +function delete_intent_sample(string $formattedName): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Call the API and handle any network failures. + try { + $intentsClient->deleteIntent($formattedName); + 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 = IntentsClient::intentName('[PROJECT]', '[INTENT]'); + + delete_intent_sample($formattedName); +} +// [END dialogflow_v2_generated_Intents_DeleteIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_intent.php new file mode 100644 index 000000000000..e6e2fad64fc0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_intent.php @@ -0,0 +1,67 @@ +/agent/intents/`. Please see + * {@see IntentsClient::intentName()} for help formatting this field. + */ +function get_intent_sample(string $formattedName): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Call the API and handle any network failures. + try { + /** @var Intent $response */ + $response = $intentsClient->getIntent($formattedName); + 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 = IntentsClient::intentName('[PROJECT]', '[INTENT]'); + + get_intent_sample($formattedName); +} +// [END dialogflow_v2_generated_Intents_GetIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_location.php new file mode 100644 index 000000000000..177e67b62277 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Intents_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_intents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_intents.php new file mode 100644 index 000000000000..770f91e1140f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_intents.php @@ -0,0 +1,80 @@ +/agent` or `projects//locations//agent`. + * + * Alternatively, you can specify the environment to list intents for. + * Format: `projects//agent/environments/` + * or `projects//locations//agent/environments/`. + * Note: training phrases of the intents will not be returned for non-draft + * environment. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + */ +function list_intents_sample(string $formattedParent): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $intentsClient->listIntents($formattedParent); + + /** @var Intent $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 = IntentsClient::agentName('[PROJECT]'); + + list_intents_sample($formattedParent); +} +// [END dialogflow_v2_generated_Intents_ListIntents_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_locations.php new file mode 100644 index 000000000000..30cb797e8312 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Intents_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/update_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/update_intent.php new file mode 100644 index 000000000000..0b54b3704900 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/update_intent.php @@ -0,0 +1,73 @@ +setDisplayName($intentDisplayName); + + // Call the API and handle any network failures. + try { + /** @var Intent $response */ + $response = $intentsClient->updateIntent($intent); + 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 +{ + $intentDisplayName = '[DISPLAY_NAME]'; + + update_intent_sample($intentDisplayName); +} +// [END dialogflow_v2_generated_Intents_UpdateIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/create_knowledge_base.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/create_knowledge_base.php new file mode 100644 index 000000000000..f6bbbd05697b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/create_knowledge_base.php @@ -0,0 +1,76 @@ +/locations/`. Please see + * {@see KnowledgeBasesClient::projectName()} for help formatting this field. + * @param string $knowledgeBaseDisplayName The display name of the knowledge base. The name must be 1024 + * bytes or less; otherwise, the creation request fails. + */ +function create_knowledge_base_sample( + string $formattedParent, + string $knowledgeBaseDisplayName +): void { + // Create a client. + $knowledgeBasesClient = new KnowledgeBasesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $knowledgeBase = (new KnowledgeBase()) + ->setDisplayName($knowledgeBaseDisplayName); + + // Call the API and handle any network failures. + try { + /** @var KnowledgeBase $response */ + $response = $knowledgeBasesClient->createKnowledgeBase($formattedParent, $knowledgeBase); + 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 = KnowledgeBasesClient::projectName('[PROJECT]'); + $knowledgeBaseDisplayName = '[DISPLAY_NAME]'; + + create_knowledge_base_sample($formattedParent, $knowledgeBaseDisplayName); +} +// [END dialogflow_v2_generated_KnowledgeBases_CreateKnowledgeBase_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/delete_knowledge_base.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/delete_knowledge_base.php new file mode 100644 index 000000000000..903609bbdc00 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/delete_knowledge_base.php @@ -0,0 +1,66 @@ +/locations//knowledgeBases/`. Please see + * {@see KnowledgeBasesClient::knowledgeBaseName()} for help formatting this field. + */ +function delete_knowledge_base_sample(string $formattedName): void +{ + // Create a client. + $knowledgeBasesClient = new KnowledgeBasesClient(); + + // Call the API and handle any network failures. + try { + $knowledgeBasesClient->deleteKnowledgeBase($formattedName); + 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 = KnowledgeBasesClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + + delete_knowledge_base_sample($formattedName); +} +// [END dialogflow_v2_generated_KnowledgeBases_DeleteKnowledgeBase_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_knowledge_base.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_knowledge_base.php new file mode 100644 index 000000000000..bda173eafa0a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_knowledge_base.php @@ -0,0 +1,68 @@ +/locations//knowledgeBases/`. Please see + * {@see KnowledgeBasesClient::knowledgeBaseName()} for help formatting this field. + */ +function get_knowledge_base_sample(string $formattedName): void +{ + // Create a client. + $knowledgeBasesClient = new KnowledgeBasesClient(); + + // Call the API and handle any network failures. + try { + /** @var KnowledgeBase $response */ + $response = $knowledgeBasesClient->getKnowledgeBase($formattedName); + 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 = KnowledgeBasesClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + + get_knowledge_base_sample($formattedName); +} +// [END dialogflow_v2_generated_KnowledgeBases_GetKnowledgeBase_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_location.php new file mode 100644 index 000000000000..8362d31264fc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_KnowledgeBases_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_knowledge_bases.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_knowledge_bases.php new file mode 100644 index 000000000000..de802bdfe9c4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_knowledge_bases.php @@ -0,0 +1,72 @@ +/locations/`. Please see + * {@see KnowledgeBasesClient::projectName()} for help formatting this field. + */ +function list_knowledge_bases_sample(string $formattedParent): void +{ + // Create a client. + $knowledgeBasesClient = new KnowledgeBasesClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $knowledgeBasesClient->listKnowledgeBases($formattedParent); + + /** @var KnowledgeBase $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 = KnowledgeBasesClient::projectName('[PROJECT]'); + + list_knowledge_bases_sample($formattedParent); +} +// [END dialogflow_v2_generated_KnowledgeBases_ListKnowledgeBases_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_locations.php new file mode 100644 index 000000000000..c20bb9d82c39 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_KnowledgeBases_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/update_knowledge_base.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/update_knowledge_base.php new file mode 100644 index 000000000000..de83978a7890 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/update_knowledge_base.php @@ -0,0 +1,70 @@ +setDisplayName($knowledgeBaseDisplayName); + + // Call the API and handle any network failures. + try { + /** @var KnowledgeBase $response */ + $response = $knowledgeBasesClient->updateKnowledgeBase($knowledgeBase); + 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 +{ + $knowledgeBaseDisplayName = '[DISPLAY_NAME]'; + + update_knowledge_base_sample($knowledgeBaseDisplayName); +} +// [END dialogflow_v2_generated_KnowledgeBases_UpdateKnowledgeBase_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/analyze_content.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/analyze_content.php new file mode 100644 index 000000000000..ea2a07165aaa --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/analyze_content.php @@ -0,0 +1,77 @@ +/locations//conversations//participants/`. Please see + * {@see ParticipantsClient::participantName()} for help formatting this field. + */ +function analyze_content_sample(string $formattedParticipant): void +{ + // Create a client. + $participantsClient = new ParticipantsClient(); + + // Call the API and handle any network failures. + try { + /** @var AnalyzeContentResponse $response */ + $response = $participantsClient->analyzeContent($formattedParticipant); + 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 +{ + $formattedParticipant = ParticipantsClient::participantName( + '[PROJECT]', + '[CONVERSATION]', + '[PARTICIPANT]' + ); + + analyze_content_sample($formattedParticipant); +} +// [END dialogflow_v2_generated_Participants_AnalyzeContent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/create_participant.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/create_participant.php new file mode 100644 index 000000000000..ac93afe4f345 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/create_participant.php @@ -0,0 +1,71 @@ +/locations//conversations/`. Please see + * {@see ParticipantsClient::conversationName()} for help formatting this field. + */ +function create_participant_sample(string $formattedParent): void +{ + // Create a client. + $participantsClient = new ParticipantsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $participant = new Participant(); + + // Call the API and handle any network failures. + try { + /** @var Participant $response */ + $response = $participantsClient->createParticipant($formattedParent, $participant); + 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 = ParticipantsClient::conversationName('[PROJECT]', '[CONVERSATION]'); + + create_participant_sample($formattedParent); +} +// [END dialogflow_v2_generated_Participants_CreateParticipant_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_location.php new file mode 100644 index 000000000000..a4717b996ff4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Participants_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_participant.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_participant.php new file mode 100644 index 000000000000..ed68078dfcf9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_participant.php @@ -0,0 +1,72 @@ +/locations//conversations//participants/`. Please see + * {@see ParticipantsClient::participantName()} for help formatting this field. + */ +function get_participant_sample(string $formattedName): void +{ + // Create a client. + $participantsClient = new ParticipantsClient(); + + // Call the API and handle any network failures. + try { + /** @var Participant $response */ + $response = $participantsClient->getParticipant($formattedName); + 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 = ParticipantsClient::participantName( + '[PROJECT]', + '[CONVERSATION]', + '[PARTICIPANT]' + ); + + get_participant_sample($formattedName); +} +// [END dialogflow_v2_generated_Participants_GetParticipant_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_locations.php new file mode 100644 index 000000000000..440555880149 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Participants_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_participants.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_participants.php new file mode 100644 index 000000000000..8359a672d1f7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_participants.php @@ -0,0 +1,73 @@ +/locations//conversations/`. Please see + * {@see ParticipantsClient::conversationName()} for help formatting this field. + */ +function list_participants_sample(string $formattedParent): void +{ + // Create a client. + $participantsClient = new ParticipantsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $participantsClient->listParticipants($formattedParent); + + /** @var Participant $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 = ParticipantsClient::conversationName('[PROJECT]', '[CONVERSATION]'); + + list_participants_sample($formattedParent); +} +// [END dialogflow_v2_generated_Participants_ListParticipants_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/streaming_analyze_content.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/streaming_analyze_content.php new file mode 100644 index 000000000000..ca78aadb5c28 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/streaming_analyze_content.php @@ -0,0 +1,97 @@ +/locations//conversations//participants/`. Please see + * {@see ParticipantsClient::participantName()} for help formatting this field. + */ +function streaming_analyze_content_sample(string $formattedParticipant): void +{ + // Create a client. + $participantsClient = new ParticipantsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $request = (new StreamingAnalyzeContentRequest()) + ->setParticipant($formattedParticipant); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $participantsClient->streamingAnalyzeContent(); + $stream->writeAll([$request,]); + + /** @var StreamingAnalyzeContentResponse $element */ + foreach ($stream->closeWriteAndReadAll() 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 +{ + $formattedParticipant = ParticipantsClient::participantName( + '[PROJECT]', + '[CONVERSATION]', + '[PARTICIPANT]' + ); + + streaming_analyze_content_sample($formattedParticipant); +} +// [END dialogflow_v2_generated_Participants_StreamingAnalyzeContent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_articles.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_articles.php new file mode 100644 index 000000000000..5abba2ea21fb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_articles.php @@ -0,0 +1,73 @@ +/locations//conversations//participants/`. Please see + * {@see ParticipantsClient::participantName()} for help formatting this field. + */ +function suggest_articles_sample(string $formattedParent): void +{ + // Create a client. + $participantsClient = new ParticipantsClient(); + + // Call the API and handle any network failures. + try { + /** @var SuggestArticlesResponse $response */ + $response = $participantsClient->suggestArticles($formattedParent); + 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 = ParticipantsClient::participantName( + '[PROJECT]', + '[CONVERSATION]', + '[PARTICIPANT]' + ); + + suggest_articles_sample($formattedParent); +} +// [END dialogflow_v2_generated_Participants_SuggestArticles_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_faq_answers.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_faq_answers.php new file mode 100644 index 000000000000..305452d83d07 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_faq_answers.php @@ -0,0 +1,73 @@ +/locations//conversations//participants/`. Please see + * {@see ParticipantsClient::participantName()} for help formatting this field. + */ +function suggest_faq_answers_sample(string $formattedParent): void +{ + // Create a client. + $participantsClient = new ParticipantsClient(); + + // Call the API and handle any network failures. + try { + /** @var SuggestFaqAnswersResponse $response */ + $response = $participantsClient->suggestFaqAnswers($formattedParent); + 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 = ParticipantsClient::participantName( + '[PROJECT]', + '[CONVERSATION]', + '[PARTICIPANT]' + ); + + suggest_faq_answers_sample($formattedParent); +} +// [END dialogflow_v2_generated_Participants_SuggestFaqAnswers_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_smart_replies.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_smart_replies.php new file mode 100644 index 000000000000..adc3807aeaf4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_smart_replies.php @@ -0,0 +1,73 @@ +/locations//conversations//participants/`. Please see + * {@see ParticipantsClient::participantName()} for help formatting this field. + */ +function suggest_smart_replies_sample(string $formattedParent): void +{ + // Create a client. + $participantsClient = new ParticipantsClient(); + + // Call the API and handle any network failures. + try { + /** @var SuggestSmartRepliesResponse $response */ + $response = $participantsClient->suggestSmartReplies($formattedParent); + 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 = ParticipantsClient::participantName( + '[PROJECT]', + '[CONVERSATION]', + '[PARTICIPANT]' + ); + + suggest_smart_replies_sample($formattedParent); +} +// [END dialogflow_v2_generated_Participants_SuggestSmartReplies_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/update_participant.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/update_participant.php new file mode 100644 index 000000000000..97b1187d7947 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/update_participant.php @@ -0,0 +1,58 @@ +updateParticipant($participant, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Participants_UpdateParticipant_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/create_session_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/create_session_entity_type.php new file mode 100644 index 000000000000..b5513f20f7c3 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/create_session_entity_type.php @@ -0,0 +1,140 @@ +/agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. Please see + * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. + * @param string $sessionEntityTypeName The unique identifier of this session entity type. Format: + * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * `` must be the display name of an existing entity + * type in the same agent that will be overridden or supplemented. + * @param int $sessionEntityTypeEntityOverrideMode Indicates whether the additional data should override or + * supplement the custom entity type definition. + * @param string $sessionEntityTypeEntitiesValue The primary value associated with this entity entry. + * For example, if the entity type is *vegetable*, the value could be + * *scallions*. + * + * For `KIND_MAP` entity types: + * + * * A reference value to be used in place of synonyms. + * + * For `KIND_LIST` entity types: + * + * * A string that can contain references to other entity types (with or + * without aliases). + * @param string $sessionEntityTypeEntitiesSynonymsElement A collection of value synonyms. For example, if the entity type + * is *vegetable*, and `value` is *scallions*, a synonym could be *green + * onions*. + * + * For `KIND_LIST` entity types: + * + * * This collection must contain exactly one synonym equal to `value`. + */ +function create_session_entity_type_sample( + string $formattedParent, + string $sessionEntityTypeName, + int $sessionEntityTypeEntityOverrideMode, + string $sessionEntityTypeEntitiesValue, + string $sessionEntityTypeEntitiesSynonymsElement +): void { + // Create a client. + $sessionEntityTypesClient = new SessionEntityTypesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $sessionEntityTypeEntitiesSynonyms = [$sessionEntityTypeEntitiesSynonymsElement,]; + $entity = (new Entity()) + ->setValue($sessionEntityTypeEntitiesValue) + ->setSynonyms($sessionEntityTypeEntitiesSynonyms); + $sessionEntityTypeEntities = [$entity,]; + $sessionEntityType = (new SessionEntityType()) + ->setName($sessionEntityTypeName) + ->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode) + ->setEntities($sessionEntityTypeEntities); + + // Call the API and handle any network failures. + try { + /** @var SessionEntityType $response */ + $response = $sessionEntityTypesClient->createSessionEntityType( + $formattedParent, + $sessionEntityType + ); + 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 = SessionEntityTypesClient::sessionName('[PROJECT]', '[SESSION]'); + $sessionEntityTypeName = '[NAME]'; + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityTypeEntitiesValue = '[VALUE]'; + $sessionEntityTypeEntitiesSynonymsElement = '[SYNONYMS]'; + + create_session_entity_type_sample( + $formattedParent, + $sessionEntityTypeName, + $sessionEntityTypeEntityOverrideMode, + $sessionEntityTypeEntitiesValue, + $sessionEntityTypeEntitiesSynonymsElement + ); +} +// [END dialogflow_v2_generated_SessionEntityTypes_CreateSessionEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/delete_session_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/delete_session_entity_type.php new file mode 100644 index 000000000000..b6f56f0de7cf --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/delete_session_entity_type.php @@ -0,0 +1,78 @@ +/agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. Please see + * {@see SessionEntityTypesClient::sessionEntityTypeName()} for help formatting this field. + */ +function delete_session_entity_type_sample(string $formattedName): void +{ + // Create a client. + $sessionEntityTypesClient = new SessionEntityTypesClient(); + + // Call the API and handle any network failures. + try { + $sessionEntityTypesClient->deleteSessionEntityType($formattedName); + 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 = SessionEntityTypesClient::sessionEntityTypeName( + '[PROJECT]', + '[SESSION]', + '[ENTITY_TYPE]' + ); + + delete_session_entity_type_sample($formattedName); +} +// [END dialogflow_v2_generated_SessionEntityTypes_DeleteSessionEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_location.php new file mode 100644 index 000000000000..5590902a38e5 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_SessionEntityTypes_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_session_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_session_entity_type.php new file mode 100644 index 000000000000..c4ff566fb7fc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_session_entity_type.php @@ -0,0 +1,80 @@ +/agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. Please see + * {@see SessionEntityTypesClient::sessionEntityTypeName()} for help formatting this field. + */ +function get_session_entity_type_sample(string $formattedName): void +{ + // Create a client. + $sessionEntityTypesClient = new SessionEntityTypesClient(); + + // Call the API and handle any network failures. + try { + /** @var SessionEntityType $response */ + $response = $sessionEntityTypesClient->getSessionEntityType($formattedName); + 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 = SessionEntityTypesClient::sessionEntityTypeName( + '[PROJECT]', + '[SESSION]', + '[ENTITY_TYPE]' + ); + + get_session_entity_type_sample($formattedName); +} +// [END dialogflow_v2_generated_SessionEntityTypes_GetSessionEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_locations.php new file mode 100644 index 000000000000..5673a2ad0429 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_SessionEntityTypes_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_session_entity_types.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_session_entity_types.php new file mode 100644 index 000000000000..57f99fff2eaf --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_session_entity_types.php @@ -0,0 +1,80 @@ +/agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. Please see + * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. + */ +function list_session_entity_types_sample(string $formattedParent): void +{ + // Create a client. + $sessionEntityTypesClient = new SessionEntityTypesClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $sessionEntityTypesClient->listSessionEntityTypes($formattedParent); + + /** @var SessionEntityType $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 = SessionEntityTypesClient::sessionName('[PROJECT]', '[SESSION]'); + + list_session_entity_types_sample($formattedParent); +} +// [END dialogflow_v2_generated_SessionEntityTypes_ListSessionEntityTypes_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/update_session_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/update_session_entity_type.php new file mode 100644 index 000000000000..931ba432a559 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/update_session_entity_type.php @@ -0,0 +1,124 @@ +/agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * + * `` must be the display name of an existing entity + * type in the same agent that will be overridden or supplemented. + * @param int $sessionEntityTypeEntityOverrideMode Indicates whether the additional data should override or + * supplement the custom entity type definition. + * @param string $sessionEntityTypeEntitiesValue The primary value associated with this entity entry. + * For example, if the entity type is *vegetable*, the value could be + * *scallions*. + * + * For `KIND_MAP` entity types: + * + * * A reference value to be used in place of synonyms. + * + * For `KIND_LIST` entity types: + * + * * A string that can contain references to other entity types (with or + * without aliases). + * @param string $sessionEntityTypeEntitiesSynonymsElement A collection of value synonyms. For example, if the entity type + * is *vegetable*, and `value` is *scallions*, a synonym could be *green + * onions*. + * + * For `KIND_LIST` entity types: + * + * * This collection must contain exactly one synonym equal to `value`. + */ +function update_session_entity_type_sample( + string $sessionEntityTypeName, + int $sessionEntityTypeEntityOverrideMode, + string $sessionEntityTypeEntitiesValue, + string $sessionEntityTypeEntitiesSynonymsElement +): void { + // Create a client. + $sessionEntityTypesClient = new SessionEntityTypesClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $sessionEntityTypeEntitiesSynonyms = [$sessionEntityTypeEntitiesSynonymsElement,]; + $entity = (new Entity()) + ->setValue($sessionEntityTypeEntitiesValue) + ->setSynonyms($sessionEntityTypeEntitiesSynonyms); + $sessionEntityTypeEntities = [$entity,]; + $sessionEntityType = (new SessionEntityType()) + ->setName($sessionEntityTypeName) + ->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode) + ->setEntities($sessionEntityTypeEntities); + + // Call the API and handle any network failures. + try { + /** @var SessionEntityType $response */ + $response = $sessionEntityTypesClient->updateSessionEntityType($sessionEntityType); + 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 +{ + $sessionEntityTypeName = '[NAME]'; + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityTypeEntitiesValue = '[VALUE]'; + $sessionEntityTypeEntitiesSynonymsElement = '[SYNONYMS]'; + + update_session_entity_type_sample( + $sessionEntityTypeName, + $sessionEntityTypeEntityOverrideMode, + $sessionEntityTypeEntitiesValue, + $sessionEntityTypeEntitiesSynonymsElement + ); +} +// [END dialogflow_v2_generated_SessionEntityTypes_UpdateSessionEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/detect_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/detect_intent.php new file mode 100644 index 000000000000..569dcb6ebdb2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/detect_intent.php @@ -0,0 +1,100 @@ +/agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment (`Environment ID` might be referred to as + * environment name at some places). If `User ID` is not specified, we are + * using "-". It's up to the API caller to choose an appropriate `Session ID` + * and `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). Please see + * {@see SessionsClient::sessionName()} for help formatting this field. + */ +function detect_intent_sample(string $formattedSession): void +{ + // Create a client. + $sessionsClient = new SessionsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $queryInput = new QueryInput(); + + // Call the API and handle any network failures. + try { + /** @var DetectIntentResponse $response */ + $response = $sessionsClient->detectIntent($formattedSession, $queryInput); + 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 +{ + $formattedSession = SessionsClient::sessionName('[PROJECT]', '[SESSION]'); + + detect_intent_sample($formattedSession); +} +// [END dialogflow_v2_generated_Sessions_DetectIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/get_location.php new file mode 100644 index 000000000000..f12b6d2c5964 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Sessions_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/list_locations.php new file mode 100644 index 000000000000..972718b7fa62 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Sessions_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/streaming_detect_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/streaming_detect_intent.php new file mode 100644 index 000000000000..9c7a2254b249 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/streaming_detect_intent.php @@ -0,0 +1,109 @@ +/agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment. If `User ID` is not specified, we are using + * "-". It's up to the API caller to choose an appropriate `Session ID` and + * `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). Please see + * {@see SessionsClient::sessionName()} for help formatting this field. + */ +function streaming_detect_intent_sample(string $formattedSession): void +{ + // Create a client. + $sessionsClient = new SessionsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $queryInput = new QueryInput(); + $request = (new StreamingDetectIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $sessionsClient->streamingDetectIntent(); + $stream->writeAll([$request,]); + + /** @var StreamingDetectIntentResponse $element */ + foreach ($stream->closeWriteAndReadAll() 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 +{ + $formattedSession = SessionsClient::sessionName('[PROJECT]', '[SESSION]'); + + streaming_detect_intent_sample($formattedSession); +} +// [END dialogflow_v2_generated_Sessions_StreamingDetectIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/create_version.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/create_version.php new file mode 100644 index 000000000000..e089e250e1ed --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/create_version.php @@ -0,0 +1,75 @@ +/agent` + * - `projects//locations//agent` + * Please see {@see VersionsClient::agentName()} for help formatting this field. + */ +function create_version_sample(string $formattedParent): void +{ + // Create a client. + $versionsClient = new VersionsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $version = new Version(); + + // Call the API and handle any network failures. + try { + /** @var Version $response */ + $response = $versionsClient->createVersion($formattedParent, $version); + 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 = VersionsClient::agentName('[PROJECT]'); + + create_version_sample($formattedParent); +} +// [END dialogflow_v2_generated_Versions_CreateVersion_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/delete_version.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/delete_version.php new file mode 100644 index 000000000000..0210b6fa6bf1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/delete_version.php @@ -0,0 +1,69 @@ +/agent/versions/` + * - `projects//locations//agent/versions/` + * Please see {@see VersionsClient::versionName()} for help formatting this field. + */ +function delete_version_sample(string $formattedName): void +{ + // Create a client. + $versionsClient = new VersionsClient(); + + // Call the API and handle any network failures. + try { + $versionsClient->deleteVersion($formattedName); + 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 = VersionsClient::versionName('[PROJECT]', '[VERSION]'); + + delete_version_sample($formattedName); +} +// [END dialogflow_v2_generated_Versions_DeleteVersion_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_location.php new file mode 100644 index 000000000000..2a4e47d09c7c --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Versions_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_version.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_version.php new file mode 100644 index 000000000000..9a5a28ce621d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_version.php @@ -0,0 +1,71 @@ +/agent/versions/` + * - `projects//locations//agent/versions/` + * Please see {@see VersionsClient::versionName()} for help formatting this field. + */ +function get_version_sample(string $formattedName): void +{ + // Create a client. + $versionsClient = new VersionsClient(); + + // Call the API and handle any network failures. + try { + /** @var Version $response */ + $response = $versionsClient->getVersion($formattedName); + 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 = VersionsClient::versionName('[PROJECT]', '[VERSION]'); + + get_version_sample($formattedName); +} +// [END dialogflow_v2_generated_Versions_GetVersion_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_locations.php new file mode 100644 index 000000000000..9041a7fb8603 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $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()); + } +} +// [END dialogflow_v2_generated_Versions_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_versions.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_versions.php new file mode 100644 index 000000000000..d093ad705a0f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_versions.php @@ -0,0 +1,75 @@ +/agent` + * - `projects//locations//agent` + * Please see {@see VersionsClient::agentName()} for help formatting this field. + */ +function list_versions_sample(string $formattedParent): void +{ + // Create a client. + $versionsClient = new VersionsClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $versionsClient->listVersions($formattedParent); + + /** @var Version $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 = VersionsClient::agentName('[PROJECT]'); + + list_versions_sample($formattedParent); +} +// [END dialogflow_v2_generated_Versions_ListVersions_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/update_version.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/update_version.php new file mode 100644 index 000000000000..1d7662bb6779 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/update_version.php @@ -0,0 +1,62 @@ +updateVersion($version, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v2_generated_Versions_UpdateVersion_sync] diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/AgentsClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/AgentsClient.php new file mode 100644 index 000000000000..f35575682398 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/AgentsClient.php @@ -0,0 +1,34 @@ +projectName('[PROJECT]'); + * $agentsClient->deleteAgent($formattedParent); + * } finally { + * $agentsClient->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. + */ +class AgentsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Agents'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $agentNameTemplate; + + private static $locationNameTemplate; + + private static $projectNameTemplate; + + private static $projectAgentNameTemplate; + + private static $projectLocationAgentNameTemplate; + + 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/agents_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/agents_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/agents_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/agents_rest_client_config.php', + ], + ], + ]; + } + + private static function getAgentNameTemplate() + { + if (self::$agentNameTemplate == null) { + self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$agentNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectAgentNameTemplate() + { + if (self::$projectAgentNameTemplate == null) { + self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$projectAgentNameTemplate; + } + + private static function getProjectLocationAgentNameTemplate() + { + if (self::$projectLocationAgentNameTemplate == null) { + self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); + } + + return self::$projectLocationAgentNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'agent' => self::getAgentNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectAgent' => self::getProjectAgentNameTemplate(), + 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * + * @return string The formatted agent resource. + */ + public static function agentName($project) + { + return self::getAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * 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 project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_agent resource. + * + * @param string $project + * + * @return string The formatted project_agent resource. + */ + public static function projectAgentName($project) + { + return self::getProjectAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted project_location_agent resource. + */ + public static function projectLocationAgentName($project, $location) + { + return self::getProjectLocationAgentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - agent: projects/{project}/agent + * - location: projects/{project}/locations/{location} + * - project: projects/{project} + * - projectAgent: projects/{project}/agent + * - projectLocationAgent: projects/{project}/locations/{location}/agent + * + * 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 'dialogflow.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); + } + + /** + * Deletes the specified agent. + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $formattedParent = $agentsClient->projectName('[PROJECT]'); + * $agentsClient->deleteAgent($formattedParent); + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project that the agent to delete is associated with. + * Format: `projects/`. + * @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 deleteAgent($parent, array $optionalArgs = []) + { + $request = new DeleteAgentRequest(); + $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('DeleteAgent', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Exports the specified agent to a ZIP file. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: + * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse] + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $formattedParent = $agentsClient->projectName('[PROJECT]'); + * $agentUri = 'agent_uri'; + * $operationResponse = $agentsClient->exportAgent($formattedParent, $agentUri); + * $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 = $agentsClient->exportAgent($formattedParent, $agentUri); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $agentsClient->resumeOperation($operationName, 'exportAgent'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project that the agent to export is associated with. + * Format: `projects/`. + * @param string $agentUri Required. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. + * + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * @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 exportAgent($parent, $agentUri, array $optionalArgs = []) + { + $request = new ExportAgentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAgentUri($agentUri); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ExportAgent', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Retrieves the specified agent. + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $formattedParent = $agentsClient->projectName('[PROJECT]'); + * $response = $agentsClient->getAgent($formattedParent); + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project that the agent to fetch is associated with. + * Format: `projects/`. + * @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\Dialogflow\V2\Agent + * + * @throws ApiException if the remote call fails + */ + public function getAgent($parent, array $optionalArgs = []) + { + $request = new GetAgentRequest(); + $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('GetAgent', Agent::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets agent validation result. Agent validation is performed during + * training time and is updated automatically when training is completed. + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $formattedParent = $agentsClient->projectName('[PROJECT]'); + * $response = $agentsClient->getValidationResult($formattedParent); + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project that the agent is associated with. + * Format: `projects/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language for which you want a validation result. If not + * specified, the agent's default language is used. [Many + * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * are supported. Note: languages must be enabled in the agent before they can + * be used. + * @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\Dialogflow\V2\ValidationResult + * + * @throws ApiException if the remote call fails + */ + public function getValidationResult($parent, array $optionalArgs = []) + { + $request = new GetValidationResultRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetValidationResult', ValidationResult::class, $optionalArgs, $request)->wait(); + } + + /** + * Imports the specified agent from a ZIP file. + * + * Uploads new intents and entity types without deleting the existing ones. + * Intents and entity types with the same name are replaced with the new + * versions from + * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After + * the import, the imported draft agent will be trained automatically (unless + * disabled in agent settings). However, once the import is done, training may + * not be completed yet. Please call + * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the + * operation it returns in order to train explicitly. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * The operation only tracks when importing is complete, not when it is done + * training. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $formattedParent = $agentsClient->projectName('[PROJECT]'); + * $operationResponse = $agentsClient->importAgent($formattedParent); + * $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 = $agentsClient->importAgent($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $agentsClient->resumeOperation($operationName, 'importAgent'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project that the agent to import is associated with. + * Format: `projects/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $agentUri + * The URI to a Google Cloud Storage file containing the agent to import. + * Note: The URI must start with "gs://". + * + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * @type string $agentContent + * Zip compressed raw byte content for agent. + * @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 importAgent($parent, array $optionalArgs = []) + { + $request = new ImportAgentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['agentUri'])) { + $request->setAgentUri($optionalArgs['agentUri']); + } + + if (isset($optionalArgs['agentContent'])) { + $request->setAgentContent($optionalArgs['agentContent']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ImportAgent', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Restores the specified agent from a ZIP file. + * + * Replaces the current agent version with a new one. All the intents and + * entity types in the older version are deleted. After the restore, the + * restored draft agent will be trained automatically (unless disabled in + * agent settings). However, once the restore is done, training may not be + * completed yet. Please call + * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the + * operation it returns in order to train explicitly. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * The operation only tracks when restoring is complete, not when it is done + * training. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $formattedParent = $agentsClient->projectName('[PROJECT]'); + * $operationResponse = $agentsClient->restoreAgent($formattedParent); + * $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 = $agentsClient->restoreAgent($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $agentsClient->resumeOperation($operationName, 'restoreAgent'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project that the agent to restore is associated with. + * Format: `projects/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $agentUri + * The URI to a Google Cloud Storage file containing the agent to restore. + * Note: The URI must start with "gs://". + * + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * @type string $agentContent + * Zip compressed raw byte content for agent. + * @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 restoreAgent($parent, array $optionalArgs = []) + { + $request = new RestoreAgentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['agentUri'])) { + $request->setAgentUri($optionalArgs['agentUri']); + } + + if (isset($optionalArgs['agentContent'])) { + $request->setAgentContent($optionalArgs['agentContent']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('RestoreAgent', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Returns the list of agents. + * + * Since there is at most one conversational agent per project, this method is + * useful primarily for listing all agents across projects the caller has + * access to. One can achieve that with a wildcard project collection id "-". + * Refer to [List + * Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $formattedParent = $agentsClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $agentsClient->searchAgents($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $agentsClient->searchAgents($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project to list agents from. + * Format: `projects/`. + * @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 searchAgents($parent, array $optionalArgs = []) + { + $request = new SearchAgentsRequest(); + $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('SearchAgents', $optionalArgs, SearchAgentsResponse::class, $request); + } + + /** + * Creates/updates the specified agent. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $agent = new Agent(); + * $response = $agentsClient->setAgent($agent); + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param Agent $agent Required. The agent to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. The mask to control which fields get 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\Dialogflow\V2\Agent + * + * @throws ApiException if the remote call fails + */ + public function setAgent($agent, array $optionalArgs = []) + { + $request = new SetAgentRequest(); + $requestParamHeaders = []; + $request->setAgent($agent); + $requestParamHeaders['agent.parent'] = $agent->getParent(); + 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('SetAgent', Agent::class, $optionalArgs, $request)->wait(); + } + + /** + * Trains the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $formattedParent = $agentsClient->projectName('[PROJECT]'); + * $operationResponse = $agentsClient->trainAgent($formattedParent); + * $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 = $agentsClient->trainAgent($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $agentsClient->resumeOperation($operationName, 'trainAgent'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project that the agent to train is associated with. + * Format: `projects/`. + * @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 trainAgent($parent, array $optionalArgs = []) + { + $request = new TrainAgentRequest(); + $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->startOperationsCall('TrainAgent', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * $response = $agentsClient->getLocation(); + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $agentsClient = new AgentsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $agentsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $agentsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $agentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AnswerRecordsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AnswerRecordsGapicClient.php new file mode 100644 index 000000000000..55d74bb8000d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AnswerRecordsGapicClient.php @@ -0,0 +1,626 @@ +projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $answerRecordsClient->listAnswerRecords($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $answerRecordsClient->listAnswerRecords($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $answerRecordsClient->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. + */ +class AnswerRecordsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.AnswerRecords'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $answerRecordNameTemplate; + + private static $locationNameTemplate; + + private static $projectNameTemplate; + + private static $projectAnswerRecordNameTemplate; + + private static $projectLocationAnswerRecordNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/answer_records_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/answer_records_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/answer_records_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/answer_records_rest_client_config.php', + ], + ], + ]; + } + + private static function getAnswerRecordNameTemplate() + { + if (self::$answerRecordNameTemplate == null) { + self::$answerRecordNameTemplate = new PathTemplate('projects/{project}/answerRecords/{answer_record}'); + } + + return self::$answerRecordNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectAnswerRecordNameTemplate() + { + if (self::$projectAnswerRecordNameTemplate == null) { + self::$projectAnswerRecordNameTemplate = new PathTemplate('projects/{project}/answerRecords/{answer_record}'); + } + + return self::$projectAnswerRecordNameTemplate; + } + + private static function getProjectLocationAnswerRecordNameTemplate() + { + if (self::$projectLocationAnswerRecordNameTemplate == null) { + self::$projectLocationAnswerRecordNameTemplate = new PathTemplate('projects/{project}/locations/{location}/answerRecords/{answer_record}'); + } + + return self::$projectLocationAnswerRecordNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'answerRecord' => self::getAnswerRecordNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectAnswerRecord' => self::getProjectAnswerRecordNameTemplate(), + 'projectLocationAnswerRecord' => self::getProjectLocationAnswerRecordNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * answer_record resource. + * + * @param string $project + * @param string $answerRecord + * + * @return string The formatted answer_record resource. + */ + public static function answerRecordName($project, $answerRecord) + { + return self::getAnswerRecordNameTemplate()->render([ + 'project' => $project, + 'answer_record' => $answerRecord, + ]); + } + + /** + * 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 project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_answer_record resource. + * + * @param string $project + * @param string $answerRecord + * + * @return string The formatted project_answer_record resource. + */ + public static function projectAnswerRecordName($project, $answerRecord) + { + return self::getProjectAnswerRecordNameTemplate()->render([ + 'project' => $project, + 'answer_record' => $answerRecord, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_answer_record resource. + * + * @param string $project + * @param string $location + * @param string $answerRecord + * + * @return string The formatted project_location_answer_record resource. + */ + public static function projectLocationAnswerRecordName($project, $location, $answerRecord) + { + return self::getProjectLocationAnswerRecordNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'answer_record' => $answerRecord, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - answerRecord: projects/{project}/answerRecords/{answer_record} + * - location: projects/{project}/locations/{location} + * - project: projects/{project} + * - projectAnswerRecord: projects/{project}/answerRecords/{answer_record} + * - projectLocationAnswerRecord: projects/{project}/locations/{location}/answerRecords/{answer_record} + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Returns the list of all answer records in the specified project in reverse + * chronological order. + * + * Sample code: + * ``` + * $answerRecordsClient = new AnswerRecordsClient(); + * try { + * $formattedParent = $answerRecordsClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $answerRecordsClient->listAnswerRecords($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $answerRecordsClient->listAnswerRecords($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $answerRecordsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project to list all answer records for in reverse + * chronological order. Format: `projects//locations/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. Filters to restrict results to specific answer records. + * + * Marked deprecated as it hasn't been, and isn't currently, supported. + * + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * @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 listAnswerRecords($parent, array $optionalArgs = []) + { + $request = new ListAnswerRecordsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListAnswerRecords', $optionalArgs, ListAnswerRecordsResponse::class, $request); + } + + /** + * Updates the specified answer record. + * + * Sample code: + * ``` + * $answerRecordsClient = new AnswerRecordsClient(); + * try { + * $answerRecord = new AnswerRecord(); + * $updateMask = new FieldMask(); + * $response = $answerRecordsClient->updateAnswerRecord($answerRecord, $updateMask); + * } finally { + * $answerRecordsClient->close(); + * } + * ``` + * + * @param AnswerRecord $answerRecord Required. Answer record to update. + * @param FieldMask $updateMask Required. The mask to control which fields get 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\Dialogflow\V2\AnswerRecord + * + * @throws ApiException if the remote call fails + */ + public function updateAnswerRecord($answerRecord, $updateMask, array $optionalArgs = []) + { + $request = new UpdateAnswerRecordRequest(); + $requestParamHeaders = []; + $request->setAnswerRecord($answerRecord); + $request->setUpdateMask($updateMask); + $requestParamHeaders['answer_record.name'] = $answerRecord->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateAnswerRecord', AnswerRecord::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $answerRecordsClient = new AnswerRecordsClient(); + * try { + * $response = $answerRecordsClient->getLocation(); + * } finally { + * $answerRecordsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $answerRecordsClient = new AnswerRecordsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $answerRecordsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $answerRecordsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $answerRecordsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ContextsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ContextsGapicClient.php new file mode 100644 index 000000000000..39dc80d2ba39 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ContextsGapicClient.php @@ -0,0 +1,974 @@ +sessionName('[PROJECT]', '[SESSION]'); + * $context = new Context(); + * $response = $contextsClient->createContext($formattedParent, $context); + * } finally { + * $contextsClient->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. + */ +class ContextsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Contexts'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $contextNameTemplate; + + private static $projectEnvironmentUserSessionNameTemplate; + + private static $projectEnvironmentUserSessionContextNameTemplate; + + private static $projectLocationEnvironmentUserSessionNameTemplate; + + private static $projectLocationEnvironmentUserSessionContextNameTemplate; + + private static $projectLocationSessionNameTemplate; + + private static $projectLocationSessionContextNameTemplate; + + private static $projectSessionNameTemplate; + + private static $projectSessionContextNameTemplate; + + private static $sessionNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/contexts_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/contexts_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/contexts_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/contexts_rest_client_config.php', + ], + ], + ]; + } + + private static function getContextNameTemplate() + { + if (self::$contextNameTemplate == null) { + self::$contextNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}/contexts/{context}'); + } + + return self::$contextNameTemplate; + } + + private static function getProjectEnvironmentUserSessionNameTemplate() + { + if (self::$projectEnvironmentUserSessionNameTemplate == null) { + self::$projectEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}'); + } + + return self::$projectEnvironmentUserSessionNameTemplate; + } + + private static function getProjectEnvironmentUserSessionContextNameTemplate() + { + if (self::$projectEnvironmentUserSessionContextNameTemplate == null) { + self::$projectEnvironmentUserSessionContextNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}'); + } + + return self::$projectEnvironmentUserSessionContextNameTemplate; + } + + private static function getProjectLocationEnvironmentUserSessionNameTemplate() + { + if (self::$projectLocationEnvironmentUserSessionNameTemplate == null) { + self::$projectLocationEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}'); + } + + return self::$projectLocationEnvironmentUserSessionNameTemplate; + } + + private static function getProjectLocationEnvironmentUserSessionContextNameTemplate() + { + if (self::$projectLocationEnvironmentUserSessionContextNameTemplate == null) { + self::$projectLocationEnvironmentUserSessionContextNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}'); + } + + return self::$projectLocationEnvironmentUserSessionContextNameTemplate; + } + + private static function getProjectLocationSessionNameTemplate() + { + if (self::$projectLocationSessionNameTemplate == null) { + self::$projectLocationSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}'); + } + + return self::$projectLocationSessionNameTemplate; + } + + private static function getProjectLocationSessionContextNameTemplate() + { + if (self::$projectLocationSessionContextNameTemplate == null) { + self::$projectLocationSessionContextNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}'); + } + + return self::$projectLocationSessionContextNameTemplate; + } + + private static function getProjectSessionNameTemplate() + { + if (self::$projectSessionNameTemplate == null) { + self::$projectSessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); + } + + return self::$projectSessionNameTemplate; + } + + private static function getProjectSessionContextNameTemplate() + { + if (self::$projectSessionContextNameTemplate == null) { + self::$projectSessionContextNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}/contexts/{context}'); + } + + return self::$projectSessionContextNameTemplate; + } + + private static function getSessionNameTemplate() + { + if (self::$sessionNameTemplate == null) { + self::$sessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); + } + + return self::$sessionNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'context' => self::getContextNameTemplate(), + 'projectEnvironmentUserSession' => self::getProjectEnvironmentUserSessionNameTemplate(), + 'projectEnvironmentUserSessionContext' => self::getProjectEnvironmentUserSessionContextNameTemplate(), + 'projectLocationEnvironmentUserSession' => self::getProjectLocationEnvironmentUserSessionNameTemplate(), + 'projectLocationEnvironmentUserSessionContext' => self::getProjectLocationEnvironmentUserSessionContextNameTemplate(), + 'projectLocationSession' => self::getProjectLocationSessionNameTemplate(), + 'projectLocationSessionContext' => self::getProjectLocationSessionContextNameTemplate(), + 'projectSession' => self::getProjectSessionNameTemplate(), + 'projectSessionContext' => self::getProjectSessionContextNameTemplate(), + 'session' => self::getSessionNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a context + * resource. + * + * @param string $project + * @param string $session + * @param string $context + * + * @return string The formatted context resource. + */ + public static function contextName($project, $session, $context) + { + return self::getContextNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + 'context' => $context, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_environment_user_session resource. + * + * @param string $project + * @param string $environment + * @param string $user + * @param string $session + * + * @return string The formatted project_environment_user_session resource. + */ + public static function projectEnvironmentUserSessionName($project, $environment, $user, $session) + { + return self::getProjectEnvironmentUserSessionNameTemplate()->render([ + 'project' => $project, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_environment_user_session_context resource. + * + * @param string $project + * @param string $environment + * @param string $user + * @param string $session + * @param string $context + * + * @return string The formatted project_environment_user_session_context resource. + */ + public static function projectEnvironmentUserSessionContextName($project, $environment, $user, $session, $context) + { + return self::getProjectEnvironmentUserSessionContextNameTemplate()->render([ + 'project' => $project, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + 'context' => $context, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_environment_user_session resource. + * + * @param string $project + * @param string $location + * @param string $environment + * @param string $user + * @param string $session + * + * @return string The formatted project_location_environment_user_session resource. + */ + public static function projectLocationEnvironmentUserSessionName($project, $location, $environment, $user, $session) + { + return self::getProjectLocationEnvironmentUserSessionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_environment_user_session_context resource. + * + * @param string $project + * @param string $location + * @param string $environment + * @param string $user + * @param string $session + * @param string $context + * + * @return string The formatted project_location_environment_user_session_context resource. + */ + public static function projectLocationEnvironmentUserSessionContextName($project, $location, $environment, $user, $session, $context) + { + return self::getProjectLocationEnvironmentUserSessionContextNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + 'context' => $context, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_session resource. + * + * @param string $project + * @param string $location + * @param string $session + * + * @return string The formatted project_location_session resource. + */ + public static function projectLocationSessionName($project, $location, $session) + { + return self::getProjectLocationSessionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_session_context resource. + * + * @param string $project + * @param string $location + * @param string $session + * @param string $context + * + * @return string The formatted project_location_session_context resource. + */ + public static function projectLocationSessionContextName($project, $location, $session, $context) + { + return self::getProjectLocationSessionContextNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + 'context' => $context, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_session resource. + * + * @param string $project + * @param string $session + * + * @return string The formatted project_session resource. + */ + public static function projectSessionName($project, $session) + { + return self::getProjectSessionNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_session_context resource. + * + * @param string $project + * @param string $session + * @param string $context + * + * @return string The formatted project_session_context resource. + */ + public static function projectSessionContextName($project, $session, $context) + { + return self::getProjectSessionContextNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + 'context' => $context, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a session + * resource. + * + * @param string $project + * @param string $session + * + * @return string The formatted session resource. + */ + public static function sessionName($project, $session) + { + return self::getSessionNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - context: projects/{project}/agent/sessions/{session}/contexts/{context} + * - projectEnvironmentUserSession: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session} + * - projectEnvironmentUserSessionContext: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context} + * - projectLocationEnvironmentUserSession: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session} + * - projectLocationEnvironmentUserSessionContext: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context} + * - projectLocationSession: projects/{project}/locations/{location}/agent/sessions/{session} + * - projectLocationSessionContext: projects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context} + * - projectSession: projects/{project}/agent/sessions/{session} + * - projectSessionContext: projects/{project}/agent/sessions/{session}/contexts/{context} + * - session: projects/{project}/agent/sessions/{session} + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Creates a context. + * + * If the specified context already exists, overrides the context. + * + * Sample code: + * ``` + * $contextsClient = new ContextsClient(); + * try { + * $formattedParent = $contextsClient->sessionName('[PROJECT]', '[SESSION]'); + * $context = new Context(); + * $response = $contextsClient->createContext($formattedParent, $context); + * } finally { + * $contextsClient->close(); + * } + * ``` + * + * @param string $parent Required. The session to create a context for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @param Context $context Required. The context 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\Dialogflow\V2\Context + * + * @throws ApiException if the remote call fails + */ + public function createContext($parent, $context, array $optionalArgs = []) + { + $request = new CreateContextRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setContext($context); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateContext', Context::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes all active contexts in the specified session. + * + * Sample code: + * ``` + * $contextsClient = new ContextsClient(); + * try { + * $formattedParent = $contextsClient->sessionName('[PROJECT]', '[SESSION]'); + * $contextsClient->deleteAllContexts($formattedParent); + * } finally { + * $contextsClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the session to delete all contexts from. Format: + * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified we assume default 'draft' environment. + * If `User ID` is not specified, we assume default '-' user. + * @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 deleteAllContexts($parent, array $optionalArgs = []) + { + $request = new DeleteAllContextsRequest(); + $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('DeleteAllContexts', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified context. + * + * Sample code: + * ``` + * $contextsClient = new ContextsClient(); + * try { + * $formattedName = $contextsClient->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); + * $contextsClient->deleteContext($formattedName); + * } finally { + * $contextsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the context to delete. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @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 deleteContext($name, array $optionalArgs = []) + { + $request = new DeleteContextRequest(); + $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('DeleteContext', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the specified context. + * + * Sample code: + * ``` + * $contextsClient = new ContextsClient(); + * try { + * $formattedName = $contextsClient->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); + * $response = $contextsClient->getContext($formattedName); + * } finally { + * $contextsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the context. Format: + * `projects//agent/sessions//contexts/` + * or `projects//agent/environments//users//sessions//contexts/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @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\Dialogflow\V2\Context + * + * @throws ApiException if the remote call fails + */ + public function getContext($name, array $optionalArgs = []) + { + $request = new GetContextRequest(); + $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('GetContext', Context::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all contexts in the specified session. + * + * Sample code: + * ``` + * $contextsClient = new ContextsClient(); + * try { + * $formattedParent = $contextsClient->sessionName('[PROJECT]', '[SESSION]'); + * // Iterate over pages of elements + * $pagedResponse = $contextsClient->listContexts($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $contextsClient->listContexts($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $contextsClient->close(); + * } + * ``` + * + * @param string $parent Required. The session to list all contexts from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @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 listContexts($parent, array $optionalArgs = []) + { + $request = new ListContextsRequest(); + $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('ListContexts', $optionalArgs, ListContextsResponse::class, $request); + } + + /** + * Updates the specified context. + * + * Sample code: + * ``` + * $contextsClient = new ContextsClient(); + * try { + * $context = new Context(); + * $response = $contextsClient->updateContext($context); + * } finally { + * $contextsClient->close(); + * } + * ``` + * + * @param Context $context Required. The context to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. The mask to control which fields get 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\Dialogflow\V2\Context + * + * @throws ApiException if the remote call fails + */ + public function updateContext($context, array $optionalArgs = []) + { + $request = new UpdateContextRequest(); + $requestParamHeaders = []; + $request->setContext($context); + $requestParamHeaders['context.name'] = $context->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('UpdateContext', Context::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $contextsClient = new ContextsClient(); + * try { + * $response = $contextsClient->getLocation(); + * } finally { + * $contextsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $contextsClient = new ContextsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $contextsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $contextsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $contextsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationDatasetsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationDatasetsGapicClient.php new file mode 100644 index 000000000000..68607280054e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationDatasetsGapicClient.php @@ -0,0 +1,813 @@ +createConversationDataset($parent, $conversationDataset); + * $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 = $conversationDatasetsClient->createConversationDataset($parent, $conversationDataset); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationDatasetsClient->resumeOperation($operationName, 'createConversationDataset'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationDatasetsClient->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. + */ +class ConversationDatasetsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.ConversationDatasets'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $conversationDatasetNameTemplate; + + private static $locationNameTemplate; + + 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/conversation_datasets_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/conversation_datasets_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/conversation_datasets_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/conversation_datasets_rest_client_config.php', + ], + ], + ]; + } + + private static function getConversationDatasetNameTemplate() + { + if (self::$conversationDatasetNameTemplate == null) { + self::$conversationDatasetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationDatasets/{conversation_dataset}'); + } + + return self::$conversationDatasetNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'conversationDataset' => self::getConversationDatasetNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conversation_dataset resource. + * + * @param string $project + * @param string $location + * @param string $conversationDataset + * + * @return string The formatted conversation_dataset resource. + */ + public static function conversationDatasetName($project, $location, $conversationDataset) + { + return self::getConversationDatasetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation_dataset' => $conversationDataset, + ]); + } + + /** + * 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, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - conversationDataset: projects/{project}/locations/{location}/conversationDatasets/{conversation_dataset} + * - location: projects/{project}/locations/{location} + * + * 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 'dialogflow.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); + } + + /** + * Creates a new conversation dataset. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata] + * - `response`: + * [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset] + * + * Sample code: + * ``` + * $conversationDatasetsClient = new ConversationDatasetsClient(); + * try { + * $parent = 'parent'; + * $conversationDataset = new ConversationDataset(); + * $operationResponse = $conversationDatasetsClient->createConversationDataset($parent, $conversationDataset); + * $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 = $conversationDatasetsClient->createConversationDataset($parent, $conversationDataset); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationDatasetsClient->resumeOperation($operationName, 'createConversationDataset'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationDatasetsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project to create conversation dataset for. Format: + * `projects//locations/` + * @param ConversationDataset $conversationDataset Required. The conversation dataset 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 createConversationDataset($parent, $conversationDataset, array $optionalArgs = []) + { + $request = new CreateConversationDatasetRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setConversationDataset($conversationDataset); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateConversationDataset', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes the specified conversation dataset. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Sample code: + * ``` + * $conversationDatasetsClient = new ConversationDatasetsClient(); + * try { + * $formattedName = $conversationDatasetsClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); + * $operationResponse = $conversationDatasetsClient->deleteConversationDataset($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 = $conversationDatasetsClient->deleteConversationDataset($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationDatasetsClient->resumeOperation($operationName, 'deleteConversationDataset'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationDatasetsClient->close(); + * } + * ``` + * + * @param string $name Required. The conversation dataset to delete. Format: + * `projects//locations//conversationDatasets/` + * @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 deleteConversationDataset($name, array $optionalArgs = []) + { + $request = new DeleteConversationDatasetRequest(); + $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('DeleteConversationDataset', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Retrieves the specified conversation dataset. + * + * Sample code: + * ``` + * $conversationDatasetsClient = new ConversationDatasetsClient(); + * try { + * $formattedName = $conversationDatasetsClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); + * $response = $conversationDatasetsClient->getConversationDataset($formattedName); + * } finally { + * $conversationDatasetsClient->close(); + * } + * ``` + * + * @param string $name Required. The conversation dataset to retrieve. Format: + * `projects//locations//conversationDatasets/` + * @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\Dialogflow\V2\ConversationDataset + * + * @throws ApiException if the remote call fails + */ + public function getConversationDataset($name, array $optionalArgs = []) + { + $request = new GetConversationDatasetRequest(); + $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('GetConversationDataset', ConversationDataset::class, $optionalArgs, $request)->wait(); + } + + /** + * Import data into the specified conversation dataset. Note that it + * is not allowed to import data to a conversation dataset that + * already has data in it. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata] + * - `response`: + * [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse] + * + * Sample code: + * ``` + * $conversationDatasetsClient = new ConversationDatasetsClient(); + * try { + * $formattedName = $conversationDatasetsClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); + * $inputConfig = new InputConfig(); + * $operationResponse = $conversationDatasetsClient->importConversationData($formattedName, $inputConfig); + * $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 = $conversationDatasetsClient->importConversationData($formattedName, $inputConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationDatasetsClient->resumeOperation($operationName, 'importConversationData'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationDatasetsClient->close(); + * } + * ``` + * + * @param string $name Required. Dataset resource name. Format: + * `projects//locations//conversationDatasets/` + * @param InputConfig $inputConfig Required. Configuration describing where to import data from. + * @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 importConversationData($name, $inputConfig, array $optionalArgs = []) + { + $request = new ImportConversationDataRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setInputConfig($inputConfig); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ImportConversationData', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Returns the list of all conversation datasets in the specified + * project and location. + * + * Sample code: + * ``` + * $conversationDatasetsClient = new ConversationDatasetsClient(); + * try { + * $formattedParent = $conversationDatasetsClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $conversationDatasetsClient->listConversationDatasets($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationDatasetsClient->listConversationDatasets($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationDatasetsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location name to list all conversation datasets + * for. Format: `projects//locations/` + * @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 listConversationDatasets($parent, array $optionalArgs = []) + { + $request = new ListConversationDatasetsRequest(); + $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('ListConversationDatasets', $optionalArgs, ListConversationDatasetsResponse::class, $request); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $conversationDatasetsClient = new ConversationDatasetsClient(); + * try { + * $response = $conversationDatasetsClient->getLocation(); + * } finally { + * $conversationDatasetsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $conversationDatasetsClient = new ConversationDatasetsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $conversationDatasetsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationDatasetsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationDatasetsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationModelsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationModelsGapicClient.php new file mode 100644 index 000000000000..d4f950b4e5eb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationModelsGapicClient.php @@ -0,0 +1,1193 @@ +createConversationModel($conversationModel); + * $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 = $conversationModelsClient->createConversationModel($conversationModel); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'createConversationModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationModelsClient->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. + */ +class ConversationModelsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.ConversationModels'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $conversationModelNameTemplate; + + private static $conversationModelEvaluationNameTemplate; + + private static $projectConversationModelNameTemplate; + + private static $projectConversationModelEvaluationNameTemplate; + + private static $projectLocationConversationModelNameTemplate; + + private static $projectLocationConversationModelEvaluationNameTemplate; + + 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/conversation_models_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/conversation_models_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/conversation_models_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/conversation_models_rest_client_config.php', + ], + ], + ]; + } + + private static function getConversationModelNameTemplate() + { + if (self::$conversationModelNameTemplate == null) { + self::$conversationModelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationModels/{conversation_model}'); + } + + return self::$conversationModelNameTemplate; + } + + private static function getConversationModelEvaluationNameTemplate() + { + if (self::$conversationModelEvaluationNameTemplate == null) { + self::$conversationModelEvaluationNameTemplate = new PathTemplate('projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation}'); + } + + return self::$conversationModelEvaluationNameTemplate; + } + + private static function getProjectConversationModelNameTemplate() + { + if (self::$projectConversationModelNameTemplate == null) { + self::$projectConversationModelNameTemplate = new PathTemplate('projects/{project}/conversationModels/{conversation_model}'); + } + + return self::$projectConversationModelNameTemplate; + } + + private static function getProjectConversationModelEvaluationNameTemplate() + { + if (self::$projectConversationModelEvaluationNameTemplate == null) { + self::$projectConversationModelEvaluationNameTemplate = new PathTemplate('projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation}'); + } + + return self::$projectConversationModelEvaluationNameTemplate; + } + + private static function getProjectLocationConversationModelNameTemplate() + { + if (self::$projectLocationConversationModelNameTemplate == null) { + self::$projectLocationConversationModelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationModels/{conversation_model}'); + } + + return self::$projectLocationConversationModelNameTemplate; + } + + private static function getProjectLocationConversationModelEvaluationNameTemplate() + { + if (self::$projectLocationConversationModelEvaluationNameTemplate == null) { + self::$projectLocationConversationModelEvaluationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation}'); + } + + return self::$projectLocationConversationModelEvaluationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'conversationModel' => self::getConversationModelNameTemplate(), + 'conversationModelEvaluation' => self::getConversationModelEvaluationNameTemplate(), + 'projectConversationModel' => self::getProjectConversationModelNameTemplate(), + 'projectConversationModelEvaluation' => self::getProjectConversationModelEvaluationNameTemplate(), + 'projectLocationConversationModel' => self::getProjectLocationConversationModelNameTemplate(), + 'projectLocationConversationModelEvaluation' => self::getProjectLocationConversationModelEvaluationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conversation_model resource. + * + * @param string $project + * @param string $location + * @param string $conversationModel + * + * @return string The formatted conversation_model resource. + */ + public static function conversationModelName($project, $location, $conversationModel) + { + return self::getConversationModelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation_model' => $conversationModel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conversation_model_evaluation resource. + * + * @param string $project + * @param string $conversationModel + * @param string $evaluation + * + * @return string The formatted conversation_model_evaluation resource. + */ + public static function conversationModelEvaluationName($project, $conversationModel, $evaluation) + { + return self::getConversationModelEvaluationNameTemplate()->render([ + 'project' => $project, + 'conversation_model' => $conversationModel, + 'evaluation' => $evaluation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation_model resource. + * + * @param string $project + * @param string $conversationModel + * + * @return string The formatted project_conversation_model resource. + */ + public static function projectConversationModelName($project, $conversationModel) + { + return self::getProjectConversationModelNameTemplate()->render([ + 'project' => $project, + 'conversation_model' => $conversationModel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation_model_evaluation resource. + * + * @param string $project + * @param string $conversationModel + * @param string $evaluation + * + * @return string The formatted project_conversation_model_evaluation resource. + */ + public static function projectConversationModelEvaluationName($project, $conversationModel, $evaluation) + { + return self::getProjectConversationModelEvaluationNameTemplate()->render([ + 'project' => $project, + 'conversation_model' => $conversationModel, + 'evaluation' => $evaluation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation_model resource. + * + * @param string $project + * @param string $location + * @param string $conversationModel + * + * @return string The formatted project_location_conversation_model resource. + */ + public static function projectLocationConversationModelName($project, $location, $conversationModel) + { + return self::getProjectLocationConversationModelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation_model' => $conversationModel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation_model_evaluation resource. + * + * @param string $project + * @param string $location + * @param string $conversationModel + * @param string $evaluation + * + * @return string The formatted project_location_conversation_model_evaluation resource. + */ + public static function projectLocationConversationModelEvaluationName($project, $location, $conversationModel, $evaluation) + { + return self::getProjectLocationConversationModelEvaluationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation_model' => $conversationModel, + 'evaluation' => $evaluation, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - conversationModel: projects/{project}/locations/{location}/conversationModels/{conversation_model} + * - conversationModelEvaluation: projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation} + * - projectConversationModel: projects/{project}/conversationModels/{conversation_model} + * - projectConversationModelEvaluation: projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation} + * - projectLocationConversationModel: projects/{project}/locations/{location}/conversationModels/{conversation_model} + * - projectLocationConversationModelEvaluation: projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation} + * + * 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 'dialogflow.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); + } + + /** + * Creates a model. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata] + * - `response`: + * [ConversationModel][google.cloud.dialogflow.v2.ConversationModel] + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $conversationModel = new ConversationModel(); + * $operationResponse = $conversationModelsClient->createConversationModel($conversationModel); + * $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 = $conversationModelsClient->createConversationModel($conversationModel); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'createConversationModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param ConversationModel $conversationModel Required. The conversation model to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * The project to create conversation model for. Format: + * `projects/` + * @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 createConversationModel($conversationModel, array $optionalArgs = []) + { + $request = new CreateConversationModelRequest(); + $requestParamHeaders = []; + $request->setConversationModel($conversationModel); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateConversationModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates evaluation of a conversation model. + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $formattedParent = $conversationModelsClient->conversationModelName('[PROJECT]', '[LOCATION]', '[CONVERSATION_MODEL]'); + * $conversationModelEvaluation = new ConversationModelEvaluation(); + * $operationResponse = $conversationModelsClient->createConversationModelEvaluation($formattedParent, $conversationModelEvaluation); + * $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 = $conversationModelsClient->createConversationModelEvaluation($formattedParent, $conversationModelEvaluation); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'createConversationModelEvaluation'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param string $parent Required. The conversation model resource name. Format: + * `projects//locations//conversationModels/` + * @param ConversationModelEvaluation $conversationModelEvaluation Required. The conversation model evaluation to be created. + * @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 createConversationModelEvaluation($parent, $conversationModelEvaluation, array $optionalArgs = []) + { + $request = new CreateConversationModelEvaluationRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setConversationModelEvaluation($conversationModelEvaluation); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateConversationModelEvaluation', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a model. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $name = 'name'; + * $operationResponse = $conversationModelsClient->deleteConversationModel($name); + * $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 = $conversationModelsClient->deleteConversationModel($name); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'deleteConversationModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param string $name Required. The conversation model to delete. Format: + * `projects//conversationModels/` + * @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 deleteConversationModel($name, array $optionalArgs = []) + { + $request = new DeleteConversationModelRequest(); + $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('DeleteConversationModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deploys a model. If a model is already deployed, deploying it + * has no effect. A model can only serve prediction requests after it gets + * deployed. For article suggestion, custom model will not be used unless + * it is deployed. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $name = 'name'; + * $operationResponse = $conversationModelsClient->deployConversationModel($name); + * $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 = $conversationModelsClient->deployConversationModel($name); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'deployConversationModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param string $name Required. The conversation model to deploy. Format: + * `projects//conversationModels/` + * @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 deployConversationModel($name, array $optionalArgs = []) + { + $request = new DeployConversationModelRequest(); + $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('DeployConversationModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets conversation model. + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $name = 'name'; + * $response = $conversationModelsClient->getConversationModel($name); + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param string $name Required. The conversation model to retrieve. Format: + * `projects//conversationModels/` + * @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\Dialogflow\V2\ConversationModel + * + * @throws ApiException if the remote call fails + */ + public function getConversationModel($name, array $optionalArgs = []) + { + $request = new GetConversationModelRequest(); + $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('GetConversationModel', ConversationModel::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets an evaluation of conversation model. + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $name = 'name'; + * $response = $conversationModelsClient->getConversationModelEvaluation($name); + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param string $name Required. The conversation model evaluation resource name. Format: + * `projects//conversationModels//evaluations/` + * @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\Dialogflow\V2\ConversationModelEvaluation + * + * @throws ApiException if the remote call fails + */ + public function getConversationModelEvaluation($name, array $optionalArgs = []) + { + $request = new GetConversationModelEvaluationRequest(); + $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('GetConversationModelEvaluation', ConversationModelEvaluation::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists evaluations of a conversation model. + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $parent = 'parent'; + * // Iterate over pages of elements + * $pagedResponse = $conversationModelsClient->listConversationModelEvaluations($parent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationModelsClient->listConversationModelEvaluations($parent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param string $parent Required. The conversation model resource name. Format: + * `projects//conversationModels/` + * @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 listConversationModelEvaluations($parent, array $optionalArgs = []) + { + $request = new ListConversationModelEvaluationsRequest(); + $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('ListConversationModelEvaluations', $optionalArgs, ListConversationModelEvaluationsResponse::class, $request); + } + + /** + * Lists conversation models. + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $parent = 'parent'; + * // Iterate over pages of elements + * $pagedResponse = $conversationModelsClient->listConversationModels($parent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationModelsClient->listConversationModels($parent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project to list all conversation models for. + * Format: `projects/` + * @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 listConversationModels($parent, array $optionalArgs = []) + { + $request = new ListConversationModelsRequest(); + $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('ListConversationModels', $optionalArgs, ListConversationModelsResponse::class, $request); + } + + /** + * Undeploys a model. If the model is not deployed this method has no effect. + * If the model is currently being used: + * - For article suggestion, article suggestion will fallback to the default + * model if model is undeployed. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $name = 'name'; + * $operationResponse = $conversationModelsClient->undeployConversationModel($name); + * $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 = $conversationModelsClient->undeployConversationModel($name); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'undeployConversationModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param string $name Required. The conversation model to undeploy. Format: + * `projects//conversationModels/` + * @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 undeployConversationModel($name, array $optionalArgs = []) + { + $request = new UndeployConversationModelRequest(); + $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('UndeployConversationModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * $response = $conversationModelsClient->getLocation(); + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $conversationModelsClient = new ConversationModelsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $conversationModelsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationModelsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationModelsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationProfilesGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationProfilesGapicClient.php new file mode 100644 index 000000000000..a3d5d0578f1a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationProfilesGapicClient.php @@ -0,0 +1,1015 @@ +clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); + * $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 = $conversationProfilesClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationProfilesClient->resumeOperation($operationName, 'clearSuggestionFeatureConfig'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationProfilesClient->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. + */ +class ConversationProfilesGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.ConversationProfiles'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $cXSecuritySettingsNameTemplate; + + private static $conversationProfileNameTemplate; + + private static $locationNameTemplate; + + private static $projectNameTemplate; + + private static $projectConversationProfileNameTemplate; + + private static $projectLocationConversationProfileNameTemplate; + + 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/conversation_profiles_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/conversation_profiles_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/conversation_profiles_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/conversation_profiles_rest_client_config.php', + ], + ], + ]; + } + + private static function getCXSecuritySettingsNameTemplate() + { + if (self::$cXSecuritySettingsNameTemplate == null) { + self::$cXSecuritySettingsNameTemplate = new PathTemplate('projects/{project}/locations/{location}/securitySettings/{security_settings}'); + } + + return self::$cXSecuritySettingsNameTemplate; + } + + private static function getConversationProfileNameTemplate() + { + if (self::$conversationProfileNameTemplate == null) { + self::$conversationProfileNameTemplate = new PathTemplate('projects/{project}/conversationProfiles/{conversation_profile}'); + } + + return self::$conversationProfileNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectConversationProfileNameTemplate() + { + if (self::$projectConversationProfileNameTemplate == null) { + self::$projectConversationProfileNameTemplate = new PathTemplate('projects/{project}/conversationProfiles/{conversation_profile}'); + } + + return self::$projectConversationProfileNameTemplate; + } + + private static function getProjectLocationConversationProfileNameTemplate() + { + if (self::$projectLocationConversationProfileNameTemplate == null) { + self::$projectLocationConversationProfileNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}'); + } + + return self::$projectLocationConversationProfileNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'cXSecuritySettings' => self::getCXSecuritySettingsNameTemplate(), + 'conversationProfile' => self::getConversationProfileNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectConversationProfile' => self::getProjectConversationProfileNameTemplate(), + 'projectLocationConversationProfile' => self::getProjectLocationConversationProfileNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * cx_security_settings resource. + * + * @param string $project + * @param string $location + * @param string $securitySettings + * + * @return string The formatted cx_security_settings resource. + */ + public static function cXSecuritySettingsName($project, $location, $securitySettings) + { + return self::getCXSecuritySettingsNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'security_settings' => $securitySettings, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conversation_profile resource. + * + * @param string $project + * @param string $conversationProfile + * + * @return string The formatted conversation_profile resource. + */ + public static function conversationProfileName($project, $conversationProfile) + { + return self::getConversationProfileNameTemplate()->render([ + 'project' => $project, + 'conversation_profile' => $conversationProfile, + ]); + } + + /** + * 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 project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation_profile resource. + * + * @param string $project + * @param string $conversationProfile + * + * @return string The formatted project_conversation_profile resource. + */ + public static function projectConversationProfileName($project, $conversationProfile) + { + return self::getProjectConversationProfileNameTemplate()->render([ + 'project' => $project, + 'conversation_profile' => $conversationProfile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation_profile resource. + * + * @param string $project + * @param string $location + * @param string $conversationProfile + * + * @return string The formatted project_location_conversation_profile resource. + */ + public static function projectLocationConversationProfileName($project, $location, $conversationProfile) + { + return self::getProjectLocationConversationProfileNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation_profile' => $conversationProfile, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cXSecuritySettings: projects/{project}/locations/{location}/securitySettings/{security_settings} + * - conversationProfile: projects/{project}/conversationProfiles/{conversation_profile} + * - location: projects/{project}/locations/{location} + * - project: projects/{project} + * - projectConversationProfile: projects/{project}/conversationProfiles/{conversation_profile} + * - projectLocationConversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} + * + * 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 'dialogflow.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); + } + + /** + * Clears a suggestion feature from a conversation profile for the given + * participant role. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata] + * - `response`: + * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] + * + * Sample code: + * ``` + * $conversationProfilesClient = new ConversationProfilesClient(); + * try { + * $conversationProfile = 'conversation_profile'; + * $participantRole = Role::ROLE_UNSPECIFIED; + * $suggestionFeatureType = Type::TYPE_UNSPECIFIED; + * $operationResponse = $conversationProfilesClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); + * $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 = $conversationProfilesClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationProfilesClient->resumeOperation($operationName, 'clearSuggestionFeatureConfig'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationProfilesClient->close(); + * } + * ``` + * + * @param string $conversationProfile Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * @param int $participantRole Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\Participant\Role} + * @param int $suggestionFeatureType Required. The type of the suggestion feature to remove. + * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type} + * @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 clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType, array $optionalArgs = []) + { + $request = new ClearSuggestionFeatureConfigRequest(); + $requestParamHeaders = []; + $request->setConversationProfile($conversationProfile); + $request->setParticipantRole($participantRole); + $request->setSuggestionFeatureType($suggestionFeatureType); + $requestParamHeaders['conversation_profile'] = $conversationProfile; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ClearSuggestionFeatureConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a conversation profile in the specified project. + * + * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] + * aren't populated in the response. You can retrieve them via + * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] + * API. + * + * Sample code: + * ``` + * $conversationProfilesClient = new ConversationProfilesClient(); + * try { + * $formattedParent = $conversationProfilesClient->projectName('[PROJECT]'); + * $conversationProfile = new ConversationProfile(); + * $response = $conversationProfilesClient->createConversationProfile($formattedParent, $conversationProfile); + * } finally { + * $conversationProfilesClient->close(); + * } + * ``` + * + * @param string $parent Required. The project to create a conversation profile for. + * Format: `projects//locations/`. + * @param ConversationProfile $conversationProfile Required. The conversation profile 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\Dialogflow\V2\ConversationProfile + * + * @throws ApiException if the remote call fails + */ + public function createConversationProfile($parent, $conversationProfile, array $optionalArgs = []) + { + $request = new CreateConversationProfileRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setConversationProfile($conversationProfile); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateConversationProfile', ConversationProfile::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified conversation profile. + * + * Sample code: + * ``` + * $conversationProfilesClient = new ConversationProfilesClient(); + * try { + * $formattedName = $conversationProfilesClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); + * $conversationProfilesClient->deleteConversationProfile($formattedName); + * } finally { + * $conversationProfilesClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the conversation profile to delete. + * Format: `projects//locations//conversationProfiles/`. + * @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 deleteConversationProfile($name, array $optionalArgs = []) + { + $request = new DeleteConversationProfileRequest(); + $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('DeleteConversationProfile', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the specified conversation profile. + * + * Sample code: + * ``` + * $conversationProfilesClient = new ConversationProfilesClient(); + * try { + * $formattedName = $conversationProfilesClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); + * $response = $conversationProfilesClient->getConversationProfile($formattedName); + * } finally { + * $conversationProfilesClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the conversation profile. + * Format: `projects//locations//conversationProfiles/`. + * @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\Dialogflow\V2\ConversationProfile + * + * @throws ApiException if the remote call fails + */ + public function getConversationProfile($name, array $optionalArgs = []) + { + $request = new GetConversationProfileRequest(); + $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('GetConversationProfile', ConversationProfile::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all conversation profiles in the specified project. + * + * Sample code: + * ``` + * $conversationProfilesClient = new ConversationProfilesClient(); + * try { + * $formattedParent = $conversationProfilesClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $conversationProfilesClient->listConversationProfiles($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationProfilesClient->listConversationProfiles($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationProfilesClient->close(); + * } + * ``` + * + * @param string $parent Required. The project to list all conversation profiles from. + * Format: `projects//locations/`. + * @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 listConversationProfiles($parent, array $optionalArgs = []) + { + $request = new ListConversationProfilesRequest(); + $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('ListConversationProfiles', $optionalArgs, ListConversationProfilesResponse::class, $request); + } + + /** + * Adds or updates a suggestion feature in a conversation profile. + * If the conversation profile contains the type of suggestion feature for + * the participant role, it will update it. Otherwise it will insert the + * suggestion feature. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata] + * - `response`: + * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] + * + * If a long running operation to add or update suggestion feature + * config for the same conversation profile, participant role and suggestion + * feature type exists, please cancel the existing long running operation + * before sending such request, otherwise the request will be rejected. + * + * Sample code: + * ``` + * $conversationProfilesClient = new ConversationProfilesClient(); + * try { + * $conversationProfile = 'conversation_profile'; + * $participantRole = Role::ROLE_UNSPECIFIED; + * $suggestionFeatureConfig = new SuggestionFeatureConfig(); + * $operationResponse = $conversationProfilesClient->setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig); + * $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 = $conversationProfilesClient->setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $conversationProfilesClient->resumeOperation($operationName, 'setSuggestionFeatureConfig'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $conversationProfilesClient->close(); + * } + * ``` + * + * @param string $conversationProfile Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * @param int $participantRole Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\Participant\Role} + * @param SuggestionFeatureConfig $suggestionFeatureConfig Required. The suggestion feature config to add or update. + * @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 setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig, array $optionalArgs = []) + { + $request = new SetSuggestionFeatureConfigRequest(); + $requestParamHeaders = []; + $request->setConversationProfile($conversationProfile); + $request->setParticipantRole($participantRole); + $request->setSuggestionFeatureConfig($suggestionFeatureConfig); + $requestParamHeaders['conversation_profile'] = $conversationProfile; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('SetSuggestionFeatureConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the specified conversation profile. + * + * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] + * aren't populated in the response. You can retrieve them via + * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] + * API. + * + * Sample code: + * ``` + * $conversationProfilesClient = new ConversationProfilesClient(); + * try { + * $conversationProfile = new ConversationProfile(); + * $updateMask = new FieldMask(); + * $response = $conversationProfilesClient->updateConversationProfile($conversationProfile, $updateMask); + * } finally { + * $conversationProfilesClient->close(); + * } + * ``` + * + * @param ConversationProfile $conversationProfile Required. The conversation profile to update. + * @param FieldMask $updateMask Required. The mask to control which fields to update. + * @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\Dialogflow\V2\ConversationProfile + * + * @throws ApiException if the remote call fails + */ + public function updateConversationProfile($conversationProfile, $updateMask, array $optionalArgs = []) + { + $request = new UpdateConversationProfileRequest(); + $requestParamHeaders = []; + $request->setConversationProfile($conversationProfile); + $request->setUpdateMask($updateMask); + $requestParamHeaders['conversation_profile.name'] = $conversationProfile->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateConversationProfile', ConversationProfile::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $conversationProfilesClient = new ConversationProfilesClient(); + * try { + * $response = $conversationProfilesClient->getLocation(); + * } finally { + * $conversationProfilesClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $conversationProfilesClient = new ConversationProfilesClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $conversationProfilesClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationProfilesClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationProfilesClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationsGapicClient.php new file mode 100644 index 000000000000..a6b75df6c1b8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationsGapicClient.php @@ -0,0 +1,1086 @@ +conversationName('[PROJECT]', '[CONVERSATION]'); + * $response = $conversationsClient->completeConversation($formattedName); + * } finally { + * $conversationsClient->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. + */ +class ConversationsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Conversations'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $conversationNameTemplate; + + private static $conversationProfileNameTemplate; + + private static $locationNameTemplate; + + private static $messageNameTemplate; + + private static $projectNameTemplate; + + private static $projectConversationNameTemplate; + + private static $projectConversationMessageNameTemplate; + + private static $projectConversationProfileNameTemplate; + + private static $projectLocationConversationNameTemplate; + + private static $projectLocationConversationMessageNameTemplate; + + private static $projectLocationConversationProfileNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/conversations_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/conversations_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/conversations_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/conversations_rest_client_config.php', + ], + ], + ]; + } + + private static function getConversationNameTemplate() + { + if (self::$conversationNameTemplate == null) { + self::$conversationNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}'); + } + + return self::$conversationNameTemplate; + } + + private static function getConversationProfileNameTemplate() + { + if (self::$conversationProfileNameTemplate == null) { + self::$conversationProfileNameTemplate = new PathTemplate('projects/{project}/conversationProfiles/{conversation_profile}'); + } + + return self::$conversationProfileNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getMessageNameTemplate() + { + if (self::$messageNameTemplate == null) { + self::$messageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); + } + + return self::$messageNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectConversationNameTemplate() + { + if (self::$projectConversationNameTemplate == null) { + self::$projectConversationNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}'); + } + + return self::$projectConversationNameTemplate; + } + + private static function getProjectConversationMessageNameTemplate() + { + if (self::$projectConversationMessageNameTemplate == null) { + self::$projectConversationMessageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); + } + + return self::$projectConversationMessageNameTemplate; + } + + private static function getProjectConversationProfileNameTemplate() + { + if (self::$projectConversationProfileNameTemplate == null) { + self::$projectConversationProfileNameTemplate = new PathTemplate('projects/{project}/conversationProfiles/{conversation_profile}'); + } + + return self::$projectConversationProfileNameTemplate; + } + + private static function getProjectLocationConversationNameTemplate() + { + if (self::$projectLocationConversationNameTemplate == null) { + self::$projectLocationConversationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}'); + } + + return self::$projectLocationConversationNameTemplate; + } + + private static function getProjectLocationConversationMessageNameTemplate() + { + if (self::$projectLocationConversationMessageNameTemplate == null) { + self::$projectLocationConversationMessageNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}'); + } + + return self::$projectLocationConversationMessageNameTemplate; + } + + private static function getProjectLocationConversationProfileNameTemplate() + { + if (self::$projectLocationConversationProfileNameTemplate == null) { + self::$projectLocationConversationProfileNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}'); + } + + return self::$projectLocationConversationProfileNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'conversation' => self::getConversationNameTemplate(), + 'conversationProfile' => self::getConversationProfileNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'message' => self::getMessageNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectConversation' => self::getProjectConversationNameTemplate(), + 'projectConversationMessage' => self::getProjectConversationMessageNameTemplate(), + 'projectConversationProfile' => self::getProjectConversationProfileNameTemplate(), + 'projectLocationConversation' => self::getProjectLocationConversationNameTemplate(), + 'projectLocationConversationMessage' => self::getProjectLocationConversationMessageNameTemplate(), + 'projectLocationConversationProfile' => self::getProjectLocationConversationProfileNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a conversation + * resource. + * + * @param string $project + * @param string $conversation + * + * @return string The formatted conversation resource. + */ + public static function conversationName($project, $conversation) + { + return self::getConversationNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conversation_profile resource. + * + * @param string $project + * @param string $conversationProfile + * + * @return string The formatted conversation_profile resource. + */ + public static function conversationProfileName($project, $conversationProfile) + { + return self::getConversationProfileNameTemplate()->render([ + 'project' => $project, + 'conversation_profile' => $conversationProfile, + ]); + } + + /** + * 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 message + * resource. + * + * @param string $project + * @param string $conversation + * @param string $message + * + * @return string The formatted message resource. + */ + public static function messageName($project, $conversation, $message) + { + return self::getMessageNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + 'message' => $message, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation resource. + * + * @param string $project + * @param string $conversation + * + * @return string The formatted project_conversation resource. + */ + public static function projectConversationName($project, $conversation) + { + return self::getProjectConversationNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation_message resource. + * + * @param string $project + * @param string $conversation + * @param string $message + * + * @return string The formatted project_conversation_message resource. + */ + public static function projectConversationMessageName($project, $conversation, $message) + { + return self::getProjectConversationMessageNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + 'message' => $message, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation_profile resource. + * + * @param string $project + * @param string $conversationProfile + * + * @return string The formatted project_conversation_profile resource. + */ + public static function projectConversationProfileName($project, $conversationProfile) + { + return self::getProjectConversationProfileNameTemplate()->render([ + 'project' => $project, + 'conversation_profile' => $conversationProfile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * + * @return string The formatted project_location_conversation resource. + */ + public static function projectLocationConversationName($project, $location, $conversation) + { + return self::getProjectLocationConversationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation_message resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * @param string $message + * + * @return string The formatted project_location_conversation_message resource. + */ + public static function projectLocationConversationMessageName($project, $location, $conversation, $message) + { + return self::getProjectLocationConversationMessageNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + 'message' => $message, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation_profile resource. + * + * @param string $project + * @param string $location + * @param string $conversationProfile + * + * @return string The formatted project_location_conversation_profile resource. + */ + public static function projectLocationConversationProfileName($project, $location, $conversationProfile) + { + return self::getProjectLocationConversationProfileNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation_profile' => $conversationProfile, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - conversation: projects/{project}/conversations/{conversation} + * - conversationProfile: projects/{project}/conversationProfiles/{conversation_profile} + * - location: projects/{project}/locations/{location} + * - message: projects/{project}/conversations/{conversation}/messages/{message} + * - project: projects/{project} + * - projectConversation: projects/{project}/conversations/{conversation} + * - projectConversationMessage: projects/{project}/conversations/{conversation}/messages/{message} + * - projectConversationProfile: projects/{project}/conversationProfiles/{conversation_profile} + * - projectLocationConversation: projects/{project}/locations/{location}/conversations/{conversation} + * - projectLocationConversationMessage: projects/{project}/locations/{location}/conversations/{conversation}/messages/{message} + * - projectLocationConversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Completes the specified conversation. Finished conversations are purged + * from the database after 30 days. + * + * Sample code: + * ``` + * $conversationsClient = new ConversationsClient(); + * try { + * $formattedName = $conversationsClient->conversationName('[PROJECT]', '[CONVERSATION]'); + * $response = $conversationsClient->completeConversation($formattedName); + * } finally { + * $conversationsClient->close(); + * } + * ``` + * + * @param string $name Required. Resource identifier of the conversation to close. + * Format: `projects//locations//conversations/`. + * @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\Dialogflow\V2\Conversation + * + * @throws ApiException if the remote call fails + */ + public function completeConversation($name, array $optionalArgs = []) + { + $request = new CompleteConversationRequest(); + $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('CompleteConversation', Conversation::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new conversation. Conversations are auto-completed after 24 + * hours. + * + * Conversation Lifecycle: + * There are two stages during a conversation: Automated Agent Stage and + * Assist Stage. + * + * For Automated Agent Stage, there will be a dialogflow agent responding to + * user queries. + * + * For Assist Stage, there's no dialogflow agent responding to user queries. + * But we will provide suggestions which are generated from conversation. + * + * If + * [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] + * is configured for a dialogflow agent, conversation will start from + * `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And + * during `Automated Agent Stage`, once an + * [Intent][google.cloud.dialogflow.v2.Intent] with + * [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] + * is triggered, conversation will transfer to Assist Stage. + * + * Sample code: + * ``` + * $conversationsClient = new ConversationsClient(); + * try { + * $formattedParent = $conversationsClient->projectName('[PROJECT]'); + * $conversation = new Conversation(); + * $response = $conversationsClient->createConversation($formattedParent, $conversation); + * } finally { + * $conversationsClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource identifier of the project creating the conversation. + * Format: `projects//locations/`. + * @param Conversation $conversation Required. The conversation to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $conversationId + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a + * auto-generated one to you. + * + * The conversation ID must be compliant with the regression fomula + * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. + * If the field is provided, the caller is resposible for + * 1. the uniqueness of the ID, otherwise the request will be rejected. + * 2. the consistency for whether to use custom ID or not under a project to + * better ensure uniqueness. + * @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\Dialogflow\V2\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(); + } + + /** + * Retrieves the specific conversation. + * + * Sample code: + * ``` + * $conversationsClient = new ConversationsClient(); + * try { + * $formattedName = $conversationsClient->conversationName('[PROJECT]', '[CONVERSATION]'); + * $response = $conversationsClient->getConversation($formattedName); + * } finally { + * $conversationsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the conversation. Format: + * `projects//locations//conversations/`. + * @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\Dialogflow\V2\Conversation + * + * @throws ApiException if the remote call fails + */ + public function getConversation($name, array $optionalArgs = []) + { + $request = new GetConversationRequest(); + $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('GetConversation', Conversation::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all conversations in the specified project. + * + * Sample code: + * ``` + * $conversationsClient = new ConversationsClient(); + * try { + * $formattedParent = $conversationsClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $conversationsClient->listConversations($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationsClient->listConversations($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project from which to list all conversation. + * Format: `projects//locations/`. + * @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 expression that filters conversations listed in the response. In + * general, the expression must specify the field name, a comparison operator, + * and the value to use for filtering: + *
    + *
  • The value must be a string, a number, or a boolean.
  • + *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • + *
  • To filter on multiple expressions, separate the + * expressions with `AND` or `OR` (omitting both implies `AND`).
  • + *
  • For clarity, expressions can be enclosed in parentheses.
  • + *
+ * Only `lifecycle_state` can be filtered on in this way. For example, + * the following expression only returns `COMPLETED` conversations: + * + * `lifecycle_state = "COMPLETED"` + * + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * @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']); + } + + $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 messages that belong to a given conversation. + * `messages` are ordered by `create_time` in descending order. To fetch + * updates without duplication, send request with filter + * `create_time_epoch_microseconds > + * [first item's create_time of previous request]` and empty page_token. + * + * Sample code: + * ``` + * $conversationsClient = new ConversationsClient(); + * try { + * $formattedParent = $conversationsClient->conversationName('[PROJECT]', '[CONVERSATION]'); + * // Iterate over pages of elements + * $pagedResponse = $conversationsClient->listMessages($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationsClient->listMessages($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationsClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the conversation to list messages for. + * Format: `projects//locations//conversations/` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. Filter on message fields. Currently predicates on `create_time` + * and `create_time_epoch_microseconds` are supported. `create_time` only + * support milliseconds accuracy. E.g., + * `create_time_epoch_microseconds > 1551790877964485` or + * `create_time > 2017-01-15T01:30:15.01Z`. + * + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * @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 listMessages($parent, array $optionalArgs = []) + { + $request = new ListMessagesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListMessages', $optionalArgs, ListMessagesResponse::class, $request); + } + + /** + * Suggests summary for a conversation based on specific historical messages. + * The range of the messages to be used for summary can be specified in the + * request. + * + * Sample code: + * ``` + * $conversationsClient = new ConversationsClient(); + * try { + * $formattedConversation = $conversationsClient->conversationName('[PROJECT]', '[CONVERSATION]'); + * $response = $conversationsClient->suggestConversationSummary($formattedConversation); + * } finally { + * $conversationsClient->close(); + * } + * ``` + * + * @param string $conversation Required. The conversation to fetch suggestion for. + * Format: `projects//locations//conversations/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $latestMessage + * The name of the latest conversation message used as context for + * compiling suggestion. If empty, the latest message of the conversation will + * be used. + * + * Format: `projects//locations//conversations//messages/`. + * @type int $contextSize + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 500 and at most 1000. + * @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\Dialogflow\V2\SuggestConversationSummaryResponse + * + * @throws ApiException if the remote call fails + */ + public function suggestConversationSummary($conversation, array $optionalArgs = []) + { + $request = new SuggestConversationSummaryRequest(); + $requestParamHeaders = []; + $request->setConversation($conversation); + $requestParamHeaders['conversation'] = $conversation; + if (isset($optionalArgs['latestMessage'])) { + $request->setLatestMessage($optionalArgs['latestMessage']); + } + + if (isset($optionalArgs['contextSize'])) { + $request->setContextSize($optionalArgs['contextSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SuggestConversationSummary', SuggestConversationSummaryResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $conversationsClient = new ConversationsClient(); + * try { + * $response = $conversationsClient->getLocation(); + * } finally { + * $conversationsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $conversationsClient = new ConversationsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $conversationsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $conversationsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $conversationsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/DocumentsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/DocumentsGapicClient.php new file mode 100644 index 000000000000..a39ea08f65fa --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/DocumentsGapicClient.php @@ -0,0 +1,1266 @@ +knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + * $document = new Document(); + * $operationResponse = $documentsClient->createDocument($formattedParent, $document); + * $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 = $documentsClient->createDocument($formattedParent, $document); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'createDocument'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $documentsClient->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. + */ +class DocumentsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Documents'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $documentNameTemplate; + + private static $knowledgeBaseNameTemplate; + + private static $projectKnowledgeBaseNameTemplate; + + private static $projectKnowledgeBaseDocumentNameTemplate; + + private static $projectLocationKnowledgeBaseNameTemplate; + + private static $projectLocationKnowledgeBaseDocumentNameTemplate; + + 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/documents_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/documents_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/documents_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/documents_rest_client_config.php', + ], + ], + ]; + } + + private static function getDocumentNameTemplate() + { + if (self::$documentNameTemplate == null) { + self::$documentNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}'); + } + + return self::$documentNameTemplate; + } + + private static function getKnowledgeBaseNameTemplate() + { + if (self::$knowledgeBaseNameTemplate == null) { + self::$knowledgeBaseNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}'); + } + + return self::$knowledgeBaseNameTemplate; + } + + private static function getProjectKnowledgeBaseNameTemplate() + { + if (self::$projectKnowledgeBaseNameTemplate == null) { + self::$projectKnowledgeBaseNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}'); + } + + return self::$projectKnowledgeBaseNameTemplate; + } + + private static function getProjectKnowledgeBaseDocumentNameTemplate() + { + if (self::$projectKnowledgeBaseDocumentNameTemplate == null) { + self::$projectKnowledgeBaseDocumentNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}'); + } + + return self::$projectKnowledgeBaseDocumentNameTemplate; + } + + private static function getProjectLocationKnowledgeBaseNameTemplate() + { + if (self::$projectLocationKnowledgeBaseNameTemplate == null) { + self::$projectLocationKnowledgeBaseNameTemplate = new PathTemplate('projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}'); + } + + return self::$projectLocationKnowledgeBaseNameTemplate; + } + + private static function getProjectLocationKnowledgeBaseDocumentNameTemplate() + { + if (self::$projectLocationKnowledgeBaseDocumentNameTemplate == null) { + self::$projectLocationKnowledgeBaseDocumentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document}'); + } + + return self::$projectLocationKnowledgeBaseDocumentNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'document' => self::getDocumentNameTemplate(), + 'knowledgeBase' => self::getKnowledgeBaseNameTemplate(), + 'projectKnowledgeBase' => self::getProjectKnowledgeBaseNameTemplate(), + 'projectKnowledgeBaseDocument' => self::getProjectKnowledgeBaseDocumentNameTemplate(), + 'projectLocationKnowledgeBase' => self::getProjectLocationKnowledgeBaseNameTemplate(), + 'projectLocationKnowledgeBaseDocument' => self::getProjectLocationKnowledgeBaseDocumentNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a document + * resource. + * + * @param string $project + * @param string $knowledgeBase + * @param string $document + * + * @return string The formatted document resource. + */ + public static function documentName($project, $knowledgeBase, $document) + { + return self::getDocumentNameTemplate()->render([ + 'project' => $project, + 'knowledge_base' => $knowledgeBase, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * knowledge_base resource. + * + * @param string $project + * @param string $knowledgeBase + * + * @return string The formatted knowledge_base resource. + */ + public static function knowledgeBaseName($project, $knowledgeBase) + { + return self::getKnowledgeBaseNameTemplate()->render([ + 'project' => $project, + 'knowledge_base' => $knowledgeBase, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_knowledge_base resource. + * + * @param string $project + * @param string $knowledgeBase + * + * @return string The formatted project_knowledge_base resource. + */ + public static function projectKnowledgeBaseName($project, $knowledgeBase) + { + return self::getProjectKnowledgeBaseNameTemplate()->render([ + 'project' => $project, + 'knowledge_base' => $knowledgeBase, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_knowledge_base_document resource. + * + * @param string $project + * @param string $knowledgeBase + * @param string $document + * + * @return string The formatted project_knowledge_base_document resource. + */ + public static function projectKnowledgeBaseDocumentName($project, $knowledgeBase, $document) + { + return self::getProjectKnowledgeBaseDocumentNameTemplate()->render([ + 'project' => $project, + 'knowledge_base' => $knowledgeBase, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_knowledge_base resource. + * + * @param string $project + * @param string $location + * @param string $knowledgeBase + * + * @return string The formatted project_location_knowledge_base resource. + */ + public static function projectLocationKnowledgeBaseName($project, $location, $knowledgeBase) + { + return self::getProjectLocationKnowledgeBaseNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'knowledge_base' => $knowledgeBase, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_knowledge_base_document resource. + * + * @param string $project + * @param string $location + * @param string $knowledgeBase + * @param string $document + * + * @return string The formatted project_location_knowledge_base_document resource. + */ + public static function projectLocationKnowledgeBaseDocumentName($project, $location, $knowledgeBase, $document) + { + return self::getProjectLocationKnowledgeBaseDocumentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'knowledge_base' => $knowledgeBase, + 'document' => $document, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - document: projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} + * - knowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} + * - projectKnowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} + * - projectKnowledgeBaseDocument: projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} + * - projectLocationKnowledgeBase: projects/{project}/locations/{location}/knowledgeBases/{knowledge_base} + * - projectLocationKnowledgeBaseDocument: projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document} + * + * 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 'dialogflow.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); + } + + /** + * Creates a new document. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: [Document][google.cloud.dialogflow.v2.Document] + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * $formattedParent = $documentsClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + * $document = new Document(); + * $operationResponse = $documentsClient->createDocument($formattedParent, $document); + * $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 = $documentsClient->createDocument($formattedParent, $document); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'createDocument'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The knowledge base to create a document for. + * Format: `projects//locations//knowledgeBases/`. + * @param Document $document Required. The document 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 createDocument($parent, $document, array $optionalArgs = []) + { + $request = new CreateDocumentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDocument($document); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes the specified document. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * $formattedName = $documentsClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + * $operationResponse = $documentsClient->deleteDocument($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 = $documentsClient->deleteDocument($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'deleteDocument'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the document to delete. + * Format: `projects//locations//knowledgeBases//documents/`. + * @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 deleteDocument($name, array $optionalArgs = []) + { + $request = new DeleteDocumentRequest(); + $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('DeleteDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Exports a smart messaging candidate document into the specified + * destination. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: [Document][google.cloud.dialogflow.v2.Document] + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * $formattedName = $documentsClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + * $operationResponse = $documentsClient->exportDocument($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 = $documentsClient->exportDocument($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'exportDocument'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the document to export. + * Format: `projects//locations//knowledgeBases//documents/`. + * @param array $optionalArgs { + * Optional. + * + * @type GcsDestination $gcsDestination + * Cloud Storage file path to export the document. + * @type bool $exportFullContent + * When enabled, export the full content of the document including empirical + * probability. + * @type bool $smartMessagingPartialUpdate + * When enabled, export the smart messaging allowlist document for partial + * update. + * @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 exportDocument($name, array $optionalArgs = []) + { + $request = new ExportDocumentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['gcsDestination'])) { + $request->setGcsDestination($optionalArgs['gcsDestination']); + } + + if (isset($optionalArgs['exportFullContent'])) { + $request->setExportFullContent($optionalArgs['exportFullContent']); + } + + if (isset($optionalArgs['smartMessagingPartialUpdate'])) { + $request->setSmartMessagingPartialUpdate($optionalArgs['smartMessagingPartialUpdate']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ExportDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Retrieves the specified document. + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * $formattedName = $documentsClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + * $response = $documentsClient->getDocument($formattedName); + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the document to retrieve. + * Format `projects//locations//knowledgeBases//documents/`. + * @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\Dialogflow\V2\Document + * + * @throws ApiException if the remote call fails + */ + public function getDocument($name, array $optionalArgs = []) + { + $request = new GetDocumentRequest(); + $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('GetDocument', Document::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates documents by importing data from external sources. + * Dialogflow supports up to 350 documents in each request. If you try to + * import more, Dialogflow will return an error. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: + * [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse] + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * $formattedParent = $documentsClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + * $documentTemplate = new ImportDocumentTemplate(); + * $operationResponse = $documentsClient->importDocuments($formattedParent, $documentTemplate); + * $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 = $documentsClient->importDocuments($formattedParent, $documentTemplate); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'importDocuments'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The knowledge base to import documents into. + * Format: `projects//locations//knowledgeBases/`. + * @param ImportDocumentTemplate $documentTemplate Required. Document template used for importing all the documents. + * @param array $optionalArgs { + * Optional. + * + * @type GcsSources $gcsSource + * The Google Cloud Storage location for the documents. + * The path can include a wildcard. + * + * These URIs may have the forms + * `gs:///`. + * `gs:////*.`. + * @type bool $importGcsCustomMetadata + * Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * @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 importDocuments($parent, $documentTemplate, array $optionalArgs = []) + { + $request = new ImportDocumentsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDocumentTemplate($documentTemplate); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['gcsSource'])) { + $request->setGcsSource($optionalArgs['gcsSource']); + } + + if (isset($optionalArgs['importGcsCustomMetadata'])) { + $request->setImportGcsCustomMetadata($optionalArgs['importGcsCustomMetadata']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ImportDocuments', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Returns the list of all documents of the knowledge base. + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * $formattedParent = $documentsClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + * // Iterate over pages of elements + * $pagedResponse = $documentsClient->listDocuments($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $documentsClient->listDocuments($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The knowledge base to list all documents for. + * Format: `projects//locations//knowledgeBases/`. + * @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 + * The filter expression used to filter documents returned by the list method. + * The expression has the following syntax: + * + * [AND ] ... + * + * The following fields and operators are supported: + * + * * knowledge_types with has(:) operator + * * display_name with has(:) operator + * * state with equals(=) operator + * + * Examples: + * + * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. + * * "display_name:customer" matches documents whose display name contains + * "customer". + * * "state=ACTIVE" matches documents with ACTIVE state. + * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. + * + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * @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 listDocuments($parent, array $optionalArgs = []) + { + $request = new ListDocumentsRequest(); + $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('ListDocuments', $optionalArgs, ListDocumentsResponse::class, $request); + } + + /** + * Reloads the specified document from its specified source, content_uri or + * content. The previously loaded content of the document will be deleted. + * Note: Even when the content of the document has not changed, there still + * may be side effects because of internal implementation changes. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: [Document][google.cloud.dialogflow.v2.Document] + * + * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + * only use `projects.knowledgeBases.documents`. + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * $formattedName = $documentsClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + * $operationResponse = $documentsClient->reloadDocument($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 = $documentsClient->reloadDocument($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'reloadDocument'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the document to reload. + * Format: `projects//locations//knowledgeBases//documents/` + * @param array $optionalArgs { + * Optional. + * + * @type string $contentUri + * Optional. The path of gcs source file for reloading document content. For + * now, only gcs uri is supported. + * + * For documents stored in Google Cloud Storage, these URIs must have + * the form `gs:///`. + * @type bool $importGcsCustomMetadata + * Optional. Whether to import custom metadata from Google Cloud Storage. + * Only valid when the document source is Google Cloud Storage URI. + * @type bool $smartMessagingPartialUpdate + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. + * @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 reloadDocument($name, array $optionalArgs = []) + { + $request = new ReloadDocumentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['contentUri'])) { + $request->setContentUri($optionalArgs['contentUri']); + } + + if (isset($optionalArgs['importGcsCustomMetadata'])) { + $request->setImportGcsCustomMetadata($optionalArgs['importGcsCustomMetadata']); + } + + if (isset($optionalArgs['smartMessagingPartialUpdate'])) { + $request->setSmartMessagingPartialUpdate($optionalArgs['smartMessagingPartialUpdate']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ReloadDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the specified document. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: [Document][google.cloud.dialogflow.v2.Document] + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * $document = new Document(); + * $operationResponse = $documentsClient->updateDocument($document); + * $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 = $documentsClient->updateDocument($document); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'updateDocument'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param Document $document Required. The document to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * @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 updateDocument($document, array $optionalArgs = []) + { + $request = new UpdateDocumentRequest(); + $requestParamHeaders = []; + $request->setDocument($document); + $requestParamHeaders['document.name'] = $document->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->startOperationsCall('UpdateDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * $response = $documentsClient->getLocation(); + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $documentsClient = new DocumentsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $documentsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $documentsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $documentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EntityTypesGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EntityTypesGapicClient.php new file mode 100644 index 000000000000..9fc6709af2ed --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EntityTypesGapicClient.php @@ -0,0 +1,1343 @@ +entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + * $entities = []; + * $operationResponse = $entityTypesClient->batchCreateEntities($formattedParent, $entities); + * $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 = $entityTypesClient->batchCreateEntities($formattedParent, $entities); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchCreateEntities'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $entityTypesClient->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. + */ +class EntityTypesGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.EntityTypes'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $agentNameTemplate; + + private static $entityTypeNameTemplate; + + private static $projectAgentNameTemplate; + + private static $projectEntityTypeNameTemplate; + + private static $projectLocationAgentNameTemplate; + + private static $projectLocationEntityTypeNameTemplate; + + 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/entity_types_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/entity_types_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/entity_types_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/entity_types_rest_client_config.php', + ], + ], + ]; + } + + private static function getAgentNameTemplate() + { + if (self::$agentNameTemplate == null) { + self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$agentNameTemplate; + } + + private static function getEntityTypeNameTemplate() + { + if (self::$entityTypeNameTemplate == null) { + self::$entityTypeNameTemplate = new PathTemplate('projects/{project}/agent/entityTypes/{entity_type}'); + } + + return self::$entityTypeNameTemplate; + } + + private static function getProjectAgentNameTemplate() + { + if (self::$projectAgentNameTemplate == null) { + self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$projectAgentNameTemplate; + } + + private static function getProjectEntityTypeNameTemplate() + { + if (self::$projectEntityTypeNameTemplate == null) { + self::$projectEntityTypeNameTemplate = new PathTemplate('projects/{project}/agent/entityTypes/{entity_type}'); + } + + return self::$projectEntityTypeNameTemplate; + } + + private static function getProjectLocationAgentNameTemplate() + { + if (self::$projectLocationAgentNameTemplate == null) { + self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); + } + + return self::$projectLocationAgentNameTemplate; + } + + private static function getProjectLocationEntityTypeNameTemplate() + { + if (self::$projectLocationEntityTypeNameTemplate == null) { + self::$projectLocationEntityTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/entityTypes/{entity_type}'); + } + + return self::$projectLocationEntityTypeNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'agent' => self::getAgentNameTemplate(), + 'entityType' => self::getEntityTypeNameTemplate(), + 'projectAgent' => self::getProjectAgentNameTemplate(), + 'projectEntityType' => self::getProjectEntityTypeNameTemplate(), + 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), + 'projectLocationEntityType' => self::getProjectLocationEntityTypeNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * + * @return string The formatted agent resource. + */ + public static function agentName($project) + { + return self::getAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a entity_type + * resource. + * + * @param string $project + * @param string $entityType + * + * @return string The formatted entity_type resource. + */ + public static function entityTypeName($project, $entityType) + { + return self::getEntityTypeNameTemplate()->render([ + 'project' => $project, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_agent resource. + * + * @param string $project + * + * @return string The formatted project_agent resource. + */ + public static function projectAgentName($project) + { + return self::getProjectAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_entity_type resource. + * + * @param string $project + * @param string $entityType + * + * @return string The formatted project_entity_type resource. + */ + public static function projectEntityTypeName($project, $entityType) + { + return self::getProjectEntityTypeNameTemplate()->render([ + 'project' => $project, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted project_location_agent resource. + */ + public static function projectLocationAgentName($project, $location) + { + return self::getProjectLocationAgentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_entity_type resource. + * + * @param string $project + * @param string $location + * @param string $entityType + * + * @return string The formatted project_location_entity_type resource. + */ + public static function projectLocationEntityTypeName($project, $location, $entityType) + { + return self::getProjectLocationEntityTypeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'entity_type' => $entityType, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - agent: projects/{project}/agent + * - entityType: projects/{project}/agent/entityTypes/{entity_type} + * - projectAgent: projects/{project}/agent + * - projectEntityType: projects/{project}/agent/entityTypes/{entity_type} + * - projectLocationAgent: projects/{project}/locations/{location}/agent + * - projectLocationEntityType: projects/{project}/locations/{location}/agent/entityTypes/{entity_type} + * + * 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 'dialogflow.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); + } + + /** + * Creates multiple new entities in the specified entity type. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $formattedParent = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + * $entities = []; + * $operationResponse = $entityTypesClient->batchCreateEntities($formattedParent, $entities); + * $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 = $entityTypesClient->batchCreateEntities($formattedParent, $entities); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchCreateEntities'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the entity type to create entities in. Format: + * `projects//agent/entityTypes/`. + * @param Entity[] $entities Required. The entities to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @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 batchCreateEntities($parent, $entities, array $optionalArgs = []) + { + $request = new BatchCreateEntitiesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEntities($entities); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BatchCreateEntities', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes entities in the specified entity type. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $formattedParent = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + * $entityValues = []; + * $operationResponse = $entityTypesClient->batchDeleteEntities($formattedParent, $entityValues); + * $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 = $entityTypesClient->batchDeleteEntities($formattedParent, $entityValues); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchDeleteEntities'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the entity type to delete entries for. Format: + * `projects//agent/entityTypes/`. + * @param string[] $entityValues Required. The reference `values` of the entities to delete. Note that + * these are not fully-qualified names, i.e. they don't start with + * `projects/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @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 batchDeleteEntities($parent, $entityValues, array $optionalArgs = []) + { + $request = new BatchDeleteEntitiesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEntityValues($entityValues); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BatchDeleteEntities', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes entity types in the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $formattedParent = $entityTypesClient->agentName('[PROJECT]'); + * $entityTypeNames = []; + * $operationResponse = $entityTypesClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); + * $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 = $entityTypesClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchDeleteEntityTypes'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the agent to delete all entities types for. Format: + * `projects//agent`. + * @param string[] $entityTypeNames Required. The names entity types to delete. All names must point to the + * same agent as `parent`. + * @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 batchDeleteEntityTypes($parent, $entityTypeNames, array $optionalArgs = []) + { + $request = new BatchDeleteEntityTypesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEntityTypeNames($entityTypeNames); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BatchDeleteEntityTypes', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates or creates multiple entities in the specified entity type. This + * method does not affect entities in the entity type that aren't explicitly + * specified in the request. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $formattedParent = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + * $entities = []; + * $operationResponse = $entityTypesClient->batchUpdateEntities($formattedParent, $entities); + * $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 = $entityTypesClient->batchUpdateEntities($formattedParent, $entities); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchUpdateEntities'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the entity type to update or create entities in. + * Format: `projects//agent/entityTypes/`. + * @param Entity[] $entities Required. The entities to update or create. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type FieldMask $updateMask + * Optional. The mask to control which fields get 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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function batchUpdateEntities($parent, $entities, array $optionalArgs = []) + { + $request = new BatchUpdateEntitiesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEntities($entities); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + 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->startOperationsCall('BatchUpdateEntities', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates/Creates multiple entity types in the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: + * [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse] + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $formattedParent = $entityTypesClient->agentName('[PROJECT]'); + * $operationResponse = $entityTypesClient->batchUpdateEntityTypes($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 = $entityTypesClient->batchUpdateEntityTypes($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchUpdateEntityTypes'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the agent to update or create entity types in. + * Format: `projects//agent`. + * @param array $optionalArgs { + * Optional. + * + * @type string $entityTypeBatchUri + * The URI to a Google Cloud Storage file containing entity types to update + * or create. The file format can either be a serialized proto (of + * EntityBatch type) or a JSON object. Note: The URI must start with + * "gs://". + * @type EntityTypeBatch $entityTypeBatchInline + * The collection of entity types to update or create. + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type FieldMask $updateMask + * Optional. The mask to control which fields get 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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function batchUpdateEntityTypes($parent, array $optionalArgs = []) + { + $request = new BatchUpdateEntityTypesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['entityTypeBatchUri'])) { + $request->setEntityTypeBatchUri($optionalArgs['entityTypeBatchUri']); + } + + if (isset($optionalArgs['entityTypeBatchInline'])) { + $request->setEntityTypeBatchInline($optionalArgs['entityTypeBatchInline']); + } + + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + 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->startOperationsCall('BatchUpdateEntityTypes', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates an entity type in the specified agent. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $formattedParent = $entityTypesClient->agentName('[PROJECT]'); + * $entityType = new EntityType(); + * $response = $entityTypesClient->createEntityType($formattedParent, $entityType); + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param string $parent Required. The agent to create a entity type for. + * Format: `projects//agent`. + * @param EntityType $entityType Required. The entity type to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @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\Dialogflow\V2\EntityType + * + * @throws ApiException if the remote call fails + */ + public function createEntityType($parent, $entityType, array $optionalArgs = []) + { + $request = new CreateEntityTypeRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEntityType($entityType); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateEntityType', EntityType::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified entity type. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $formattedName = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + * $entityTypesClient->deleteEntityType($formattedName); + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the entity type to delete. + * Format: `projects//agent/entityTypes/`. + * @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 deleteEntityType($name, array $optionalArgs = []) + { + $request = new DeleteEntityTypeRequest(); + $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('DeleteEntityType', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the specified entity type. + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $formattedName = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + * $response = $entityTypesClient->getEntityType($formattedName); + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the entity type. + * Format: `projects//agent/entityTypes/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @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\Dialogflow\V2\EntityType + * + * @throws ApiException if the remote call fails + */ + public function getEntityType($name, array $optionalArgs = []) + { + $request = new GetEntityTypeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetEntityType', EntityType::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all entity types in the specified agent. + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $formattedParent = $entityTypesClient->agentName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $entityTypesClient->listEntityTypes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $entityTypesClient->listEntityTypes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param string $parent Required. The agent to list all entity types from. + * Format: `projects//agent`. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @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 listEntityTypes($parent, array $optionalArgs = []) + { + $request = new ListEntityTypesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + 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('ListEntityTypes', $optionalArgs, ListEntityTypesResponse::class, $request); + } + + /** + * Updates the specified entity type. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $entityType = new EntityType(); + * $response = $entityTypesClient->updateEntityType($entityType); + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param EntityType $entityType Required. The entity type to update. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type FieldMask $updateMask + * Optional. The mask to control which fields get 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\Dialogflow\V2\EntityType + * + * @throws ApiException if the remote call fails + */ + public function updateEntityType($entityType, array $optionalArgs = []) + { + $request = new UpdateEntityTypeRequest(); + $requestParamHeaders = []; + $request->setEntityType($entityType); + $requestParamHeaders['entity_type.name'] = $entityType->getName(); + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + 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('UpdateEntityType', EntityType::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * $response = $entityTypesClient->getLocation(); + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $entityTypesClient = new EntityTypesClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $entityTypesClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $entityTypesClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $entityTypesClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EnvironmentsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EnvironmentsGapicClient.php new file mode 100644 index 000000000000..08d454a23387 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EnvironmentsGapicClient.php @@ -0,0 +1,965 @@ +agentName('[PROJECT]'); + * $environment = new Environment(); + * $environmentId = 'environment_id'; + * $response = $environmentsClient->createEnvironment($formattedParent, $environment, $environmentId); + * } finally { + * $environmentsClient->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. + */ +class EnvironmentsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Environments'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $agentNameTemplate; + + private static $environmentNameTemplate; + + private static $projectAgentNameTemplate; + + private static $projectEnvironmentNameTemplate; + + private static $projectLocationAgentNameTemplate; + + private static $projectLocationEnvironmentNameTemplate; + + private static $projectLocationVersionNameTemplate; + + private static $projectVersionNameTemplate; + + private static $versionNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/environments_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/environments_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/environments_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/environments_rest_client_config.php', + ], + ], + ]; + } + + private static function getAgentNameTemplate() + { + if (self::$agentNameTemplate == null) { + self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$agentNameTemplate; + } + + private static function getEnvironmentNameTemplate() + { + if (self::$environmentNameTemplate == null) { + self::$environmentNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}'); + } + + return self::$environmentNameTemplate; + } + + private static function getProjectAgentNameTemplate() + { + if (self::$projectAgentNameTemplate == null) { + self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$projectAgentNameTemplate; + } + + private static function getProjectEnvironmentNameTemplate() + { + if (self::$projectEnvironmentNameTemplate == null) { + self::$projectEnvironmentNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}'); + } + + return self::$projectEnvironmentNameTemplate; + } + + private static function getProjectLocationAgentNameTemplate() + { + if (self::$projectLocationAgentNameTemplate == null) { + self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); + } + + return self::$projectLocationAgentNameTemplate; + } + + private static function getProjectLocationEnvironmentNameTemplate() + { + if (self::$projectLocationEnvironmentNameTemplate == null) { + self::$projectLocationEnvironmentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}'); + } + + return self::$projectLocationEnvironmentNameTemplate; + } + + private static function getProjectLocationVersionNameTemplate() + { + if (self::$projectLocationVersionNameTemplate == null) { + self::$projectLocationVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/versions/{version}'); + } + + return self::$projectLocationVersionNameTemplate; + } + + private static function getProjectVersionNameTemplate() + { + if (self::$projectVersionNameTemplate == null) { + self::$projectVersionNameTemplate = new PathTemplate('projects/{project}/agent/versions/{version}'); + } + + return self::$projectVersionNameTemplate; + } + + private static function getVersionNameTemplate() + { + if (self::$versionNameTemplate == null) { + self::$versionNameTemplate = new PathTemplate('projects/{project}/agent/versions/{version}'); + } + + return self::$versionNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'agent' => self::getAgentNameTemplate(), + 'environment' => self::getEnvironmentNameTemplate(), + 'projectAgent' => self::getProjectAgentNameTemplate(), + 'projectEnvironment' => self::getProjectEnvironmentNameTemplate(), + 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), + 'projectLocationEnvironment' => self::getProjectLocationEnvironmentNameTemplate(), + 'projectLocationVersion' => self::getProjectLocationVersionNameTemplate(), + 'projectVersion' => self::getProjectVersionNameTemplate(), + 'version' => self::getVersionNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * + * @return string The formatted agent resource. + */ + public static function agentName($project) + { + return self::getAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName($project, $environment) + { + return self::getEnvironmentNameTemplate()->render([ + 'project' => $project, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_agent resource. + * + * @param string $project + * + * @return string The formatted project_agent resource. + */ + public static function projectAgentName($project) + { + return self::getProjectAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_environment resource. + * + * @param string $project + * @param string $environment + * + * @return string The formatted project_environment resource. + */ + public static function projectEnvironmentName($project, $environment) + { + return self::getProjectEnvironmentNameTemplate()->render([ + 'project' => $project, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted project_location_agent resource. + */ + public static function projectLocationAgentName($project, $location) + { + return self::getProjectLocationAgentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_environment resource. + * + * @param string $project + * @param string $location + * @param string $environment + * + * @return string The formatted project_location_environment resource. + */ + public static function projectLocationEnvironmentName($project, $location, $environment) + { + return self::getProjectLocationEnvironmentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_version resource. + * + * @param string $project + * @param string $location + * @param string $version + * + * @return string The formatted project_location_version resource. + */ + public static function projectLocationVersionName($project, $location, $version) + { + return self::getProjectLocationVersionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_version resource. + * + * @param string $project + * @param string $version + * + * @return string The formatted project_version resource. + */ + public static function projectVersionName($project, $version) + { + return self::getProjectVersionNameTemplate()->render([ + 'project' => $project, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a version + * resource. + * + * @param string $project + * @param string $version + * + * @return string The formatted version resource. + */ + public static function versionName($project, $version) + { + return self::getVersionNameTemplate()->render([ + 'project' => $project, + 'version' => $version, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - agent: projects/{project}/agent + * - environment: projects/{project}/agent/environments/{environment} + * - projectAgent: projects/{project}/agent + * - projectEnvironment: projects/{project}/agent/environments/{environment} + * - projectLocationAgent: projects/{project}/locations/{location}/agent + * - projectLocationEnvironment: projects/{project}/locations/{location}/agent/environments/{environment} + * - projectLocationVersion: projects/{project}/locations/{location}/agent/versions/{version} + * - projectVersion: projects/{project}/agent/versions/{version} + * - version: projects/{project}/agent/versions/{version} + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Creates an agent environment. + * + * Sample code: + * ``` + * $environmentsClient = new EnvironmentsClient(); + * try { + * $formattedParent = $environmentsClient->agentName('[PROJECT]'); + * $environment = new Environment(); + * $environmentId = 'environment_id'; + * $response = $environmentsClient->createEnvironment($formattedParent, $environment, $environmentId); + * } finally { + * $environmentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The agent to create an environment for. + * Supported formats: + * + * - `projects//agent` + * - `projects//locations//agent` + * @param Environment $environment Required. The environment to create. + * @param string $environmentId Required. The unique id of the new environment. + * @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\Dialogflow\V2\Environment + * + * @throws ApiException if the remote call fails + */ + public function createEnvironment($parent, $environment, $environmentId, array $optionalArgs = []) + { + $request = new CreateEnvironmentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEnvironment($environment); + $request->setEnvironmentId($environmentId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateEnvironment', Environment::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified agent environment. + * + * Sample code: + * ``` + * $environmentsClient = new EnvironmentsClient(); + * try { + * $formattedName = $environmentsClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); + * $environmentsClient->deleteEnvironment($formattedName); + * } finally { + * $environmentsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the environment to delete. + * / Format: + * + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * + * The environment ID for the default environment is `-`. + * @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 deleteEnvironment($name, array $optionalArgs = []) + { + $request = new DeleteEnvironmentRequest(); + $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('DeleteEnvironment', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the specified agent environment. + * + * Sample code: + * ``` + * $environmentsClient = new EnvironmentsClient(); + * try { + * $formattedName = $environmentsClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); + * $response = $environmentsClient->getEnvironment($formattedName); + * } finally { + * $environmentsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the environment. + * Supported formats: + * + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * + * The environment ID for the default environment is `-`. + * @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\Dialogflow\V2\Environment + * + * @throws ApiException if the remote call fails + */ + public function getEnvironment($name, array $optionalArgs = []) + { + $request = new GetEnvironmentRequest(); + $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('GetEnvironment', Environment::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the history of the specified environment. + * + * Sample code: + * ``` + * $environmentsClient = new EnvironmentsClient(); + * try { + * $formattedParent = $environmentsClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); + * // Iterate over pages of elements + * $pagedResponse = $environmentsClient->getEnvironmentHistory($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $environmentsClient->getEnvironmentHistory($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $environmentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the environment to retrieve history for. + * Supported formats: + * + * - `projects//agent/environments/` + * - `projects//locations//agent/environments/` + * + * The environment ID for the default environment is `-`. + * @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 getEnvironmentHistory($parent, array $optionalArgs = []) + { + $request = new GetEnvironmentHistoryRequest(); + $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('GetEnvironmentHistory', $optionalArgs, EnvironmentHistory::class, $request); + } + + /** + * Returns the list of all non-default environments of the specified agent. + * + * Sample code: + * ``` + * $environmentsClient = new EnvironmentsClient(); + * try { + * $formattedParent = $environmentsClient->agentName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $environmentsClient->listEnvironments($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $environmentsClient->listEnvironments($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $environmentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The agent to list all environments from. + * Format: + * + * - `projects//agent` + * - `projects//locations//agent` + * @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 listEnvironments($parent, array $optionalArgs = []) + { + $request = new ListEnvironmentsRequest(); + $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('ListEnvironments', $optionalArgs, ListEnvironmentsResponse::class, $request); + } + + /** + * Updates the specified agent environment. + * + * This method allows you to deploy new agent versions into the environment. + * When an environment is pointed to a new agent version by setting + * `environment.agent_version`, the environment is temporarily set to the + * `LOADING` state. During that time, the environment continues serving the + * previous version of the agent. After the new agent version is done loading, + * the environment is set back to the `RUNNING` state. + * You can use "-" as Environment ID in environment name to update an agent + * version in the default environment. WARNING: this will negate all recent + * changes to the draft agent and can't be undone. You may want to save the + * draft agent to a version before calling this method. + * + * Sample code: + * ``` + * $environmentsClient = new EnvironmentsClient(); + * try { + * $environment = new Environment(); + * $updateMask = new FieldMask(); + * $response = $environmentsClient->updateEnvironment($environment, $updateMask); + * } finally { + * $environmentsClient->close(); + * } + * ``` + * + * @param Environment $environment Required. The environment to update. + * @param FieldMask $updateMask Required. The mask to control which fields get updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $allowLoadToDraftAndDiscardChanges + * Optional. This field is used to prevent accidental overwrite of the default + * environment, which is an operation that cannot be undone. To confirm that + * the caller desires this overwrite, this field must be explicitly set to + * true when updating the default environment (environment ID = `-`). + * @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\Dialogflow\V2\Environment + * + * @throws ApiException if the remote call fails + */ + public function updateEnvironment($environment, $updateMask, array $optionalArgs = []) + { + $request = new UpdateEnvironmentRequest(); + $requestParamHeaders = []; + $request->setEnvironment($environment); + $request->setUpdateMask($updateMask); + $requestParamHeaders['environment.name'] = $environment->getName(); + if (isset($optionalArgs['allowLoadToDraftAndDiscardChanges'])) { + $request->setAllowLoadToDraftAndDiscardChanges($optionalArgs['allowLoadToDraftAndDiscardChanges']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateEnvironment', Environment::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $environmentsClient = new EnvironmentsClient(); + * try { + * $response = $environmentsClient->getLocation(); + * } finally { + * $environmentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $environmentsClient = new EnvironmentsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $environmentsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $environmentsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $environmentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/FulfillmentsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/FulfillmentsGapicClient.php new file mode 100644 index 000000000000..b052d43c9c09 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/FulfillmentsGapicClient.php @@ -0,0 +1,507 @@ +fulfillmentName('[PROJECT]'); + * $response = $fulfillmentsClient->getFulfillment($formattedName); + * } finally { + * $fulfillmentsClient->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. + */ +class FulfillmentsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Fulfillments'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $fulfillmentNameTemplate; + + private static $projectFulfillmentNameTemplate; + + private static $projectLocationFulfillmentNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/fulfillments_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/fulfillments_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/fulfillments_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/fulfillments_rest_client_config.php', + ], + ], + ]; + } + + private static function getFulfillmentNameTemplate() + { + if (self::$fulfillmentNameTemplate == null) { + self::$fulfillmentNameTemplate = new PathTemplate('projects/{project}/agent/fulfillment'); + } + + return self::$fulfillmentNameTemplate; + } + + private static function getProjectFulfillmentNameTemplate() + { + if (self::$projectFulfillmentNameTemplate == null) { + self::$projectFulfillmentNameTemplate = new PathTemplate('projects/{project}/agent/fulfillment'); + } + + return self::$projectFulfillmentNameTemplate; + } + + private static function getProjectLocationFulfillmentNameTemplate() + { + if (self::$projectLocationFulfillmentNameTemplate == null) { + self::$projectLocationFulfillmentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/fulfillment'); + } + + return self::$projectLocationFulfillmentNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'fulfillment' => self::getFulfillmentNameTemplate(), + 'projectFulfillment' => self::getProjectFulfillmentNameTemplate(), + 'projectLocationFulfillment' => self::getProjectLocationFulfillmentNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a fulfillment + * resource. + * + * @param string $project + * + * @return string The formatted fulfillment resource. + */ + public static function fulfillmentName($project) + { + return self::getFulfillmentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_fulfillment resource. + * + * @param string $project + * + * @return string The formatted project_fulfillment resource. + */ + public static function projectFulfillmentName($project) + { + return self::getProjectFulfillmentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_fulfillment resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted project_location_fulfillment resource. + */ + public static function projectLocationFulfillmentName($project, $location) + { + return self::getProjectLocationFulfillmentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - fulfillment: projects/{project}/agent/fulfillment + * - projectFulfillment: projects/{project}/agent/fulfillment + * - projectLocationFulfillment: projects/{project}/locations/{location}/agent/fulfillment + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Retrieves the fulfillment. + * + * Sample code: + * ``` + * $fulfillmentsClient = new FulfillmentsClient(); + * try { + * $formattedName = $fulfillmentsClient->fulfillmentName('[PROJECT]'); + * $response = $fulfillmentsClient->getFulfillment($formattedName); + * } finally { + * $fulfillmentsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the fulfillment. + * Format: `projects//agent/fulfillment`. + * @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\Dialogflow\V2\Fulfillment + * + * @throws ApiException if the remote call fails + */ + public function getFulfillment($name, array $optionalArgs = []) + { + $request = new GetFulfillmentRequest(); + $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('GetFulfillment', Fulfillment::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates the fulfillment. + * + * Sample code: + * ``` + * $fulfillmentsClient = new FulfillmentsClient(); + * try { + * $fulfillment = new Fulfillment(); + * $updateMask = new FieldMask(); + * $response = $fulfillmentsClient->updateFulfillment($fulfillment, $updateMask); + * } finally { + * $fulfillmentsClient->close(); + * } + * ``` + * + * @param Fulfillment $fulfillment Required. The fulfillment to update. + * @param FieldMask $updateMask Required. The mask to control which fields get updated. If the mask is not + * present, all fields will 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\Dialogflow\V2\Fulfillment + * + * @throws ApiException if the remote call fails + */ + public function updateFulfillment($fulfillment, $updateMask, array $optionalArgs = []) + { + $request = new UpdateFulfillmentRequest(); + $requestParamHeaders = []; + $request->setFulfillment($fulfillment); + $request->setUpdateMask($updateMask); + $requestParamHeaders['fulfillment.name'] = $fulfillment->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateFulfillment', Fulfillment::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $fulfillmentsClient = new FulfillmentsClient(); + * try { + * $response = $fulfillmentsClient->getLocation(); + * } finally { + * $fulfillmentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $fulfillmentsClient = new FulfillmentsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $fulfillmentsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $fulfillmentsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $fulfillmentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/IntentsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/IntentsGapicClient.php new file mode 100644 index 000000000000..2c0565ad9329 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/IntentsGapicClient.php @@ -0,0 +1,1104 @@ +agentName('[PROJECT]'); + * $intents = []; + * $operationResponse = $intentsClient->batchDeleteIntents($formattedParent, $intents); + * $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 = $intentsClient->batchDeleteIntents($formattedParent, $intents); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $intentsClient->resumeOperation($operationName, 'batchDeleteIntents'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $intentsClient->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. + */ +class IntentsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Intents'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $agentNameTemplate; + + private static $intentNameTemplate; + + private static $projectAgentNameTemplate; + + private static $projectIntentNameTemplate; + + private static $projectLocationAgentNameTemplate; + + private static $projectLocationIntentNameTemplate; + + 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/intents_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/intents_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/intents_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/intents_rest_client_config.php', + ], + ], + ]; + } + + private static function getAgentNameTemplate() + { + if (self::$agentNameTemplate == null) { + self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$agentNameTemplate; + } + + private static function getIntentNameTemplate() + { + if (self::$intentNameTemplate == null) { + self::$intentNameTemplate = new PathTemplate('projects/{project}/agent/intents/{intent}'); + } + + return self::$intentNameTemplate; + } + + private static function getProjectAgentNameTemplate() + { + if (self::$projectAgentNameTemplate == null) { + self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$projectAgentNameTemplate; + } + + private static function getProjectIntentNameTemplate() + { + if (self::$projectIntentNameTemplate == null) { + self::$projectIntentNameTemplate = new PathTemplate('projects/{project}/agent/intents/{intent}'); + } + + return self::$projectIntentNameTemplate; + } + + private static function getProjectLocationAgentNameTemplate() + { + if (self::$projectLocationAgentNameTemplate == null) { + self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); + } + + return self::$projectLocationAgentNameTemplate; + } + + private static function getProjectLocationIntentNameTemplate() + { + if (self::$projectLocationIntentNameTemplate == null) { + self::$projectLocationIntentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/intents/{intent}'); + } + + return self::$projectLocationIntentNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'agent' => self::getAgentNameTemplate(), + 'intent' => self::getIntentNameTemplate(), + 'projectAgent' => self::getProjectAgentNameTemplate(), + 'projectIntent' => self::getProjectIntentNameTemplate(), + 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), + 'projectLocationIntent' => self::getProjectLocationIntentNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * + * @return string The formatted agent resource. + */ + public static function agentName($project) + { + return self::getAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a intent + * resource. + * + * @param string $project + * @param string $intent + * + * @return string The formatted intent resource. + */ + public static function intentName($project, $intent) + { + return self::getIntentNameTemplate()->render([ + 'project' => $project, + 'intent' => $intent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_agent resource. + * + * @param string $project + * + * @return string The formatted project_agent resource. + */ + public static function projectAgentName($project) + { + return self::getProjectAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_intent resource. + * + * @param string $project + * @param string $intent + * + * @return string The formatted project_intent resource. + */ + public static function projectIntentName($project, $intent) + { + return self::getProjectIntentNameTemplate()->render([ + 'project' => $project, + 'intent' => $intent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted project_location_agent resource. + */ + public static function projectLocationAgentName($project, $location) + { + return self::getProjectLocationAgentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_intent resource. + * + * @param string $project + * @param string $location + * @param string $intent + * + * @return string The formatted project_location_intent resource. + */ + public static function projectLocationIntentName($project, $location, $intent) + { + return self::getProjectLocationIntentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'intent' => $intent, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - agent: projects/{project}/agent + * - intent: projects/{project}/agent/intents/{intent} + * - projectAgent: projects/{project}/agent + * - projectIntent: projects/{project}/agent/intents/{intent} + * - projectLocationAgent: projects/{project}/locations/{location}/agent + * - projectLocationIntent: projects/{project}/locations/{location}/agent/intents/{intent} + * + * 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 'dialogflow.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); + } + + /** + * Deletes intents in the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $intentsClient = new IntentsClient(); + * try { + * $formattedParent = $intentsClient->agentName('[PROJECT]'); + * $intents = []; + * $operationResponse = $intentsClient->batchDeleteIntents($formattedParent, $intents); + * $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 = $intentsClient->batchDeleteIntents($formattedParent, $intents); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $intentsClient->resumeOperation($operationName, 'batchDeleteIntents'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $intentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the agent to delete all entities types for. Format: + * `projects//agent`. + * @param Intent[] $intents Required. The collection of intents to delete. Only intent `name` must be + * filled in. + * @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 batchDeleteIntents($parent, $intents, array $optionalArgs = []) + { + $request = new BatchDeleteIntentsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setIntents($intents); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BatchDeleteIntents', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates/Creates multiple intents in the specified agent. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: + * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse] + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $intentsClient = new IntentsClient(); + * try { + * $formattedParent = $intentsClient->agentName('[PROJECT]'); + * $operationResponse = $intentsClient->batchUpdateIntents($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 = $intentsClient->batchUpdateIntents($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $intentsClient->resumeOperation($operationName, 'batchUpdateIntents'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $intentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the agent to update or create intents in. + * Format: `projects//agent`. + * @param array $optionalArgs { + * Optional. + * + * @type string $intentBatchUri + * The URI to a Google Cloud Storage file containing intents to update or + * create. The file format can either be a serialized proto (of IntentBatch + * type) or JSON object. Note: The URI must start with "gs://". + * @type IntentBatch $intentBatchInline + * The collection of intents to update or create. + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type FieldMask $updateMask + * Optional. The mask to control which fields get updated. + * @type int $intentView + * Optional. The resource view to apply to the returned intent. + * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} + * @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 batchUpdateIntents($parent, array $optionalArgs = []) + { + $request = new BatchUpdateIntentsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['intentBatchUri'])) { + $request->setIntentBatchUri($optionalArgs['intentBatchUri']); + } + + if (isset($optionalArgs['intentBatchInline'])) { + $request->setIntentBatchInline($optionalArgs['intentBatchInline']); + } + + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['intentView'])) { + $request->setIntentView($optionalArgs['intentView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BatchUpdateIntents', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates an intent in the specified agent. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $intentsClient = new IntentsClient(); + * try { + * $formattedParent = $intentsClient->agentName('[PROJECT]'); + * $intent = new Intent(); + * $response = $intentsClient->createIntent($formattedParent, $intent); + * } finally { + * $intentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The agent to create a intent for. + * Format: `projects//agent`. + * @param Intent $intent Required. The intent to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type int $intentView + * Optional. The resource view to apply to the returned intent. + * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} + * @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\Dialogflow\V2\Intent + * + * @throws ApiException if the remote call fails + */ + public function createIntent($parent, $intent, array $optionalArgs = []) + { + $request = new CreateIntentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setIntent($intent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + if (isset($optionalArgs['intentView'])) { + $request->setIntentView($optionalArgs['intentView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateIntent', Intent::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified intent and its direct or indirect followup intents. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $intentsClient = new IntentsClient(); + * try { + * $formattedName = $intentsClient->intentName('[PROJECT]', '[INTENT]'); + * $intentsClient->deleteIntent($formattedName); + * } finally { + * $intentsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the intent to delete. If this intent has direct or + * indirect followup intents, we also delete them. + * Format: `projects//agent/intents/`. + * @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 deleteIntent($name, array $optionalArgs = []) + { + $request = new DeleteIntentRequest(); + $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('DeleteIntent', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the specified intent. + * + * Sample code: + * ``` + * $intentsClient = new IntentsClient(); + * try { + * $formattedName = $intentsClient->intentName('[PROJECT]', '[INTENT]'); + * $response = $intentsClient->getIntent($formattedName); + * } finally { + * $intentsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the intent. + * Format: `projects//agent/intents/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type int $intentView + * Optional. The resource view to apply to the returned intent. + * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} + * @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\Dialogflow\V2\Intent + * + * @throws ApiException if the remote call fails + */ + public function getIntent($name, array $optionalArgs = []) + { + $request = new GetIntentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + if (isset($optionalArgs['intentView'])) { + $request->setIntentView($optionalArgs['intentView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIntent', Intent::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all intents in the specified agent. + * + * Sample code: + * ``` + * $intentsClient = new IntentsClient(); + * try { + * $formattedParent = $intentsClient->agentName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $intentsClient->listIntents($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $intentsClient->listIntents($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $intentsClient->close(); + * } + * ``` + * + * @param string $parent Required. The agent to list all intents from. + * Format: `projects//agent` or `projects//locations//agent`. + * + * Alternatively, you can specify the environment to list intents for. + * Format: `projects//agent/environments/` + * or `projects//locations//agent/environments/`. + * Note: training phrases of the intents will not be returned for non-draft + * environment. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type int $intentView + * Optional. The resource view to apply to the returned intent. + * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} + * @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 listIntents($parent, array $optionalArgs = []) + { + $request = new ListIntentsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + if (isset($optionalArgs['intentView'])) { + $request->setIntentView($optionalArgs['intentView']); + } + + 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('ListIntents', $optionalArgs, ListIntentsResponse::class, $request); + } + + /** + * Updates the specified intent. + * + * Note: You should always train an agent prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/es/docs/training). + * + * Sample code: + * ``` + * $intentsClient = new IntentsClient(); + * try { + * $intent = new Intent(); + * $response = $intentsClient->updateIntent($intent); + * } finally { + * $intentsClient->close(); + * } + * ``` + * + * @param Intent $intent Required. The intent to update. + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. The language used to access language-specific data. + * If not specified, the agent's default language is used. + * For more information, see + * [Multilingual intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @type FieldMask $updateMask + * Optional. The mask to control which fields get updated. + * @type int $intentView + * Optional. The resource view to apply to the returned intent. + * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} + * @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\Dialogflow\V2\Intent + * + * @throws ApiException if the remote call fails + */ + public function updateIntent($intent, array $optionalArgs = []) + { + $request = new UpdateIntentRequest(); + $requestParamHeaders = []; + $request->setIntent($intent); + $requestParamHeaders['intent.name'] = $intent->getName(); + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['intentView'])) { + $request->setIntentView($optionalArgs['intentView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateIntent', Intent::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $intentsClient = new IntentsClient(); + * try { + * $response = $intentsClient->getLocation(); + * } finally { + * $intentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $intentsClient = new IntentsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $intentsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $intentsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $intentsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/KnowledgeBasesGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/KnowledgeBasesGapicClient.php new file mode 100644 index 000000000000..5d73144cac7d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/KnowledgeBasesGapicClient.php @@ -0,0 +1,772 @@ +projectName('[PROJECT]'); + * $knowledgeBase = new KnowledgeBase(); + * $response = $knowledgeBasesClient->createKnowledgeBase($formattedParent, $knowledgeBase); + * } finally { + * $knowledgeBasesClient->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. + */ +class KnowledgeBasesGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.KnowledgeBases'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $knowledgeBaseNameTemplate; + + private static $locationNameTemplate; + + private static $projectNameTemplate; + + private static $projectKnowledgeBaseNameTemplate; + + private static $projectLocationKnowledgeBaseNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/knowledge_bases_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/knowledge_bases_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/knowledge_bases_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/knowledge_bases_rest_client_config.php', + ], + ], + ]; + } + + private static function getKnowledgeBaseNameTemplate() + { + if (self::$knowledgeBaseNameTemplate == null) { + self::$knowledgeBaseNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}'); + } + + return self::$knowledgeBaseNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectKnowledgeBaseNameTemplate() + { + if (self::$projectKnowledgeBaseNameTemplate == null) { + self::$projectKnowledgeBaseNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}'); + } + + return self::$projectKnowledgeBaseNameTemplate; + } + + private static function getProjectLocationKnowledgeBaseNameTemplate() + { + if (self::$projectLocationKnowledgeBaseNameTemplate == null) { + self::$projectLocationKnowledgeBaseNameTemplate = new PathTemplate('projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}'); + } + + return self::$projectLocationKnowledgeBaseNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'knowledgeBase' => self::getKnowledgeBaseNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectKnowledgeBase' => self::getProjectKnowledgeBaseNameTemplate(), + 'projectLocationKnowledgeBase' => self::getProjectLocationKnowledgeBaseNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * knowledge_base resource. + * + * @param string $project + * @param string $knowledgeBase + * + * @return string The formatted knowledge_base resource. + */ + public static function knowledgeBaseName($project, $knowledgeBase) + { + return self::getKnowledgeBaseNameTemplate()->render([ + 'project' => $project, + 'knowledge_base' => $knowledgeBase, + ]); + } + + /** + * 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 project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_knowledge_base resource. + * + * @param string $project + * @param string $knowledgeBase + * + * @return string The formatted project_knowledge_base resource. + */ + public static function projectKnowledgeBaseName($project, $knowledgeBase) + { + return self::getProjectKnowledgeBaseNameTemplate()->render([ + 'project' => $project, + 'knowledge_base' => $knowledgeBase, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_knowledge_base resource. + * + * @param string $project + * @param string $location + * @param string $knowledgeBase + * + * @return string The formatted project_location_knowledge_base resource. + */ + public static function projectLocationKnowledgeBaseName($project, $location, $knowledgeBase) + { + return self::getProjectLocationKnowledgeBaseNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'knowledge_base' => $knowledgeBase, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - knowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} + * - location: projects/{project}/locations/{location} + * - project: projects/{project} + * - projectKnowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} + * - projectLocationKnowledgeBase: projects/{project}/locations/{location}/knowledgeBases/{knowledge_base} + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Creates a knowledge base. + * + * Sample code: + * ``` + * $knowledgeBasesClient = new KnowledgeBasesClient(); + * try { + * $formattedParent = $knowledgeBasesClient->projectName('[PROJECT]'); + * $knowledgeBase = new KnowledgeBase(); + * $response = $knowledgeBasesClient->createKnowledgeBase($formattedParent, $knowledgeBase); + * } finally { + * $knowledgeBasesClient->close(); + * } + * ``` + * + * @param string $parent Required. The project to create a knowledge base for. + * Format: `projects//locations/`. + * @param KnowledgeBase $knowledgeBase Required. The knowledge base 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\Dialogflow\V2\KnowledgeBase + * + * @throws ApiException if the remote call fails + */ + public function createKnowledgeBase($parent, $knowledgeBase, array $optionalArgs = []) + { + $request = new CreateKnowledgeBaseRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setKnowledgeBase($knowledgeBase); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateKnowledgeBase', KnowledgeBase::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified knowledge base. + * + * Sample code: + * ``` + * $knowledgeBasesClient = new KnowledgeBasesClient(); + * try { + * $formattedName = $knowledgeBasesClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + * $knowledgeBasesClient->deleteKnowledgeBase($formattedName); + * } finally { + * $knowledgeBasesClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the knowledge base to delete. + * Format: `projects//locations//knowledgeBases/`. + * @param array $optionalArgs { + * Optional. + * + * @type bool $force + * Optional. Force deletes the knowledge base. When set to true, any documents + * in the knowledge base are also deleted. + * @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 deleteKnowledgeBase($name, array $optionalArgs = []) + { + $request = new DeleteKnowledgeBaseRequest(); + $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('DeleteKnowledgeBase', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the specified knowledge base. + * + * Sample code: + * ``` + * $knowledgeBasesClient = new KnowledgeBasesClient(); + * try { + * $formattedName = $knowledgeBasesClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + * $response = $knowledgeBasesClient->getKnowledgeBase($formattedName); + * } finally { + * $knowledgeBasesClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the knowledge base to retrieve. + * Format `projects//locations//knowledgeBases/`. + * @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\Dialogflow\V2\KnowledgeBase + * + * @throws ApiException if the remote call fails + */ + public function getKnowledgeBase($name, array $optionalArgs = []) + { + $request = new GetKnowledgeBaseRequest(); + $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('GetKnowledgeBase', KnowledgeBase::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all knowledge bases of the specified agent. + * + * Sample code: + * ``` + * $knowledgeBasesClient = new KnowledgeBasesClient(); + * try { + * $formattedParent = $knowledgeBasesClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $knowledgeBasesClient->listKnowledgeBases($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $knowledgeBasesClient->listKnowledgeBases($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $knowledgeBasesClient->close(); + * } + * ``` + * + * @param string $parent Required. The project to list of knowledge bases for. + * Format: `projects//locations/`. + * @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 + * The filter expression used to filter knowledge bases returned by the list + * method. The expression has the following syntax: + * + * [AND ] ... + * + * The following fields and operators are supported: + * + * * display_name with has(:) operator + * * language_code with equals(=) operator + * + * Examples: + * + * * 'language_code=en-us' matches knowledge bases with en-us language code. + * * 'display_name:articles' matches knowledge bases whose display name + * contains "articles". + * * 'display_name:"Best Articles"' matches knowledge bases whose display + * name contains "Best Articles". + * * 'language_code=en-gb AND display_name=articles' matches all knowledge + * bases whose display name contains "articles" and whose language code is + * "en-gb". + * + * Note: An empty filter string (i.e. "") is a no-op and will result in no + * filtering. + * + * For more information about filtering, see + * [API Filtering](https://aip.dev/160). + * @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 listKnowledgeBases($parent, array $optionalArgs = []) + { + $request = new ListKnowledgeBasesRequest(); + $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('ListKnowledgeBases', $optionalArgs, ListKnowledgeBasesResponse::class, $request); + } + + /** + * Updates the specified knowledge base. + * + * Sample code: + * ``` + * $knowledgeBasesClient = new KnowledgeBasesClient(); + * try { + * $knowledgeBase = new KnowledgeBase(); + * $response = $knowledgeBasesClient->updateKnowledgeBase($knowledgeBase); + * } finally { + * $knowledgeBasesClient->close(); + * } + * ``` + * + * @param KnowledgeBase $knowledgeBase Required. The knowledge base to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. Not specified means `update all`. + * Currently, only `display_name` can be updated, an InvalidArgument will be + * returned for attempting to update other fields. + * @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\Dialogflow\V2\KnowledgeBase + * + * @throws ApiException if the remote call fails + */ + public function updateKnowledgeBase($knowledgeBase, array $optionalArgs = []) + { + $request = new UpdateKnowledgeBaseRequest(); + $requestParamHeaders = []; + $request->setKnowledgeBase($knowledgeBase); + $requestParamHeaders['knowledge_base.name'] = $knowledgeBase->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('UpdateKnowledgeBase', KnowledgeBase::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $knowledgeBasesClient = new KnowledgeBasesClient(); + * try { + * $response = $knowledgeBasesClient->getLocation(); + * } finally { + * $knowledgeBasesClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $knowledgeBasesClient = new KnowledgeBasesClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $knowledgeBasesClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $knowledgeBasesClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $knowledgeBasesClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ParticipantsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ParticipantsGapicClient.php new file mode 100644 index 000000000000..1666b640dc37 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ParticipantsGapicClient.php @@ -0,0 +1,1217 @@ +participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + * $response = $participantsClient->analyzeContent($formattedParticipant); + * } finally { + * $participantsClient->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. + */ +class ParticipantsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Participants'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $conversationNameTemplate; + + private static $messageNameTemplate; + + private static $participantNameTemplate; + + private static $projectConversationNameTemplate; + + private static $projectConversationMessageNameTemplate; + + private static $projectConversationParticipantNameTemplate; + + private static $projectLocationConversationNameTemplate; + + private static $projectLocationConversationMessageNameTemplate; + + private static $projectLocationConversationParticipantNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/participants_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/participants_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/participants_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/participants_rest_client_config.php', + ], + ], + ]; + } + + private static function getConversationNameTemplate() + { + if (self::$conversationNameTemplate == null) { + self::$conversationNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}'); + } + + return self::$conversationNameTemplate; + } + + private static function getMessageNameTemplate() + { + if (self::$messageNameTemplate == null) { + self::$messageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); + } + + return self::$messageNameTemplate; + } + + private static function getParticipantNameTemplate() + { + if (self::$participantNameTemplate == null) { + self::$participantNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/participants/{participant}'); + } + + return self::$participantNameTemplate; + } + + private static function getProjectConversationNameTemplate() + { + if (self::$projectConversationNameTemplate == null) { + self::$projectConversationNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}'); + } + + return self::$projectConversationNameTemplate; + } + + private static function getProjectConversationMessageNameTemplate() + { + if (self::$projectConversationMessageNameTemplate == null) { + self::$projectConversationMessageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); + } + + return self::$projectConversationMessageNameTemplate; + } + + private static function getProjectConversationParticipantNameTemplate() + { + if (self::$projectConversationParticipantNameTemplate == null) { + self::$projectConversationParticipantNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/participants/{participant}'); + } + + return self::$projectConversationParticipantNameTemplate; + } + + private static function getProjectLocationConversationNameTemplate() + { + if (self::$projectLocationConversationNameTemplate == null) { + self::$projectLocationConversationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}'); + } + + return self::$projectLocationConversationNameTemplate; + } + + private static function getProjectLocationConversationMessageNameTemplate() + { + if (self::$projectLocationConversationMessageNameTemplate == null) { + self::$projectLocationConversationMessageNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}'); + } + + return self::$projectLocationConversationMessageNameTemplate; + } + + 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 getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'conversation' => self::getConversationNameTemplate(), + 'message' => self::getMessageNameTemplate(), + 'participant' => self::getParticipantNameTemplate(), + 'projectConversation' => self::getProjectConversationNameTemplate(), + 'projectConversationMessage' => self::getProjectConversationMessageNameTemplate(), + 'projectConversationParticipant' => self::getProjectConversationParticipantNameTemplate(), + 'projectLocationConversation' => self::getProjectLocationConversationNameTemplate(), + 'projectLocationConversationMessage' => self::getProjectLocationConversationMessageNameTemplate(), + 'projectLocationConversationParticipant' => self::getProjectLocationConversationParticipantNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a conversation + * resource. + * + * @param string $project + * @param string $conversation + * + * @return string The formatted conversation resource. + */ + public static function conversationName($project, $conversation) + { + return self::getConversationNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a message + * resource. + * + * @param string $project + * @param string $conversation + * @param string $message + * + * @return string The formatted message resource. + */ + public static function messageName($project, $conversation, $message) + { + return self::getMessageNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + 'message' => $message, + ]); + } + + /** + * 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 + * project_conversation resource. + * + * @param string $project + * @param string $conversation + * + * @return string The formatted project_conversation resource. + */ + public static function projectConversationName($project, $conversation) + { + return self::getProjectConversationNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation_message resource. + * + * @param string $project + * @param string $conversation + * @param string $message + * + * @return string The formatted project_conversation_message resource. + */ + public static function projectConversationMessageName($project, $conversation, $message) + { + return self::getProjectConversationMessageNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + 'message' => $message, + ]); + } + + /** + * 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 resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * + * @return string The formatted project_location_conversation resource. + */ + public static function projectLocationConversationName($project, $location, $conversation) + { + return self::getProjectLocationConversationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation_message resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * @param string $message + * + * @return string The formatted project_location_conversation_message resource. + */ + public static function projectLocationConversationMessageName($project, $location, $conversation, $message) + { + return self::getProjectLocationConversationMessageNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + 'message' => $message, + ]); + } + + /** + * 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, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - conversation: projects/{project}/conversations/{conversation} + * - message: projects/{project}/conversations/{conversation}/messages/{message} + * - participant: projects/{project}/conversations/{conversation}/participants/{participant} + * - projectConversation: projects/{project}/conversations/{conversation} + * - projectConversationMessage: projects/{project}/conversations/{conversation}/messages/{message} + * - projectConversationParticipant: projects/{project}/conversations/{conversation}/participants/{participant} + * - projectLocationConversation: projects/{project}/locations/{location}/conversations/{conversation} + * - projectLocationConversationMessage: projects/{project}/locations/{location}/conversations/{conversation}/messages/{message} + * - projectLocationConversationParticipant: projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Adds a text (chat, for example), or audio (phone recording, for example) + * message from a participant into the conversation. + * + * Note: Always use agent versions for production traffic + * sent to virtual agents. See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $formattedParticipant = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + * $response = $participantsClient->analyzeContent($formattedParticipant); + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param string $participant Required. The name of the participant this text comes from. + * Format: `projects//locations//conversations//participants/`. + * @param array $optionalArgs { + * Optional. + * + * @type TextInput $textInput + * The natural language text to be processed. + * @type EventInput $eventInput + * An input event to send to Dialogflow. + * @type OutputAudioConfig $replyAudioConfig + * Speech synthesis configuration. + * The speech synthesis settings for a virtual agent that may be configured + * for the associated conversation profile are not used when calling + * AnalyzeContent. If this configuration is not supplied, speech synthesis + * is disabled. + * @type QueryParameters $queryParams + * Parameters for a Dialogflow virtual-agent query. + * @type AssistQueryParameters $assistQueryParams + * Parameters for a human assist query. + * @type Struct $cxParameters + * Additional parameters to be put into Dialogflow CX session parameters. To + * remove a parameter from the session, clients should explicitly set the + * parameter value to null. + * + * Note: this field should only be used if you are connecting to a Dialogflow + * CX agent. + * @type string $requestId + * A unique identifier for this request. Restricted to 36 ASCII characters. + * A random UUID is recommended. + * This request is only idempotent if a `request_id` is provided. + * @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\Dialogflow\V2\AnalyzeContentResponse + * + * @throws ApiException if the remote call fails + */ + public function analyzeContent($participant, array $optionalArgs = []) + { + $request = new AnalyzeContentRequest(); + $requestParamHeaders = []; + $request->setParticipant($participant); + $requestParamHeaders['participant'] = $participant; + if (isset($optionalArgs['textInput'])) { + $request->setTextInput($optionalArgs['textInput']); + } + + if (isset($optionalArgs['eventInput'])) { + $request->setEventInput($optionalArgs['eventInput']); + } + + if (isset($optionalArgs['replyAudioConfig'])) { + $request->setReplyAudioConfig($optionalArgs['replyAudioConfig']); + } + + if (isset($optionalArgs['queryParams'])) { + $request->setQueryParams($optionalArgs['queryParams']); + } + + if (isset($optionalArgs['assistQueryParams'])) { + $request->setAssistQueryParams($optionalArgs['assistQueryParams']); + } + + if (isset($optionalArgs['cxParameters'])) { + $request->setCxParameters($optionalArgs['cxParameters']); + } + + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AnalyzeContent', AnalyzeContentResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new participant in a conversation. + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $formattedParent = $participantsClient->conversationName('[PROJECT]', '[CONVERSATION]'); + * $participant = new Participant(); + * $response = $participantsClient->createParticipant($formattedParent, $participant); + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource identifier of the conversation adding the participant. + * Format: `projects//locations//conversations/`. + * @param Participant $participant Required. The participant 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\Dialogflow\V2\Participant + * + * @throws ApiException if the remote call fails + */ + public function createParticipant($parent, $participant, array $optionalArgs = []) + { + $request = new CreateParticipantRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setParticipant($participant); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateParticipant', Participant::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a conversation participant. + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $formattedName = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + * $response = $participantsClient->getParticipant($formattedName); + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the participant. Format: + * `projects//locations//conversations//participants/`. + * @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\Dialogflow\V2\Participant + * + * @throws ApiException if the remote call fails + */ + public function getParticipant($name, array $optionalArgs = []) + { + $request = new GetParticipantRequest(); + $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('GetParticipant', Participant::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all participants in the specified conversation. + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $formattedParent = $participantsClient->conversationName('[PROJECT]', '[CONVERSATION]'); + * // Iterate over pages of elements + * $pagedResponse = $participantsClient->listParticipants($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $participantsClient->listParticipants($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param string $parent Required. The conversation to list all participants from. + * Format: `projects//locations//conversations/`. + * @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 listParticipants($parent, array $optionalArgs = []) + { + $request = new ListParticipantsRequest(); + $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('ListParticipants', $optionalArgs, ListParticipantsResponse::class, $request); + } + + /** + * Adds a text (chat, for example), or audio (phone recording, for example) + * message from a participant into the conversation. + * Note: This method is only available through the gRPC API (not REST). + * + * The top-level message sent to the client by the server is + * `StreamingAnalyzeContentResponse`. Multiple response messages can be + * returned in order. The first one or more messages contain the + * `recognition_result` field. Each result represents a more complete + * transcript of what the user said. The next message contains the + * `reply_text` field and potentially the `reply_audio` field. The message can + * also contain the `automated_agent_reply` field. + * + * Note: Always use agent versions for production traffic + * sent to virtual agents. See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $participant = 'participant'; + * $request = new StreamingAnalyzeContentRequest(); + * $request->setParticipant($participant); + * // Write all requests to the server, then read all responses until the + * // stream is complete + * $requests = [ + * $request, + * ]; + * $stream = $participantsClient->streamingAnalyzeContent(); + * $stream->writeAll($requests); + * foreach ($stream->closeWriteAndReadAll() as $element) { + * // doSomethingWith($element); + * } + * // Alternatively: + * // Write requests individually, making read() calls if + * // required. Call closeWrite() once writes are complete, and read the + * // remaining responses from the server. + * $requests = [ + * $request, + * ]; + * $stream = $participantsClient->streamingAnalyzeContent(); + * foreach ($requests as $request) { + * $stream->write($request); + * // if required, read a single response from the stream + * $element = $stream->read(); + * // doSomethingWith($element) + * } + * $stream->closeWrite(); + * $element = $stream->read(); + * while (!is_null($element)) { + * // doSomethingWith($element) + * $element = $stream->read(); + * } + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return \Google\ApiCore\BidiStream + * + * @throws ApiException if the remote call fails + */ + public function streamingAnalyzeContent(array $optionalArgs = []) + { + return $this->startCall('StreamingAnalyzeContent', StreamingAnalyzeContentResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); + } + + /** + * Gets suggested articles for a participant based on specific historical + * messages. + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $formattedParent = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + * $response = $participantsClient->suggestArticles($formattedParent); + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $latestMessage + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * + * Format: `projects//locations//conversations//messages/`. + * @type int $contextSize + * Optional. Max number of messages prior to and including + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. + * @type AssistQueryParameters $assistQueryParams + * Parameters for a human assist query. + * @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\Dialogflow\V2\SuggestArticlesResponse + * + * @throws ApiException if the remote call fails + */ + public function suggestArticles($parent, array $optionalArgs = []) + { + $request = new SuggestArticlesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['latestMessage'])) { + $request->setLatestMessage($optionalArgs['latestMessage']); + } + + if (isset($optionalArgs['contextSize'])) { + $request->setContextSize($optionalArgs['contextSize']); + } + + if (isset($optionalArgs['assistQueryParams'])) { + $request->setAssistQueryParams($optionalArgs['assistQueryParams']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SuggestArticles', SuggestArticlesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets suggested faq answers for a participant based on specific historical + * messages. + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $formattedParent = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + * $response = $participantsClient->suggestFaqAnswers($formattedParent); + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $latestMessage + * Optional. The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * + * Format: `projects//locations//conversations//messages/`. + * @type int $contextSize + * Optional. Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * @type AssistQueryParameters $assistQueryParams + * Parameters for a human assist query. + * @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\Dialogflow\V2\SuggestFaqAnswersResponse + * + * @throws ApiException if the remote call fails + */ + public function suggestFaqAnswers($parent, array $optionalArgs = []) + { + $request = new SuggestFaqAnswersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['latestMessage'])) { + $request->setLatestMessage($optionalArgs['latestMessage']); + } + + if (isset($optionalArgs['contextSize'])) { + $request->setContextSize($optionalArgs['contextSize']); + } + + if (isset($optionalArgs['assistQueryParams'])) { + $request->setAssistQueryParams($optionalArgs['assistQueryParams']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SuggestFaqAnswers', SuggestFaqAnswersResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets smart replies for a participant based on specific historical + * messages. + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $formattedParent = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + * $response = $participantsClient->suggestSmartReplies($formattedParent); + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the participant to fetch suggestion for. + * Format: `projects//locations//conversations//participants/`. + * @param array $optionalArgs { + * Optional. + * + * @type TextInput $currentTextInput + * The current natural language text segment to compile suggestion + * for. This provides a way for user to get follow up smart reply suggestion + * after a smart reply selection, without sending a text message. + * @type string $latestMessage + * The name of the latest conversation message to compile suggestion + * for. If empty, it will be the latest message of the conversation. + * + * Format: `projects//locations//conversations//messages/`. + * @type int $contextSize + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 20 and at most 50. + * @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\Dialogflow\V2\SuggestSmartRepliesResponse + * + * @throws ApiException if the remote call fails + */ + public function suggestSmartReplies($parent, array $optionalArgs = []) + { + $request = new SuggestSmartRepliesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['currentTextInput'])) { + $request->setCurrentTextInput($optionalArgs['currentTextInput']); + } + + if (isset($optionalArgs['latestMessage'])) { + $request->setLatestMessage($optionalArgs['latestMessage']); + } + + if (isset($optionalArgs['contextSize'])) { + $request->setContextSize($optionalArgs['contextSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SuggestSmartReplies', SuggestSmartRepliesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates the specified participant. + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $participant = new Participant(); + * $updateMask = new FieldMask(); + * $response = $participantsClient->updateParticipant($participant, $updateMask); + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param Participant $participant Required. The participant to update. + * @param FieldMask $updateMask Required. The mask to specify which fields to update. + * @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\Dialogflow\V2\Participant + * + * @throws ApiException if the remote call fails + */ + public function updateParticipant($participant, $updateMask, array $optionalArgs = []) + { + $request = new UpdateParticipantRequest(); + $requestParamHeaders = []; + $request->setParticipant($participant); + $request->setUpdateMask($updateMask); + $requestParamHeaders['participant.name'] = $participant->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateParticipant', Participant::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * $response = $participantsClient->getLocation(); + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $participantsClient = new ParticipantsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $participantsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $participantsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $participantsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionEntityTypesGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionEntityTypesGapicClient.php new file mode 100644 index 000000000000..e3ca571f68d8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionEntityTypesGapicClient.php @@ -0,0 +1,955 @@ +sessionName('[PROJECT]', '[SESSION]'); + * $sessionEntityType = new SessionEntityType(); + * $response = $sessionEntityTypesClient->createSessionEntityType($formattedParent, $sessionEntityType); + * } finally { + * $sessionEntityTypesClient->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. + */ +class SessionEntityTypesGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.SessionEntityTypes'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $projectEnvironmentUserSessionNameTemplate; + + private static $projectEnvironmentUserSessionEntityTypeNameTemplate; + + private static $projectLocationEnvironmentUserSessionNameTemplate; + + private static $projectLocationEnvironmentUserSessionEntityTypeNameTemplate; + + private static $projectLocationSessionNameTemplate; + + private static $projectLocationSessionEntityTypeNameTemplate; + + private static $projectSessionNameTemplate; + + private static $projectSessionEntityTypeNameTemplate; + + private static $sessionNameTemplate; + + private static $sessionEntityTypeNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/session_entity_types_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/session_entity_types_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/session_entity_types_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/session_entity_types_rest_client_config.php', + ], + ], + ]; + } + + private static function getProjectEnvironmentUserSessionNameTemplate() + { + if (self::$projectEnvironmentUserSessionNameTemplate == null) { + self::$projectEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}'); + } + + return self::$projectEnvironmentUserSessionNameTemplate; + } + + private static function getProjectEnvironmentUserSessionEntityTypeNameTemplate() + { + if (self::$projectEnvironmentUserSessionEntityTypeNameTemplate == null) { + self::$projectEnvironmentUserSessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}'); + } + + return self::$projectEnvironmentUserSessionEntityTypeNameTemplate; + } + + private static function getProjectLocationEnvironmentUserSessionNameTemplate() + { + if (self::$projectLocationEnvironmentUserSessionNameTemplate == null) { + self::$projectLocationEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}'); + } + + return self::$projectLocationEnvironmentUserSessionNameTemplate; + } + + private static function getProjectLocationEnvironmentUserSessionEntityTypeNameTemplate() + { + if (self::$projectLocationEnvironmentUserSessionEntityTypeNameTemplate == null) { + self::$projectLocationEnvironmentUserSessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}'); + } + + return self::$projectLocationEnvironmentUserSessionEntityTypeNameTemplate; + } + + private static function getProjectLocationSessionNameTemplate() + { + if (self::$projectLocationSessionNameTemplate == null) { + self::$projectLocationSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}'); + } + + return self::$projectLocationSessionNameTemplate; + } + + private static function getProjectLocationSessionEntityTypeNameTemplate() + { + if (self::$projectLocationSessionEntityTypeNameTemplate == null) { + self::$projectLocationSessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type}'); + } + + return self::$projectLocationSessionEntityTypeNameTemplate; + } + + private static function getProjectSessionNameTemplate() + { + if (self::$projectSessionNameTemplate == null) { + self::$projectSessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); + } + + return self::$projectSessionNameTemplate; + } + + private static function getProjectSessionEntityTypeNameTemplate() + { + if (self::$projectSessionEntityTypeNameTemplate == null) { + self::$projectSessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}'); + } + + return self::$projectSessionEntityTypeNameTemplate; + } + + private static function getSessionNameTemplate() + { + if (self::$sessionNameTemplate == null) { + self::$sessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); + } + + return self::$sessionNameTemplate; + } + + private static function getSessionEntityTypeNameTemplate() + { + if (self::$sessionEntityTypeNameTemplate == null) { + self::$sessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}'); + } + + return self::$sessionEntityTypeNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'projectEnvironmentUserSession' => self::getProjectEnvironmentUserSessionNameTemplate(), + 'projectEnvironmentUserSessionEntityType' => self::getProjectEnvironmentUserSessionEntityTypeNameTemplate(), + 'projectLocationEnvironmentUserSession' => self::getProjectLocationEnvironmentUserSessionNameTemplate(), + 'projectLocationEnvironmentUserSessionEntityType' => self::getProjectLocationEnvironmentUserSessionEntityTypeNameTemplate(), + 'projectLocationSession' => self::getProjectLocationSessionNameTemplate(), + 'projectLocationSessionEntityType' => self::getProjectLocationSessionEntityTypeNameTemplate(), + 'projectSession' => self::getProjectSessionNameTemplate(), + 'projectSessionEntityType' => self::getProjectSessionEntityTypeNameTemplate(), + 'session' => self::getSessionNameTemplate(), + 'sessionEntityType' => self::getSessionEntityTypeNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_environment_user_session resource. + * + * @param string $project + * @param string $environment + * @param string $user + * @param string $session + * + * @return string The formatted project_environment_user_session resource. + */ + public static function projectEnvironmentUserSessionName($project, $environment, $user, $session) + { + return self::getProjectEnvironmentUserSessionNameTemplate()->render([ + 'project' => $project, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_environment_user_session_entity_type resource. + * + * @param string $project + * @param string $environment + * @param string $user + * @param string $session + * @param string $entityType + * + * @return string The formatted project_environment_user_session_entity_type resource. + */ + public static function projectEnvironmentUserSessionEntityTypeName($project, $environment, $user, $session, $entityType) + { + return self::getProjectEnvironmentUserSessionEntityTypeNameTemplate()->render([ + 'project' => $project, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_environment_user_session resource. + * + * @param string $project + * @param string $location + * @param string $environment + * @param string $user + * @param string $session + * + * @return string The formatted project_location_environment_user_session resource. + */ + public static function projectLocationEnvironmentUserSessionName($project, $location, $environment, $user, $session) + { + return self::getProjectLocationEnvironmentUserSessionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_environment_user_session_entity_type resource. + * + * @param string $project + * @param string $location + * @param string $environment + * @param string $user + * @param string $session + * @param string $entityType + * + * @return string The formatted project_location_environment_user_session_entity_type resource. + */ + public static function projectLocationEnvironmentUserSessionEntityTypeName($project, $location, $environment, $user, $session, $entityType) + { + return self::getProjectLocationEnvironmentUserSessionEntityTypeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_session resource. + * + * @param string $project + * @param string $location + * @param string $session + * + * @return string The formatted project_location_session resource. + */ + public static function projectLocationSessionName($project, $location, $session) + { + return self::getProjectLocationSessionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_session_entity_type resource. + * + * @param string $project + * @param string $location + * @param string $session + * @param string $entityType + * + * @return string The formatted project_location_session_entity_type resource. + */ + public static function projectLocationSessionEntityTypeName($project, $location, $session, $entityType) + { + return self::getProjectLocationSessionEntityTypeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_session resource. + * + * @param string $project + * @param string $session + * + * @return string The formatted project_session resource. + */ + public static function projectSessionName($project, $session) + { + return self::getProjectSessionNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_session_entity_type resource. + * + * @param string $project + * @param string $session + * @param string $entityType + * + * @return string The formatted project_session_entity_type resource. + */ + public static function projectSessionEntityTypeName($project, $session, $entityType) + { + return self::getProjectSessionEntityTypeNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a session + * resource. + * + * @param string $project + * @param string $session + * + * @return string The formatted session resource. + */ + public static function sessionName($project, $session) + { + return self::getSessionNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * session_entity_type resource. + * + * @param string $project + * @param string $session + * @param string $entityType + * + * @return string The formatted session_entity_type resource. + */ + public static function sessionEntityTypeName($project, $session, $entityType) + { + return self::getSessionEntityTypeNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - projectEnvironmentUserSession: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session} + * - projectEnvironmentUserSessionEntityType: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type} + * - projectLocationEnvironmentUserSession: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session} + * - projectLocationEnvironmentUserSessionEntityType: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type} + * - projectLocationSession: projects/{project}/locations/{location}/agent/sessions/{session} + * - projectLocationSessionEntityType: projects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type} + * - projectSession: projects/{project}/agent/sessions/{session} + * - projectSessionEntityType: projects/{project}/agent/sessions/{session}/entityTypes/{entity_type} + * - session: projects/{project}/agent/sessions/{session} + * - sessionEntityType: projects/{project}/agent/sessions/{session}/entityTypes/{entity_type} + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Creates a session entity type. + * + * If the specified session entity type already exists, overrides the session + * entity type. + * + * This method doesn't work with Google Assistant integration. + * Contact Dialogflow support if you need to use session entities + * with Google Assistant integration. + * + * Sample code: + * ``` + * $sessionEntityTypesClient = new SessionEntityTypesClient(); + * try { + * $formattedParent = $sessionEntityTypesClient->sessionName('[PROJECT]', '[SESSION]'); + * $sessionEntityType = new SessionEntityType(); + * $response = $sessionEntityTypesClient->createSessionEntityType($formattedParent, $sessionEntityType); + * } finally { + * $sessionEntityTypesClient->close(); + * } + * ``` + * + * @param string $parent Required. The session to create a session entity type for. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @param SessionEntityType $sessionEntityType Required. The session entity type 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\Dialogflow\V2\SessionEntityType + * + * @throws ApiException if the remote call fails + */ + public function createSessionEntityType($parent, $sessionEntityType, array $optionalArgs = []) + { + $request = new CreateSessionEntityTypeRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSessionEntityType($sessionEntityType); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateSessionEntityType', SessionEntityType::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified session entity type. + * + * This method doesn't work with Google Assistant integration. + * Contact Dialogflow support if you need to use session entities + * with Google Assistant integration. + * + * Sample code: + * ``` + * $sessionEntityTypesClient = new SessionEntityTypesClient(); + * try { + * $formattedName = $sessionEntityTypesClient->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); + * $sessionEntityTypesClient->deleteSessionEntityType($formattedName); + * } finally { + * $sessionEntityTypesClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the entity type to delete. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @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 deleteSessionEntityType($name, array $optionalArgs = []) + { + $request = new DeleteSessionEntityTypeRequest(); + $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('DeleteSessionEntityType', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the specified session entity type. + * + * This method doesn't work with Google Assistant integration. + * Contact Dialogflow support if you need to use session entities + * with Google Assistant integration. + * + * Sample code: + * ``` + * $sessionEntityTypesClient = new SessionEntityTypesClient(); + * try { + * $formattedName = $sessionEntityTypesClient->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); + * $response = $sessionEntityTypesClient->getSessionEntityType($formattedName); + * } finally { + * $sessionEntityTypesClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the session entity type. Format: + * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @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\Dialogflow\V2\SessionEntityType + * + * @throws ApiException if the remote call fails + */ + public function getSessionEntityType($name, array $optionalArgs = []) + { + $request = new GetSessionEntityTypeRequest(); + $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('GetSessionEntityType', SessionEntityType::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all session entity types in the specified session. + * + * This method doesn't work with Google Assistant integration. + * Contact Dialogflow support if you need to use session entities + * with Google Assistant integration. + * + * Sample code: + * ``` + * $sessionEntityTypesClient = new SessionEntityTypesClient(); + * try { + * $formattedParent = $sessionEntityTypesClient->sessionName('[PROJECT]', '[SESSION]'); + * // Iterate over pages of elements + * $pagedResponse = $sessionEntityTypesClient->listSessionEntityTypes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $sessionEntityTypesClient->listSessionEntityTypes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $sessionEntityTypesClient->close(); + * } + * ``` + * + * @param string $parent Required. The session to list all session entity types from. + * Format: `projects//agent/sessions/` or + * `projects//agent/environments//users// + * sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + * @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 listSessionEntityTypes($parent, array $optionalArgs = []) + { + $request = new ListSessionEntityTypesRequest(); + $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('ListSessionEntityTypes', $optionalArgs, ListSessionEntityTypesResponse::class, $request); + } + + /** + * Updates the specified session entity type. + * + * This method doesn't work with Google Assistant integration. + * Contact Dialogflow support if you need to use session entities + * with Google Assistant integration. + * + * Sample code: + * ``` + * $sessionEntityTypesClient = new SessionEntityTypesClient(); + * try { + * $sessionEntityType = new SessionEntityType(); + * $response = $sessionEntityTypesClient->updateSessionEntityType($sessionEntityType); + * } finally { + * $sessionEntityTypesClient->close(); + * } + * ``` + * + * @param SessionEntityType $sessionEntityType Required. The session entity type to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. The mask to control which fields get 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\Dialogflow\V2\SessionEntityType + * + * @throws ApiException if the remote call fails + */ + public function updateSessionEntityType($sessionEntityType, array $optionalArgs = []) + { + $request = new UpdateSessionEntityTypeRequest(); + $requestParamHeaders = []; + $request->setSessionEntityType($sessionEntityType); + $requestParamHeaders['session_entity_type.name'] = $sessionEntityType->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('UpdateSessionEntityType', SessionEntityType::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $sessionEntityTypesClient = new SessionEntityTypesClient(); + * try { + * $response = $sessionEntityTypesClient->getLocation(); + * } finally { + * $sessionEntityTypesClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $sessionEntityTypesClient = new SessionEntityTypesClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $sessionEntityTypesClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $sessionEntityTypesClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $sessionEntityTypesClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionsGapicClient.php new file mode 100644 index 000000000000..6290e0ba300a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionsGapicClient.php @@ -0,0 +1,698 @@ +sessionName('[PROJECT]', '[SESSION]'); + * $queryInput = new QueryInput(); + * $response = $sessionsClient->detectIntent($formattedSession, $queryInput); + * } finally { + * $sessionsClient->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. + */ +class SessionsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Sessions'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $projectEnvironmentUserSessionNameTemplate; + + private static $projectLocationEnvironmentUserSessionNameTemplate; + + private static $projectLocationSessionNameTemplate; + + private static $projectSessionNameTemplate; + + private static $sessionNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sessions_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sessions_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sessions_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sessions_rest_client_config.php', + ], + ], + ]; + } + + private static function getProjectEnvironmentUserSessionNameTemplate() + { + if (self::$projectEnvironmentUserSessionNameTemplate == null) { + self::$projectEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}'); + } + + return self::$projectEnvironmentUserSessionNameTemplate; + } + + private static function getProjectLocationEnvironmentUserSessionNameTemplate() + { + if (self::$projectLocationEnvironmentUserSessionNameTemplate == null) { + self::$projectLocationEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}'); + } + + return self::$projectLocationEnvironmentUserSessionNameTemplate; + } + + private static function getProjectLocationSessionNameTemplate() + { + if (self::$projectLocationSessionNameTemplate == null) { + self::$projectLocationSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}'); + } + + return self::$projectLocationSessionNameTemplate; + } + + private static function getProjectSessionNameTemplate() + { + if (self::$projectSessionNameTemplate == null) { + self::$projectSessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); + } + + return self::$projectSessionNameTemplate; + } + + private static function getSessionNameTemplate() + { + if (self::$sessionNameTemplate == null) { + self::$sessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); + } + + return self::$sessionNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'projectEnvironmentUserSession' => self::getProjectEnvironmentUserSessionNameTemplate(), + 'projectLocationEnvironmentUserSession' => self::getProjectLocationEnvironmentUserSessionNameTemplate(), + 'projectLocationSession' => self::getProjectLocationSessionNameTemplate(), + 'projectSession' => self::getProjectSessionNameTemplate(), + 'session' => self::getSessionNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_environment_user_session resource. + * + * @param string $project + * @param string $environment + * @param string $user + * @param string $session + * + * @return string The formatted project_environment_user_session resource. + */ + public static function projectEnvironmentUserSessionName($project, $environment, $user, $session) + { + return self::getProjectEnvironmentUserSessionNameTemplate()->render([ + 'project' => $project, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_environment_user_session resource. + * + * @param string $project + * @param string $location + * @param string $environment + * @param string $user + * @param string $session + * + * @return string The formatted project_location_environment_user_session resource. + */ + public static function projectLocationEnvironmentUserSessionName($project, $location, $environment, $user, $session) + { + return self::getProjectLocationEnvironmentUserSessionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'environment' => $environment, + 'user' => $user, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_session resource. + * + * @param string $project + * @param string $location + * @param string $session + * + * @return string The formatted project_location_session resource. + */ + public static function projectLocationSessionName($project, $location, $session) + { + return self::getProjectLocationSessionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_session resource. + * + * @param string $project + * @param string $session + * + * @return string The formatted project_session resource. + */ + public static function projectSessionName($project, $session) + { + return self::getProjectSessionNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a session + * resource. + * + * @param string $project + * @param string $session + * + * @return string The formatted session resource. + */ + public static function sessionName($project, $session) + { + return self::getSessionNameTemplate()->render([ + 'project' => $project, + 'session' => $session, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - projectEnvironmentUserSession: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session} + * - projectLocationEnvironmentUserSession: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session} + * - projectLocationSession: projects/{project}/locations/{location}/agent/sessions/{session} + * - projectSession: projects/{project}/agent/sessions/{session} + * - session: projects/{project}/agent/sessions/{session} + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Processes a natural language query and returns structured, actionable data + * as a result. This method is not idempotent, because it may cause contexts + * and session entity types to be updated, which in turn might affect + * results of future queries. + * + * If you might use + * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + * or other CCAI products now or in the future, consider using + * [AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * instead of `DetectIntent`. `AnalyzeContent` has additional + * functionality for Agent Assist and other CCAI products. + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Sample code: + * ``` + * $sessionsClient = new SessionsClient(); + * try { + * $formattedSession = $sessionsClient->sessionName('[PROJECT]', '[SESSION]'); + * $queryInput = new QueryInput(); + * $response = $sessionsClient->detectIntent($formattedSession, $queryInput); + * } finally { + * $sessionsClient->close(); + * } + * ``` + * + * @param string $session Required. The name of the session this query is sent to. Format: + * `projects//agent/sessions/`, or + * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + * default 'draft' environment (`Environment ID` might be referred to as + * environment name at some places). If `User ID` is not specified, we are + * using "-". It's up to the API caller to choose an appropriate `Session ID` + * and `User Id`. They can be a random number or some type of user and session + * identifiers (preferably hashed). The length of the `Session ID` and + * `User ID` must not exceed 36 characters. + * + * For more information, see the [API interactions + * guide](https://cloud.google.com/dialogflow/docs/api-overview). + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @param QueryInput $queryInput Required. The input specification. It can be set to: + * + * 1. an audio config + * which instructs the speech recognizer how to process the speech audio, + * + * 2. a conversational query in the form of text, or + * + * 3. an event that specifies which intent to trigger. + * @param array $optionalArgs { + * Optional. + * + * @type QueryParameters $queryParams + * The parameters of this query. + * @type OutputAudioConfig $outputAudioConfig + * Instructs the speech synthesizer how to generate the output + * audio. If this field is not set and agent-level speech synthesizer is not + * configured, no output audio is generated. + * @type FieldMask $outputAudioConfigMask + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. + * @type string $inputAudio + * The natural language speech audio to be processed. This field + * should be populated iff `query_input` is set to an input audio config. + * A single request can contain up to 1 minute of speech audio data. + * @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\Dialogflow\V2\DetectIntentResponse + * + * @throws ApiException if the remote call fails + */ + public function detectIntent($session, $queryInput, array $optionalArgs = []) + { + $request = new DetectIntentRequest(); + $requestParamHeaders = []; + $request->setSession($session); + $request->setQueryInput($queryInput); + $requestParamHeaders['session'] = $session; + if (isset($optionalArgs['queryParams'])) { + $request->setQueryParams($optionalArgs['queryParams']); + } + + if (isset($optionalArgs['outputAudioConfig'])) { + $request->setOutputAudioConfig($optionalArgs['outputAudioConfig']); + } + + if (isset($optionalArgs['outputAudioConfigMask'])) { + $request->setOutputAudioConfigMask($optionalArgs['outputAudioConfigMask']); + } + + if (isset($optionalArgs['inputAudio'])) { + $request->setInputAudio($optionalArgs['inputAudio']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DetectIntent', DetectIntentResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Processes a natural language query in audio format in a streaming fashion + * and returns structured, actionable data as a result. This method is only + * available via the gRPC API (not REST). + * + * If you might use + * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + * or other CCAI products now or in the future, consider using + * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has + * additional functionality for Agent Assist and other CCAI products. + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + * Sample code: + * ``` + * $sessionsClient = new SessionsClient(); + * try { + * $session = 'session'; + * $queryInput = new QueryInput(); + * $request = new StreamingDetectIntentRequest(); + * $request->setSession($session); + * $request->setQueryInput($queryInput); + * // Write all requests to the server, then read all responses until the + * // stream is complete + * $requests = [ + * $request, + * ]; + * $stream = $sessionsClient->streamingDetectIntent(); + * $stream->writeAll($requests); + * foreach ($stream->closeWriteAndReadAll() as $element) { + * // doSomethingWith($element); + * } + * // Alternatively: + * // Write requests individually, making read() calls if + * // required. Call closeWrite() once writes are complete, and read the + * // remaining responses from the server. + * $requests = [ + * $request, + * ]; + * $stream = $sessionsClient->streamingDetectIntent(); + * foreach ($requests as $request) { + * $stream->write($request); + * // if required, read a single response from the stream + * $element = $stream->read(); + * // doSomethingWith($element) + * } + * $stream->closeWrite(); + * $element = $stream->read(); + * while (!is_null($element)) { + * // doSomethingWith($element) + * $element = $stream->read(); + * } + * } finally { + * $sessionsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return \Google\ApiCore\BidiStream + * + * @throws ApiException if the remote call fails + */ + public function streamingDetectIntent(array $optionalArgs = []) + { + return $this->startCall('StreamingDetectIntent', StreamingDetectIntentResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $sessionsClient = new SessionsClient(); + * try { + * $response = $sessionsClient->getLocation(); + * } finally { + * $sessionsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $sessionsClient = new SessionsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $sessionsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $sessionsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $sessionsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/VersionsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/VersionsGapicClient.php new file mode 100644 index 000000000000..d404880bb4c1 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/VersionsGapicClient.php @@ -0,0 +1,779 @@ +agentName('[PROJECT]'); + * $version = new Version(); + * $response = $versionsClient->createVersion($formattedParent, $version); + * } finally { + * $versionsClient->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. + */ +class VersionsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dialogflow.v2.Versions'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** 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', + 'https://www.googleapis.com/auth/dialogflow', + ]; + + private static $agentNameTemplate; + + private static $projectAgentNameTemplate; + + private static $projectLocationAgentNameTemplate; + + private static $projectLocationVersionNameTemplate; + + private static $projectVersionNameTemplate; + + private static $versionNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/versions_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/versions_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/versions_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/versions_rest_client_config.php', + ], + ], + ]; + } + + private static function getAgentNameTemplate() + { + if (self::$agentNameTemplate == null) { + self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$agentNameTemplate; + } + + private static function getProjectAgentNameTemplate() + { + if (self::$projectAgentNameTemplate == null) { + self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); + } + + return self::$projectAgentNameTemplate; + } + + private static function getProjectLocationAgentNameTemplate() + { + if (self::$projectLocationAgentNameTemplate == null) { + self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); + } + + return self::$projectLocationAgentNameTemplate; + } + + private static function getProjectLocationVersionNameTemplate() + { + if (self::$projectLocationVersionNameTemplate == null) { + self::$projectLocationVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/versions/{version}'); + } + + return self::$projectLocationVersionNameTemplate; + } + + private static function getProjectVersionNameTemplate() + { + if (self::$projectVersionNameTemplate == null) { + self::$projectVersionNameTemplate = new PathTemplate('projects/{project}/agent/versions/{version}'); + } + + return self::$projectVersionNameTemplate; + } + + private static function getVersionNameTemplate() + { + if (self::$versionNameTemplate == null) { + self::$versionNameTemplate = new PathTemplate('projects/{project}/agent/versions/{version}'); + } + + return self::$versionNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'agent' => self::getAgentNameTemplate(), + 'projectAgent' => self::getProjectAgentNameTemplate(), + 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), + 'projectLocationVersion' => self::getProjectLocationVersionNameTemplate(), + 'projectVersion' => self::getProjectVersionNameTemplate(), + 'version' => self::getVersionNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * + * @return string The formatted agent resource. + */ + public static function agentName($project) + { + return self::getAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_agent resource. + * + * @param string $project + * + * @return string The formatted project_agent resource. + */ + public static function projectAgentName($project) + { + return self::getProjectAgentNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted project_location_agent resource. + */ + public static function projectLocationAgentName($project, $location) + { + return self::getProjectLocationAgentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_version resource. + * + * @param string $project + * @param string $location + * @param string $version + * + * @return string The formatted project_location_version resource. + */ + public static function projectLocationVersionName($project, $location, $version) + { + return self::getProjectLocationVersionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_version resource. + * + * @param string $project + * @param string $version + * + * @return string The formatted project_version resource. + */ + public static function projectVersionName($project, $version) + { + return self::getProjectVersionNameTemplate()->render([ + 'project' => $project, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a version + * resource. + * + * @param string $project + * @param string $version + * + * @return string The formatted version resource. + */ + public static function versionName($project, $version) + { + return self::getVersionNameTemplate()->render([ + 'project' => $project, + 'version' => $version, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - agent: projects/{project}/agent + * - projectAgent: projects/{project}/agent + * - projectLocationAgent: projects/{project}/locations/{location}/agent + * - projectLocationVersion: projects/{project}/locations/{location}/agent/versions/{version} + * - projectVersion: projects/{project}/agent/versions/{version} + * - version: projects/{project}/agent/versions/{version} + * + * 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"); + } + + /** + * 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 'dialogflow.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); + } + + /** + * Creates an agent version. + * + * The new version points to the agent instance in the "default" environment. + * + * Sample code: + * ``` + * $versionsClient = new VersionsClient(); + * try { + * $formattedParent = $versionsClient->agentName('[PROJECT]'); + * $version = new Version(); + * $response = $versionsClient->createVersion($formattedParent, $version); + * } finally { + * $versionsClient->close(); + * } + * ``` + * + * @param string $parent Required. The agent to create a version for. + * Supported formats: + * + * - `projects//agent` + * - `projects//locations//agent` + * @param Version $version Required. The version 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\Dialogflow\V2\Version + * + * @throws ApiException if the remote call fails + */ + public function createVersion($parent, $version, array $optionalArgs = []) + { + $request = new CreateVersionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setVersion($version); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateVersion', Version::class, $optionalArgs, $request)->wait(); + } + + /** + * Delete the specified agent version. + * + * Sample code: + * ``` + * $versionsClient = new VersionsClient(); + * try { + * $formattedName = $versionsClient->versionName('[PROJECT]', '[VERSION]'); + * $versionsClient->deleteVersion($formattedName); + * } finally { + * $versionsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the version to delete. + * Supported formats: + * + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * @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 deleteVersion($name, array $optionalArgs = []) + { + $request = new DeleteVersionRequest(); + $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('DeleteVersion', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the specified agent version. + * + * Sample code: + * ``` + * $versionsClient = new VersionsClient(); + * try { + * $formattedName = $versionsClient->versionName('[PROJECT]', '[VERSION]'); + * $response = $versionsClient->getVersion($formattedName); + * } finally { + * $versionsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the version. + * Supported formats: + * + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * @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\Dialogflow\V2\Version + * + * @throws ApiException if the remote call fails + */ + public function getVersion($name, array $optionalArgs = []) + { + $request = new GetVersionRequest(); + $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('GetVersion', Version::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all versions of the specified agent. + * + * Sample code: + * ``` + * $versionsClient = new VersionsClient(); + * try { + * $formattedParent = $versionsClient->agentName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $versionsClient->listVersions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $versionsClient->listVersions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $versionsClient->close(); + * } + * ``` + * + * @param string $parent Required. The agent to list all versions from. + * Supported formats: + * + * - `projects//agent` + * - `projects//locations//agent` + * @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 listVersions($parent, array $optionalArgs = []) + { + $request = new ListVersionsRequest(); + $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('ListVersions', $optionalArgs, ListVersionsResponse::class, $request); + } + + /** + * Updates the specified agent version. + * + * Note that this method does not allow you to update the state of the agent + * the given version points to. It allows you to update only mutable + * properties of the version resource. + * + * Sample code: + * ``` + * $versionsClient = new VersionsClient(); + * try { + * $version = new Version(); + * $updateMask = new FieldMask(); + * $response = $versionsClient->updateVersion($version, $updateMask); + * } finally { + * $versionsClient->close(); + * } + * ``` + * + * @param Version $version Required. The version to update. + * Supported formats: + * + * - `projects//agent/versions/` + * - `projects//locations//agent/versions/` + * @param FieldMask $updateMask Required. The mask to control which fields get 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\Dialogflow\V2\Version + * + * @throws ApiException if the remote call fails + */ + public function updateVersion($version, $updateMask, array $optionalArgs = []) + { + $request = new UpdateVersionRequest(); + $requestParamHeaders = []; + $request->setVersion($version); + $request->setUpdateMask($updateMask); + $requestParamHeaders['version.name'] = $version->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateVersion', Version::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $versionsClient = new VersionsClient(); + * try { + * $response = $versionsClient->getLocation(); + * } finally { + * $versionsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $versionsClient = new VersionsClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $versionsClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $versionsClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $versionsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/IntentsClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/IntentsClient.php new file mode 100644 index 000000000000..028165b14025 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/IntentsClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.dialogflow.v2.Agents' => [ + 'ExportAgent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ExportAgentResponse', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ImportAgent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'RestoreAgent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'TrainAgent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'SearchAgents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAgents', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_rest_client_config.php new file mode 100644 index 000000000000..1212b8a0f942 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_rest_client_config.php @@ -0,0 +1,250 @@ + [ + 'google.cloud.dialogflow.v2.Agents' => [ + 'DeleteAgent' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{parent=projects/*}/agent', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ExportAgent' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/agent:export', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:export', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetAgent' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/agent', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetValidationResult' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/agent/validationResult', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent/validationResult', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ImportAgent' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/agent:import', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:import', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RestoreAgent' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/agent:restore', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:restore', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchAgents' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/agent:search', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:search', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetAgent' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{agent.parent=projects/*}/agent', + 'body' => 'agent', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{agent.parent=projects/*/locations/*}/agent', + 'body' => 'agent', + ], + ], + 'placeholders' => [ + 'agent.parent' => [ + 'getters' => [ + 'getAgent', + 'getParent', + ], + ], + ], + ], + 'TrainAgent' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/agent:train', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:train', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_client_config.json new file mode 100644 index 000000000000..2114a79c3ccc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.AnswerRecords": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "ListAnswerRecords": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAnswerRecord": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_descriptor_config.php new file mode 100644 index 000000000000..e2c3cb98c808 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.cloud.dialogflow.v2.AnswerRecords' => [ + 'ListAnswerRecords' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAnswerRecords', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_rest_client_config.php new file mode 100644 index 000000000000..be58c5eb38bf --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_rest_client_config.php @@ -0,0 +1,129 @@ + [ + 'google.cloud.dialogflow.v2.AnswerRecords' => [ + 'ListAnswerRecords' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/answerRecords', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/answerRecords', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAnswerRecord' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{answer_record.name=projects/*/answerRecords/*}', + 'body' => 'answer_record', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{answer_record.name=projects/*/locations/*/answerRecords/*}', + 'body' => 'answer_record', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'answer_record.name' => [ + 'getters' => [ + 'getAnswerRecord', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_client_config.json new file mode 100644 index 000000000000..405824724392 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_client_config.json @@ -0,0 +1,74 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.Contexts": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateContext": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteAllContexts": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteContext": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetContext": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListContexts": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateContext": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_descriptor_config.php new file mode 100644 index 000000000000..8c7bca79bfcb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.cloud.dialogflow.v2.Contexts' => [ + 'ListContexts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getContexts', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_rest_client_config.php new file mode 100644 index 000000000000..5aa624661cfd --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_rest_client_config.php @@ -0,0 +1,245 @@ + [ + 'google.cloud.dialogflow.v2.Contexts' => [ + 'CreateContext' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/contexts', + 'body' => 'context', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts', + 'body' => 'context', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts', + 'body' => 'context', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts', + 'body' => 'context', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAllContexts' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/contexts', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteContext' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/sessions/*/contexts/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetContext' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/sessions/*/contexts/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListContexts' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/contexts', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateContext' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{context.name=projects/*/agent/sessions/*/contexts/*}', + 'body' => 'context', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}', + 'body' => 'context', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}', + 'body' => 'context', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}', + 'body' => 'context', + ], + ], + 'placeholders' => [ + 'context.name' => [ + 'getters' => [ + 'getContext', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_client_config.json new file mode 100644 index 000000000000..bbee4eabff14 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.ConversationDatasets": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateConversationDataset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteConversationDataset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetConversationDataset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportConversationData": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConversationDatasets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_descriptor_config.php new file mode 100644 index 000000000000..c1bec8536300 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_descriptor_config.php @@ -0,0 +1,58 @@ + [ + 'google.cloud.dialogflow.v2.ConversationDatasets' => [ + 'CreateConversationDataset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationDataset', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\CreateConversationDatasetOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteConversationDataset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\DeleteConversationDatasetOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ImportConversationData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ImportConversationDataOperationResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\ImportConversationDataOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListConversationDatasets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConversationDatasets', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_rest_client_config.php new file mode 100644 index 000000000000..762313f329f2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_rest_client_config.php @@ -0,0 +1,162 @@ + [ + 'google.cloud.dialogflow.v2.ConversationDatasets' => [ + 'CreateConversationDataset' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationDatasets', + 'body' => 'conversation_dataset', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConversationDataset' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationDatasets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConversationDataset' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/conversationDatasets/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationDatasets/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportConversationData' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/conversationDatasets/*}:importConversationData', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationDatasets/*}:importConversationData', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConversationDatasets' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/conversationDatasets', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationDatasets', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_client_config.json new file mode 100644 index 000000000000..ecdf8c5a3de4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_client_config.json @@ -0,0 +1,89 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.ConversationModels": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateConversationModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateConversationModelEvaluation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteConversationModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeployConversationModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetConversationModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetConversationModelEvaluation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConversationModelEvaluations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConversationModels": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UndeployConversationModel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_descriptor_config.php new file mode 100644 index 000000000000..ae2966d2becb --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_descriptor_config.php @@ -0,0 +1,88 @@ + [ + 'google.cloud.dialogflow.v2.ConversationModels' => [ + 'CreateConversationModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationModel', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\CreateConversationModelOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'CreateConversationModelEvaluation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationModelEvaluation', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\CreateConversationModelEvaluationOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteConversationModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\DeleteConversationModelOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeployConversationModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\DeployConversationModelOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UndeployConversationModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\UndeployConversationModelOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListConversationModelEvaluations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConversationModelEvaluations', + ], + ], + 'ListConversationModels' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConversationModels', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_rest_client_config.php new file mode 100644 index 000000000000..88d3051f1cbc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_rest_client_config.php @@ -0,0 +1,240 @@ + [ + 'google.cloud.dialogflow.v2.ConversationModels' => [ + 'CreateConversationModel' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/conversationModels', + 'body' => 'conversation_model', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationModels', + 'body' => 'conversation_model', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateConversationModelEvaluation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConversationModel' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeployConversationModel' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*}:deploy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*}:deploy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConversationModel' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConversationModelEvaluation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*/evaluations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*/evaluations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConversationModelEvaluations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/conversationModels/*}/evaluations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListConversationModels' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/conversationModels', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationModels', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UndeployConversationModel' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*}:undeploy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*}:undeploy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_client_config.json new file mode 100644 index 000000000000..2898ad3018aa --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.ConversationProfiles": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "ClearSuggestionFeatureConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateConversationProfile": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteConversationProfile": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetConversationProfile": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConversationProfiles": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetSuggestionFeatureConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateConversationProfile": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_descriptor_config.php new file mode 100644 index 000000000000..b2f00f3ce3ae --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_descriptor_config.php @@ -0,0 +1,48 @@ + [ + 'google.cloud.dialogflow.v2.ConversationProfiles' => [ + 'ClearSuggestionFeatureConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationProfile', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\ClearSuggestionFeatureConfigOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'SetSuggestionFeatureConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationProfile', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\SetSuggestionFeatureConfigOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListConversationProfiles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConversationProfiles', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_rest_client_config.php new file mode 100644 index 000000000000..332fc52eec04 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_rest_client_config.php @@ -0,0 +1,220 @@ + [ + 'google.cloud.dialogflow.v2.ConversationProfiles' => [ + 'ClearSuggestionFeatureConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'conversation_profile' => [ + 'getters' => [ + 'getConversationProfile', + ], + ], + ], + ], + 'CreateConversationProfile' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/conversationProfiles', + 'body' => 'conversation_profile', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationProfiles', + 'body' => 'conversation_profile', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConversationProfile' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/conversationProfiles/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationProfiles/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConversationProfile' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/conversationProfiles/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationProfiles/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConversationProfiles' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/conversationProfiles', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationProfiles', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetSuggestionFeatureConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'conversation_profile' => [ + 'getters' => [ + 'getConversationProfile', + ], + ], + ], + ], + 'UpdateConversationProfile' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{conversation_profile.name=projects/*/conversationProfiles/*}', + 'body' => 'conversation_profile', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}', + 'body' => 'conversation_profile', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'conversation_profile.name' => [ + 'getters' => [ + 'getConversationProfile', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_client_config.json new file mode 100644 index 000000000000..47e5785bc38a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_client_config.json @@ -0,0 +1,74 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.Conversations": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CompleteConversation": { + "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" + }, + "GetConversation": { + "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" + }, + "ListMessages": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SuggestConversationSummary": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_descriptor_config.php new file mode 100644 index 000000000000..a50e979386ed --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_descriptor_config.php @@ -0,0 +1,38 @@ + [ + 'google.cloud.dialogflow.v2.Conversations' => [ + 'ListConversations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConversations', + ], + ], + 'ListMessages' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMessages', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_rest_client_config.php new file mode 100644 index 000000000000..4aab11384239 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_rest_client_config.php @@ -0,0 +1,194 @@ + [ + 'google.cloud.dialogflow.v2.Conversations' => [ + 'CompleteConversation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/conversations/*}:complete', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversations/*}:complete', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateConversation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/conversations', + 'body' => 'conversation', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversations', + 'body' => 'conversation', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetConversation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/conversations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConversations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/conversations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversations', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMessages' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/conversations/*}/messages', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*}/messages', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SuggestConversationSummary' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{conversation=projects/*/conversations/*}/suggestions:suggestConversationSummary', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:suggestConversationSummary', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'conversation' => [ + 'getters' => [ + 'getConversation', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_client_config.json new file mode 100644 index 000000000000..aaddca9c9fcc --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.Documents": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ExportDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ReloadDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_descriptor_config.php new file mode 100644 index 000000000000..de7cbd88bfc7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_descriptor_config.php @@ -0,0 +1,88 @@ + [ + 'google.cloud.dialogflow.v2.Documents' => [ + 'CreateDocument' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\Document', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteDocument' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ExportDocument' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\Document', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ImportDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ImportDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ReloadDocument' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\Document', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateDocument' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\Document', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListDocuments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDocuments', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_rest_client_config.php new file mode 100644 index 000000000000..f8d1387de2f2 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_rest_client_config.php @@ -0,0 +1,260 @@ + [ + 'google.cloud.dialogflow.v2.Documents' => [ + 'CreateDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/knowledgeBases/*}/documents', + 'body' => 'document', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents', + 'body' => 'document', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent/knowledgeBases/*}/documents', + 'body' => 'document', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDocument' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*/documents/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*/documents/*}:export', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:export', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDocument' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*/documents/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/knowledgeBases/*}/documents:import', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents:import', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDocuments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/knowledgeBases/*}/documents', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent/knowledgeBases/*}/documents', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ReloadDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*/documents/*}:reload', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:reload', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{document.name=projects/*/knowledgeBases/*/documents/*}', + 'body' => 'document', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{document.name=projects/*/locations/*/knowledgeBases/*/documents/*}', + 'body' => 'document', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{document.name=projects/*/agent/knowledgeBases/*/documents/*}', + 'body' => 'document', + ], + ], + 'placeholders' => [ + 'document.name' => [ + 'getters' => [ + 'getDocument', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_client_config.json new file mode 100644 index 000000000000..0380bfe8f674 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.EntityTypes": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BatchCreateEntities": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchDeleteEntities": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchDeleteEntityTypes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchUpdateEntities": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchUpdateEntityTypes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateEntityType": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteEntityType": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetEntityType": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEntityTypes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateEntityType": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_descriptor_config.php new file mode 100644 index 000000000000..0fdbac2ea75b --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_descriptor_config.php @@ -0,0 +1,78 @@ + [ + 'google.cloud.dialogflow.v2.EntityTypes' => [ + 'BatchCreateEntities' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'BatchDeleteEntities' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'BatchDeleteEntityTypes' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'BatchUpdateEntities' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'BatchUpdateEntityTypes' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\BatchUpdateEntityTypesResponse', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListEntityTypes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEntityTypes', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_rest_client_config.php new file mode 100644 index 000000000000..76dd3e467342 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_rest_client_config.php @@ -0,0 +1,271 @@ + [ + 'google.cloud.dialogflow.v2.EntityTypes' => [ + 'BatchCreateEntities' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteEntities' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteEntityTypes' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/entityTypes:batchDelete', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateEntities' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateEntityTypes' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/entityTypes:batchUpdate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEntityType' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/entityTypes', + 'body' => 'entity_type', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/entityTypes', + 'body' => 'entity_type', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEntityType' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/entityTypes/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/entityTypes/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEntityType' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/entityTypes/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/entityTypes/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEntityTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/entityTypes', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/entityTypes', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEntityType' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{entity_type.name=projects/*/agent/entityTypes/*}', + 'body' => 'entity_type', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}', + 'body' => 'entity_type', + ], + ], + 'placeholders' => [ + 'entity_type.name' => [ + 'getters' => [ + 'getEntityType', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_client_config.json new file mode 100644 index 000000000000..00d6f74b6016 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_client_config.json @@ -0,0 +1,74 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.Environments": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetEnvironmentHistory": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEnvironments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_descriptor_config.php new file mode 100644 index 000000000000..3c8963c579bf --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_descriptor_config.php @@ -0,0 +1,38 @@ + [ + 'google.cloud.dialogflow.v2.Environments' => [ + 'GetEnvironmentHistory' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEntries', + ], + ], + 'ListEnvironments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEnvironments', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_rest_client_config.php new file mode 100644 index 000000000000..5953798d6344 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_rest_client_config.php @@ -0,0 +1,205 @@ + [ + 'google.cloud.dialogflow.v2.Environments' => [ + 'CreateEnvironment' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/environments', + 'body' => 'environment', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/environments', + 'body' => 'environment', + 'queryParams' => [ + 'environment_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'environment_id', + ], + ], + 'DeleteEnvironment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEnvironment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEnvironmentHistory' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*}/history', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*}/history', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEnvironments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/environments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/environments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEnvironment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{environment.name=projects/*/agent/environments/*}', + 'body' => 'environment', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{environment.name=projects/*/locations/*/agent/environments/*}', + 'body' => 'environment', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'environment.name' => [ + 'getters' => [ + 'getEnvironment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_client_config.json new file mode 100644 index 000000000000..8e6cc14bb9c3 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.Fulfillments": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "GetFulfillment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateFulfillment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_descriptor_config.php new file mode 100644 index 000000000000..c893d4531d1a --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_descriptor_config.php @@ -0,0 +1,18 @@ + [ + 'google.cloud.dialogflow.v2.Fulfillments' => [ + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_rest_client_config.php new file mode 100644 index 000000000000..272e028f1c81 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_rest_client_config.php @@ -0,0 +1,129 @@ + [ + 'google.cloud.dialogflow.v2.Fulfillments' => [ + 'GetFulfillment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/fulfillment}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/fulfillment}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateFulfillment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{fulfillment.name=projects/*/agent/fulfillment}', + 'body' => 'fulfillment', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{fulfillment.name=projects/*/locations/*/agent/fulfillment}', + 'body' => 'fulfillment', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'fulfillment.name' => [ + 'getters' => [ + 'getFulfillment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_client_config.json new file mode 100644 index 000000000000..f6d3f00e1293 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.Intents": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BatchDeleteIntents": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchUpdateIntents": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateIntent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteIntent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIntent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIntents": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateIntent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_descriptor_config.php new file mode 100644 index 000000000000..bd54f549761d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_descriptor_config.php @@ -0,0 +1,48 @@ + [ + 'google.cloud.dialogflow.v2.Intents' => [ + 'BatchDeleteIntents' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'BatchUpdateIntents' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\BatchUpdateIntentsResponse', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListIntents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIntents', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_rest_client_config.php new file mode 100644 index 000000000000..6c5df8324599 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_rest_client_config.php @@ -0,0 +1,222 @@ + [ + 'google.cloud.dialogflow.v2.Intents' => [ + 'BatchDeleteIntents' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/intents:batchDelete', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/intents:batchDelete', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateIntents' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/intents:batchUpdate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/intents:batchUpdate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIntent' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/intents', + 'body' => 'intent', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/intents', + 'body' => 'intent', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteIntent' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/intents/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/intents/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIntent' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/intents/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/intents/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListIntents' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/intents', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/intents', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*}/intents', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*}/intents', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateIntent' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{intent.name=projects/*/agent/intents/*}', + 'body' => 'intent', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{intent.name=projects/*/locations/*/agent/intents/*}', + 'body' => 'intent', + ], + ], + 'placeholders' => [ + 'intent.name' => [ + 'getters' => [ + 'getIntent', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_client_config.json new file mode 100644 index 000000000000..8b18c4c682f0 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.KnowledgeBases": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateKnowledgeBase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteKnowledgeBase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetKnowledgeBase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListKnowledgeBases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateKnowledgeBase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_descriptor_config.php new file mode 100644 index 000000000000..f37323c4d63d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.cloud.dialogflow.v2.KnowledgeBases' => [ + 'ListKnowledgeBases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getKnowledgeBases', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_rest_client_config.php new file mode 100644 index 000000000000..c801f5cd5963 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_rest_client_config.php @@ -0,0 +1,198 @@ + [ + 'google.cloud.dialogflow.v2.KnowledgeBases' => [ + 'CreateKnowledgeBase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/knowledgeBases', + 'body' => 'knowledge_base', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/knowledgeBases', + 'body' => 'knowledge_base', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/knowledgeBases', + 'body' => 'knowledge_base', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteKnowledgeBase' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetKnowledgeBase' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListKnowledgeBases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/knowledgeBases', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/knowledgeBases', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/knowledgeBases', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateKnowledgeBase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{knowledge_base.name=projects/*/knowledgeBases/*}', + 'body' => 'knowledge_base', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{knowledge_base.name=projects/*/locations/*/knowledgeBases/*}', + 'body' => 'knowledge_base', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{knowledge_base.name=projects/*/agent/knowledgeBases/*}', + 'body' => 'knowledge_base', + ], + ], + 'placeholders' => [ + 'knowledge_base.name' => [ + 'getters' => [ + 'getKnowledgeBase', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_client_config.json new file mode 100644 index 000000000000..7d7ae17012ef --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_client_config.json @@ -0,0 +1,109 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.Participants": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000 + } + }, + "methods": { + "AnalyzeContent": { + "timeout_millis": 220000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateParticipant": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetParticipant": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListParticipants": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "StreamingAnalyzeContent": { + "timeout_millis": 220000 + }, + "SuggestArticles": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SuggestFaqAnswers": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SuggestSmartReplies": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateParticipant": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_descriptor_config.php new file mode 100644 index 000000000000..84364702e3ca --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_descriptor_config.php @@ -0,0 +1,33 @@ + [ + 'google.cloud.dialogflow.v2.Participants' => [ + 'ListParticipants' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getParticipants', + ], + ], + 'StreamingAnalyzeContent' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_rest_client_config.php new file mode 100644 index 000000000000..29293e1cf8ba --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_rest_client_config.php @@ -0,0 +1,241 @@ + [ + 'google.cloud.dialogflow.v2.Participants' => [ + 'AnalyzeContent' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{participant=projects/*/conversations/*/participants/*}:analyzeContent', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'participant' => [ + 'getters' => [ + 'getParticipant', + ], + ], + ], + ], + 'CreateParticipant' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/conversations/*}/participants', + 'body' => 'participant', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*}/participants', + 'body' => 'participant', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetParticipant' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/conversations/*/participants/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversations/*/participants/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListParticipants' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/conversations/*}/participants', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*}/participants', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SuggestArticles' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SuggestFaqAnswers' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SuggestSmartReplies' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestSmartReplies', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestSmartReplies', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateParticipant' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{participant.name=projects/*/conversations/*/participants/*}', + 'body' => 'participant', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{participant.name=projects/*/locations/*/conversations/*/participants/*}', + 'body' => 'participant', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'participant.name' => [ + 'getters' => [ + 'getParticipant', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_client_config.json new file mode 100644 index 000000000000..521ba47be243 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.SessionEntityTypes": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateSessionEntityType": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSessionEntityType": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSessionEntityType": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSessionEntityTypes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSessionEntityType": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_descriptor_config.php new file mode 100644 index 000000000000..76a165bbb91e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.cloud.dialogflow.v2.SessionEntityTypes' => [ + 'ListSessionEntityTypes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSessionEntityTypes', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_rest_client_config.php new file mode 100644 index 000000000000..b2cf293b33a8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_rest_client_config.php @@ -0,0 +1,220 @@ + [ + 'google.cloud.dialogflow.v2.SessionEntityTypes' => [ + 'CreateSessionEntityType' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/entityTypes', + 'body' => 'session_entity_type', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes', + 'body' => 'session_entity_type', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes', + 'body' => 'session_entity_type', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes', + 'body' => 'session_entity_type', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSessionEntityType' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/sessions/*/entityTypes/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSessionEntityType' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/sessions/*/entityTypes/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSessionEntityTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/entityTypes', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSessionEntityType' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}', + 'body' => 'session_entity_type', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', + 'body' => 'session_entity_type', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}', + 'body' => 'session_entity_type', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', + 'body' => 'session_entity_type', + ], + ], + 'placeholders' => [ + 'session_entity_type.name' => [ + 'getters' => [ + 'getSessionEntityType', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_client_config.json new file mode 100644 index 000000000000..4967706e6ba8 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_client_config.json @@ -0,0 +1,74 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.Sessions": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000 + } + }, + "methods": { + "DetectIntent": { + "timeout_millis": 220000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "StreamingDetectIntent": { + "timeout_millis": 220000 + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_descriptor_config.php new file mode 100644 index 000000000000..74682e515ec9 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_descriptor_config.php @@ -0,0 +1,23 @@ + [ + 'google.cloud.dialogflow.v2.Sessions' => [ + 'StreamingDetectIntent' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_rest_client_config.php new file mode 100644 index 000000000000..b7cba0ec4c2e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_rest_client_config.php @@ -0,0 +1,115 @@ + [ + 'google.cloud.dialogflow.v2.Sessions' => [ + 'DetectIntent' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{session=projects/*/agent/sessions/*}:detectIntent', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{session=projects/*/locations/*/agent/sessions/*}:detectIntent', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'session' => [ + 'getters' => [ + 'getSession', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_client_config.json new file mode 100644 index 000000000000..e4e6368ea17f --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.v2.Versions": { + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListVersions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_descriptor_config.php new file mode 100644 index 000000000000..ed6b8a0c3c98 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.cloud.dialogflow.v2.Versions' => [ + 'ListVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVersions', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_rest_client_config.php new file mode 100644 index 000000000000..0fce60904b1d --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_rest_client_config.php @@ -0,0 +1,182 @@ + [ + 'google.cloud.dialogflow.v2.Versions' => [ + 'CreateVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/versions', + 'body' => 'version', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/versions', + 'body' => 'version', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteVersion' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/agent/versions/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/versions/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVersion' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/agent/versions/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/versions/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/agent}/versions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/versions', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateVersion' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{version.name=projects/*/agent/versions/*}', + 'body' => 'version', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{version.name=projects/*/locations/*/agent/versions/*}', + 'body' => 'version', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'version.name' => [ + 'getters' => [ + 'getVersion', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AgentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AgentsClientTest.php new file mode 100644 index 000000000000..1341accc8fb7 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AgentsClientTest.php @@ -0,0 +1,1012 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AgentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AgentsClient($options); + } + + /** @test */ + public function deleteAgentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $gapicClient->deleteAgent($formattedParent); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Agents/DeleteAgent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAgentExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->deleteAgent($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 exportAgentTest() + { + $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/exportAgentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $agentUri2 = 'agentUri21997190245'; + $expectedResponse = new ExportAgentResponse(); + $expectedResponse->setAgentUri($agentUri2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportAgentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $agentUri = 'agentUri-1700713166'; + $response = $gapicClient->exportAgent($formattedParent, $agentUri); + $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.dialogflow.v2.Agents/ExportAgent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAgentUri(); + $this->assertProtobufEquals($agentUri, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportAgentTest'); + $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 exportAgentExceptionTest() + { + $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/exportAgentTest'); + $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->projectName('[PROJECT]'); + $agentUri = 'agentUri-1700713166'; + $response = $gapicClient->exportAgent($formattedParent, $agentUri); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportAgentTest'); + 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 getAgentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $parent2 = 'parent21175163357'; + $displayName = 'displayName1615086568'; + $defaultLanguageCode = 'defaultLanguageCode856575222'; + $timeZone = 'timeZone36848094'; + $description = 'description-1724546052'; + $avatarUri = 'avatarUri-402824826'; + $enableLogging = false; + $classificationThreshold = 1.11581064E8; + $expectedResponse = new Agent(); + $expectedResponse->setParent($parent2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setDescription($description); + $expectedResponse->setAvatarUri($avatarUri); + $expectedResponse->setEnableLogging($enableLogging); + $expectedResponse->setClassificationThreshold($classificationThreshold); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->getAgent($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.dialogflow.v2.Agents/GetAgent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAgentExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->getAgent($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 getValidationResultTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ValidationResult(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->getValidationResult($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.dialogflow.v2.Agents/GetValidationResult', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getValidationResultExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->getValidationResult($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 importAgentTest() + { + $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/importAgentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importAgentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->importAgent($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.dialogflow.v2.Agents/ImportAgent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAgentTest'); + $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 importAgentExceptionTest() + { + $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/importAgentTest'); + $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->projectName('[PROJECT]'); + $response = $gapicClient->importAgent($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAgentTest'); + 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 restoreAgentTest() + { + $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/restoreAgentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/restoreAgentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->restoreAgent($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.dialogflow.v2.Agents/RestoreAgent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreAgentTest'); + $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 restoreAgentExceptionTest() + { + $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/restoreAgentTest'); + $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->projectName('[PROJECT]'); + $response = $gapicClient->restoreAgent($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreAgentTest'); + 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 searchAgentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $agentsElement = new Agent(); + $agents = [ + $agentsElement, + ]; + $expectedResponse = new SearchAgentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAgents($agents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->searchAgents($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAgents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Agents/SearchAgents', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchAgentsExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->searchAgents($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 setAgentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $parent = 'parent-995424086'; + $displayName = 'displayName1615086568'; + $defaultLanguageCode = 'defaultLanguageCode856575222'; + $timeZone = 'timeZone36848094'; + $description = 'description-1724546052'; + $avatarUri = 'avatarUri-402824826'; + $enableLogging = false; + $classificationThreshold = 1.11581064E8; + $expectedResponse = new Agent(); + $expectedResponse->setParent($parent); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setDescription($description); + $expectedResponse->setAvatarUri($avatarUri); + $expectedResponse->setEnableLogging($enableLogging); + $expectedResponse->setClassificationThreshold($classificationThreshold); + $transport->addResponse($expectedResponse); + // Mock request + $agent = new Agent(); + $agentParent = $gapicClient->projectName('[PROJECT]'); + $agent->setParent($agentParent); + $agentDisplayName = 'agentDisplayName2121176616'; + $agent->setDisplayName($agentDisplayName); + $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; + $agent->setDefaultLanguageCode($agentDefaultLanguageCode); + $agentTimeZone = 'agentTimeZone-453669314'; + $agent->setTimeZone($agentTimeZone); + $response = $gapicClient->setAgent($agent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Agents/SetAgent', $actualFuncCall); + $actualValue = $actualRequestObject->getAgent(); + $this->assertProtobufEquals($agent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setAgentExceptionTest() + { + $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 + $agent = new Agent(); + $agentParent = $gapicClient->projectName('[PROJECT]'); + $agent->setParent($agentParent); + $agentDisplayName = 'agentDisplayName2121176616'; + $agent->setDisplayName($agentDisplayName); + $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; + $agent->setDefaultLanguageCode($agentDefaultLanguageCode); + $agentTimeZone = 'agentTimeZone-453669314'; + $agent->setTimeZone($agentTimeZone); + try { + $gapicClient->setAgent($agent); + // 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 trainAgentTest() + { + $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/trainAgentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/trainAgentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->trainAgent($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.dialogflow.v2.Agents/TrainAgent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/trainAgentTest'); + $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 trainAgentExceptionTest() + { + $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/trainAgentTest'); + $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->projectName('[PROJECT]'); + $response = $gapicClient->trainAgent($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/trainAgentTest'); + 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AnswerRecordsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AnswerRecordsClientTest.php new file mode 100644 index 000000000000..804d1c0c9e59 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AnswerRecordsClientTest.php @@ -0,0 +1,322 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AnswerRecordsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AnswerRecordsClient($options); + } + + /** @test */ + public function listAnswerRecordsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $answerRecordsElement = new AnswerRecord(); + $answerRecords = [ + $answerRecordsElement, + ]; + $expectedResponse = new ListAnswerRecordsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAnswerRecords($answerRecords); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listAnswerRecords($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAnswerRecords()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.AnswerRecords/ListAnswerRecords', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAnswerRecordsExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listAnswerRecords($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 updateAnswerRecordTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new AnswerRecord(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $answerRecord = new AnswerRecord(); + $answerRecordAnswerFeedback = new AnswerFeedback(); + $answerRecord->setAnswerFeedback($answerRecordAnswerFeedback); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAnswerRecord($answerRecord, $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.dialogflow.v2.AnswerRecords/UpdateAnswerRecord', $actualFuncCall); + $actualValue = $actualRequestObject->getAnswerRecord(); + $this->assertProtobufEquals($answerRecord, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAnswerRecordExceptionTest() + { + $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 + $answerRecord = new AnswerRecord(); + $answerRecordAnswerFeedback = new AnswerFeedback(); + $answerRecord->setAnswerFeedback($answerRecordAnswerFeedback); + $updateMask = new FieldMask(); + try { + $gapicClient->updateAnswerRecord($answerRecord, $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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ContextsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ContextsClientTest.php new file mode 100644 index 000000000000..e6d0c6a53c64 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ContextsClientTest.php @@ -0,0 +1,565 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ContextsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ContextsClient($options); + } + + /** @test */ + public function createContextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $lifespanCount = 1178775510; + $expectedResponse = new Context(); + $expectedResponse->setName($name); + $expectedResponse->setLifespanCount($lifespanCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $context = new Context(); + $contextName = 'contextName-103041830'; + $context->setName($contextName); + $response = $gapicClient->createContext($formattedParent, $context); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Contexts/CreateContext', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getContext(); + $this->assertProtobufEquals($context, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createContextExceptionTest() + { + $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->sessionName('[PROJECT]', '[SESSION]'); + $context = new Context(); + $contextName = 'contextName-103041830'; + $context->setName($contextName); + try { + $gapicClient->createContext($formattedParent, $context); + // 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 deleteAllContextsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $gapicClient->deleteAllContexts($formattedParent); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Contexts/DeleteAllContexts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAllContextsExceptionTest() + { + $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->sessionName('[PROJECT]', '[SESSION]'); + try { + $gapicClient->deleteAllContexts($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 deleteContextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); + $gapicClient->deleteContext($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Contexts/DeleteContext', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteContextExceptionTest() + { + $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->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); + try { + $gapicClient->deleteContext($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 getContextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $lifespanCount = 1178775510; + $expectedResponse = new Context(); + $expectedResponse->setName($name2); + $expectedResponse->setLifespanCount($lifespanCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); + $response = $gapicClient->getContext($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.dialogflow.v2.Contexts/GetContext', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getContextExceptionTest() + { + $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->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); + try { + $gapicClient->getContext($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 listContextsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $contextsElement = new Context(); + $contexts = [ + $contextsElement, + ]; + $expectedResponse = new ListContextsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setContexts($contexts); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $response = $gapicClient->listContexts($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContexts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Contexts/ListContexts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContextsExceptionTest() + { + $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->sessionName('[PROJECT]', '[SESSION]'); + try { + $gapicClient->listContexts($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 updateContextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $lifespanCount = 1178775510; + $expectedResponse = new Context(); + $expectedResponse->setName($name); + $expectedResponse->setLifespanCount($lifespanCount); + $transport->addResponse($expectedResponse); + // Mock request + $context = new Context(); + $contextName = 'contextName-103041830'; + $context->setName($contextName); + $response = $gapicClient->updateContext($context); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Contexts/UpdateContext', $actualFuncCall); + $actualValue = $actualRequestObject->getContext(); + $this->assertProtobufEquals($context, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateContextExceptionTest() + { + $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 + $context = new Context(); + $contextName = 'contextName-103041830'; + $context->setName($contextName); + try { + $gapicClient->updateContext($context); + // 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationDatasetsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationDatasetsClientTest.php new file mode 100644 index 000000000000..c89e0f1221f4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationDatasetsClientTest.php @@ -0,0 +1,700 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ConversationDatasetsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ConversationDatasetsClient($options); + } + + /** @test */ + public function createConversationDatasetTest() + { + $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/createConversationDatasetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $conversationCount = 1994187347; + $expectedResponse = new ConversationDataset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setConversationCount($conversationCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConversationDatasetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $conversationDataset = new ConversationDataset(); + $conversationDatasetDisplayName = 'conversationDatasetDisplayName-925930312'; + $conversationDataset->setDisplayName($conversationDatasetDisplayName); + $response = $gapicClient->createConversationDataset($parent, $conversationDataset); + $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.dialogflow.v2.ConversationDatasets/CreateConversationDataset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getConversationDataset(); + $this->assertProtobufEquals($conversationDataset, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConversationDatasetTest'); + $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 createConversationDatasetExceptionTest() + { + $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/createConversationDatasetTest'); + $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 + $parent = 'parent-995424086'; + $conversationDataset = new ConversationDataset(); + $conversationDatasetDisplayName = 'conversationDatasetDisplayName-925930312'; + $conversationDataset->setDisplayName($conversationDatasetDisplayName); + $response = $gapicClient->createConversationDataset($parent, $conversationDataset); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConversationDatasetTest'); + 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 deleteConversationDatasetTest() + { + $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/deleteConversationDatasetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteConversationDatasetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); + $response = $gapicClient->deleteConversationDataset($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.dialogflow.v2.ConversationDatasets/DeleteConversationDataset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConversationDatasetTest'); + $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 deleteConversationDatasetExceptionTest() + { + $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/deleteConversationDatasetTest'); + $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->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); + $response = $gapicClient->deleteConversationDataset($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConversationDatasetTest'); + 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 getConversationDatasetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $conversationCount = 1994187347; + $expectedResponse = new ConversationDataset(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setConversationCount($conversationCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); + $response = $gapicClient->getConversationDataset($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.dialogflow.v2.ConversationDatasets/GetConversationDataset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversationDatasetExceptionTest() + { + $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->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); + try { + $gapicClient->getConversationDataset($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 importConversationDataTest() + { + $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/importConversationDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $conversationDataset = 'conversationDataset1344013500'; + $importCount = 1721296907; + $expectedResponse = new ImportConversationDataOperationResponse(); + $expectedResponse->setConversationDataset($conversationDataset); + $expectedResponse->setImportCount($importCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importConversationDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); + $inputConfig = new InputConfig(); + $response = $gapicClient->importConversationData($formattedName, $inputConfig); + $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.dialogflow.v2.ConversationDatasets/ImportConversationData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfig(); + $this->assertProtobufEquals($inputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importConversationDataTest'); + $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 importConversationDataExceptionTest() + { + $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/importConversationDataTest'); + $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->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); + $inputConfig = new InputConfig(); + $response = $gapicClient->importConversationData($formattedName, $inputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importConversationDataTest'); + 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 listConversationDatasetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $conversationDatasetsElement = new ConversationDataset(); + $conversationDatasets = [ + $conversationDatasetsElement, + ]; + $expectedResponse = new ListConversationDatasetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConversationDatasets($conversationDatasets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listConversationDatasets($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConversationDatasets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.ConversationDatasets/ListConversationDatasets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversationDatasetsExceptionTest() + { + $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->listConversationDatasets($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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationModelsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationModelsClientTest.php new file mode 100644 index 000000000000..bd9cb022b550 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationModelsClientTest.php @@ -0,0 +1,1064 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ConversationModelsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ConversationModelsClient($options); + } + + /** @test */ + public function createConversationModelTest() + { + $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/createConversationModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new ConversationModel(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConversationModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $conversationModel = new ConversationModel(); + $conversationModelDisplayName = 'conversationModelDisplayName-1078928857'; + $conversationModel->setDisplayName($conversationModelDisplayName); + $conversationModelDatasets = []; + $conversationModel->setDatasets($conversationModelDatasets); + $response = $gapicClient->createConversationModel($conversationModel); + $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.dialogflow.v2.ConversationModels/CreateConversationModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getConversationModel(); + $this->assertProtobufEquals($conversationModel, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConversationModelTest'); + $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 createConversationModelExceptionTest() + { + $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/createConversationModelTest'); + $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 + $conversationModel = new ConversationModel(); + $conversationModelDisplayName = 'conversationModelDisplayName-1078928857'; + $conversationModel->setDisplayName($conversationModelDisplayName); + $conversationModelDatasets = []; + $conversationModel->setDatasets($conversationModelDatasets); + $response = $gapicClient->createConversationModel($conversationModel); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConversationModelTest'); + 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 createConversationModelEvaluationTest() + { + $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/createConversationModelEvaluationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $rawHumanEvalTemplateCsv = 'rawHumanEvalTemplateCsv-1393080869'; + $expectedResponse = new ConversationModelEvaluation(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRawHumanEvalTemplateCsv($rawHumanEvalTemplateCsv); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConversationModelEvaluationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->conversationModelName('[PROJECT]', '[LOCATION]', '[CONVERSATION_MODEL]'); + $conversationModelEvaluation = new ConversationModelEvaluation(); + $response = $gapicClient->createConversationModelEvaluation($formattedParent, $conversationModelEvaluation); + $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.dialogflow.v2.ConversationModels/CreateConversationModelEvaluation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConversationModelEvaluation(); + $this->assertProtobufEquals($conversationModelEvaluation, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConversationModelEvaluationTest'); + $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 createConversationModelEvaluationExceptionTest() + { + $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/createConversationModelEvaluationTest'); + $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->conversationModelName('[PROJECT]', '[LOCATION]', '[CONVERSATION_MODEL]'); + $conversationModelEvaluation = new ConversationModelEvaluation(); + $response = $gapicClient->createConversationModelEvaluation($formattedParent, $conversationModelEvaluation); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConversationModelEvaluationTest'); + 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 deleteConversationModelTest() + { + $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/deleteConversationModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteConversationModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->deleteConversationModel($name); + $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.dialogflow.v2.ConversationModels/DeleteConversationModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConversationModelTest'); + $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 deleteConversationModelExceptionTest() + { + $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/deleteConversationModelTest'); + $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 + $name = 'name3373707'; + $response = $gapicClient->deleteConversationModel($name); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConversationModelTest'); + 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 deployConversationModelTest() + { + $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/deployConversationModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deployConversationModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->deployConversationModel($name); + $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.dialogflow.v2.ConversationModels/DeployConversationModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployConversationModelTest'); + $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 deployConversationModelExceptionTest() + { + $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/deployConversationModelTest'); + $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 + $name = 'name3373707'; + $response = $gapicClient->deployConversationModel($name); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployConversationModelTest'); + 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 getConversationModelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new ConversationModel(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->getConversationModel($name); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.ConversationModels/GetConversationModel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversationModelExceptionTest() + { + $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 + $name = 'name3373707'; + try { + $gapicClient->getConversationModel($name); + // 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 getConversationModelEvaluationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $rawHumanEvalTemplateCsv = 'rawHumanEvalTemplateCsv-1393080869'; + $expectedResponse = new ConversationModelEvaluation(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRawHumanEvalTemplateCsv($rawHumanEvalTemplateCsv); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->getConversationModelEvaluation($name); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.ConversationModels/GetConversationModelEvaluation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversationModelEvaluationExceptionTest() + { + $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 + $name = 'name3373707'; + try { + $gapicClient->getConversationModelEvaluation($name); + // 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 listConversationModelEvaluationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $conversationModelEvaluationsElement = new ConversationModelEvaluation(); + $conversationModelEvaluations = [ + $conversationModelEvaluationsElement, + ]; + $expectedResponse = new ListConversationModelEvaluationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConversationModelEvaluations($conversationModelEvaluations); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $response = $gapicClient->listConversationModelEvaluations($parent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConversationModelEvaluations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.ConversationModels/ListConversationModelEvaluations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversationModelEvaluationsExceptionTest() + { + $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 + $parent = 'parent-995424086'; + try { + $gapicClient->listConversationModelEvaluations($parent); + // 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 listConversationModelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $conversationModelsElement = new ConversationModel(); + $conversationModels = [ + $conversationModelsElement, + ]; + $expectedResponse = new ListConversationModelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConversationModels($conversationModels); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $response = $gapicClient->listConversationModels($parent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConversationModels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.ConversationModels/ListConversationModels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversationModelsExceptionTest() + { + $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 + $parent = 'parent-995424086'; + try { + $gapicClient->listConversationModels($parent); + // 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 undeployConversationModelTest() + { + $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/undeployConversationModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeployConversationModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->undeployConversationModel($name); + $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.dialogflow.v2.ConversationModels/UndeployConversationModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployConversationModelTest'); + $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 undeployConversationModelExceptionTest() + { + $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/undeployConversationModelTest'); + $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 + $name = 'name3373707'; + $response = $gapicClient->undeployConversationModel($name); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployConversationModelTest'); + 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationProfilesClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationProfilesClientTest.php new file mode 100644 index 000000000000..dd4e641e4a34 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationProfilesClientTest.php @@ -0,0 +1,808 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ConversationProfilesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ConversationProfilesClient($options); + } + + /** @test */ + public function clearSuggestionFeatureConfigTest() + { + $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/clearSuggestionFeatureConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $timeZone = 'timeZone36848094'; + $securitySettings = 'securitySettings-595091902'; + $expectedResponse = new ConversationProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setSecuritySettings($securitySettings); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/clearSuggestionFeatureConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $conversationProfile = 'conversationProfile-408626707'; + $participantRole = Role::ROLE_UNSPECIFIED; + $suggestionFeatureType = Type::TYPE_UNSPECIFIED; + $response = $gapicClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); + $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.dialogflow.v2.ConversationProfiles/ClearSuggestionFeatureConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getConversationProfile(); + $this->assertProtobufEquals($conversationProfile, $actualValue); + $actualValue = $actualApiRequestObject->getParticipantRole(); + $this->assertProtobufEquals($participantRole, $actualValue); + $actualValue = $actualApiRequestObject->getSuggestionFeatureType(); + $this->assertProtobufEquals($suggestionFeatureType, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/clearSuggestionFeatureConfigTest'); + $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 clearSuggestionFeatureConfigExceptionTest() + { + $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/clearSuggestionFeatureConfigTest'); + $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 + $conversationProfile = 'conversationProfile-408626707'; + $participantRole = Role::ROLE_UNSPECIFIED; + $suggestionFeatureType = Type::TYPE_UNSPECIFIED; + $response = $gapicClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/clearSuggestionFeatureConfigTest'); + 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 createConversationProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $timeZone = 'timeZone36848094'; + $securitySettings = 'securitySettings-595091902'; + $expectedResponse = new ConversationProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setSecuritySettings($securitySettings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $conversationProfile = new ConversationProfile(); + $conversationProfileDisplayName = 'conversationProfileDisplayName-203415833'; + $conversationProfile->setDisplayName($conversationProfileDisplayName); + $response = $gapicClient->createConversationProfile($formattedParent, $conversationProfile); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.ConversationProfiles/CreateConversationProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConversationProfile(); + $this->assertProtobufEquals($conversationProfile, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConversationProfileExceptionTest() + { + $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->projectName('[PROJECT]'); + $conversationProfile = new ConversationProfile(); + $conversationProfileDisplayName = 'conversationProfileDisplayName-203415833'; + $conversationProfile->setDisplayName($conversationProfileDisplayName); + try { + $gapicClient->createConversationProfile($formattedParent, $conversationProfile); + // 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 deleteConversationProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); + $gapicClient->deleteConversationProfile($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.ConversationProfiles/DeleteConversationProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConversationProfileExceptionTest() + { + $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->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); + try { + $gapicClient->deleteConversationProfile($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 getConversationProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $timeZone = 'timeZone36848094'; + $securitySettings = 'securitySettings-595091902'; + $expectedResponse = new ConversationProfile(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setSecuritySettings($securitySettings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); + $response = $gapicClient->getConversationProfile($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.dialogflow.v2.ConversationProfiles/GetConversationProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversationProfileExceptionTest() + { + $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->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); + try { + $gapicClient->getConversationProfile($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 listConversationProfilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $conversationProfilesElement = new ConversationProfile(); + $conversationProfiles = [ + $conversationProfilesElement, + ]; + $expectedResponse = new ListConversationProfilesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConversationProfiles($conversationProfiles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listConversationProfiles($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConversationProfiles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.ConversationProfiles/ListConversationProfiles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversationProfilesExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listConversationProfiles($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 setSuggestionFeatureConfigTest() + { + $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/setSuggestionFeatureConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $timeZone = 'timeZone36848094'; + $securitySettings = 'securitySettings-595091902'; + $expectedResponse = new ConversationProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setSecuritySettings($securitySettings); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/setSuggestionFeatureConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $conversationProfile = 'conversationProfile-408626707'; + $participantRole = Role::ROLE_UNSPECIFIED; + $suggestionFeatureConfig = new SuggestionFeatureConfig(); + $response = $gapicClient->setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig); + $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.dialogflow.v2.ConversationProfiles/SetSuggestionFeatureConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getConversationProfile(); + $this->assertProtobufEquals($conversationProfile, $actualValue); + $actualValue = $actualApiRequestObject->getParticipantRole(); + $this->assertProtobufEquals($participantRole, $actualValue); + $actualValue = $actualApiRequestObject->getSuggestionFeatureConfig(); + $this->assertProtobufEquals($suggestionFeatureConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setSuggestionFeatureConfigTest'); + $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 setSuggestionFeatureConfigExceptionTest() + { + $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/setSuggestionFeatureConfigTest'); + $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 + $conversationProfile = 'conversationProfile-408626707'; + $participantRole = Role::ROLE_UNSPECIFIED; + $suggestionFeatureConfig = new SuggestionFeatureConfig(); + $response = $gapicClient->setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setSuggestionFeatureConfigTest'); + 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 updateConversationProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $timeZone = 'timeZone36848094'; + $securitySettings = 'securitySettings-595091902'; + $expectedResponse = new ConversationProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setSecuritySettings($securitySettings); + $transport->addResponse($expectedResponse); + // Mock request + $conversationProfile = new ConversationProfile(); + $conversationProfileDisplayName = 'conversationProfileDisplayName-203415833'; + $conversationProfile->setDisplayName($conversationProfileDisplayName); + $updateMask = new FieldMask(); + $response = $gapicClient->updateConversationProfile($conversationProfile, $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.dialogflow.v2.ConversationProfiles/UpdateConversationProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getConversationProfile(); + $this->assertProtobufEquals($conversationProfile, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateConversationProfileExceptionTest() + { + $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 + $conversationProfile = new ConversationProfile(); + $conversationProfileDisplayName = 'conversationProfileDisplayName-203415833'; + $conversationProfile->setDisplayName($conversationProfileDisplayName); + $updateMask = new FieldMask(); + try { + $gapicClient->updateConversationProfile($conversationProfile, $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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationsClientTest.php new file mode 100644 index 000000000000..a2d88dd95c06 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationsClientTest.php @@ -0,0 +1,579 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ConversationsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ConversationsClient($options); + } + + /** @test */ + public function completeConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $conversationProfile = 'conversationProfile-408626707'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name2); + $expectedResponse->setConversationProfile($conversationProfile); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); + $response = $gapicClient->completeConversation($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.dialogflow.v2.Conversations/CompleteConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeConversationExceptionTest() + { + $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]', '[CONVERSATION]'); + try { + $gapicClient->completeConversation($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 createConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $conversationProfile = 'conversationProfile-408626707'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name); + $expectedResponse->setConversationProfile($conversationProfile); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $conversation = new Conversation(); + $conversationConversationProfile = $gapicClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); + $conversation->setConversationProfile($conversationConversationProfile); + $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.dialogflow.v2.Conversations/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->projectName('[PROJECT]'); + $conversation = new Conversation(); + $conversationConversationProfile = $gapicClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); + $conversation->setConversationProfile($conversationConversationProfile); + 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 getConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $conversationProfile = 'conversationProfile-408626707'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name2); + $expectedResponse->setConversationProfile($conversationProfile); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[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.dialogflow.v2.Conversations/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]', '[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 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->projectName('[PROJECT]'); + $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.dialogflow.v2.Conversations/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->projectName('[PROJECT]'); + 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 listMessagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $messagesElement = new Message(); + $messages = [ + $messagesElement, + ]; + $expectedResponse = new ListMessagesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMessages($messages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); + $response = $gapicClient->listMessages($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMessages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Conversations/ListMessages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMessagesExceptionTest() + { + $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]', '[CONVERSATION]'); + try { + $gapicClient->listMessages($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 suggestConversationSummaryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $latestMessage2 = 'latestMessage2-440913086'; + $contextSize2 = 397491196; + $expectedResponse = new SuggestConversationSummaryResponse(); + $expectedResponse->setLatestMessage($latestMessage2); + $expectedResponse->setContextSize($contextSize2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedConversation = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); + $response = $gapicClient->suggestConversationSummary($formattedConversation); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Conversations/SuggestConversationSummary', $actualFuncCall); + $actualValue = $actualRequestObject->getConversation(); + $this->assertProtobufEquals($formattedConversation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function suggestConversationSummaryExceptionTest() + { + $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 + $formattedConversation = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); + try { + $gapicClient->suggestConversationSummary($formattedConversation); + // 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/DocumentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/DocumentsClientTest.php new file mode 100644 index 000000000000..51ffa88cba99 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/DocumentsClientTest.php @@ -0,0 +1,1109 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DocumentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DocumentsClient($options); + } + + /** @test */ + public function createDocumentTest() + { + $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/createDocumentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $mimeType = 'mimeType-196041627'; + $contentUri = 'contentUri-388807514'; + $enableAutoReload = false; + $expectedResponse = new Document(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setContentUri($contentUri); + $expectedResponse->setEnableAutoReload($enableAutoReload); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDocumentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + $document = new Document(); + $documentDisplayName = 'documentDisplayName-59212206'; + $document->setDisplayName($documentDisplayName); + $documentMimeType = 'documentMimeType1242814409'; + $document->setMimeType($documentMimeType); + $documentKnowledgeTypes = []; + $document->setKnowledgeTypes($documentKnowledgeTypes); + $response = $gapicClient->createDocument($formattedParent, $document); + $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.dialogflow.v2.Documents/CreateDocument', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDocumentTest'); + $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 createDocumentExceptionTest() + { + $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/createDocumentTest'); + $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + $document = new Document(); + $documentDisplayName = 'documentDisplayName-59212206'; + $document->setDisplayName($documentDisplayName); + $documentMimeType = 'documentMimeType1242814409'; + $document->setMimeType($documentMimeType); + $documentKnowledgeTypes = []; + $document->setKnowledgeTypes($documentKnowledgeTypes); + $response = $gapicClient->createDocument($formattedParent, $document); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDocumentTest'); + 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 deleteDocumentTest() + { + $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/deleteDocumentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDocumentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + $response = $gapicClient->deleteDocument($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.dialogflow.v2.Documents/DeleteDocument', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDocumentTest'); + $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 deleteDocumentExceptionTest() + { + $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/deleteDocumentTest'); + $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->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + $response = $gapicClient->deleteDocument($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDocumentTest'); + 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 exportDocumentTest() + { + $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/exportDocumentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $mimeType = 'mimeType-196041627'; + $contentUri = 'contentUri-388807514'; + $enableAutoReload = false; + $expectedResponse = new Document(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setContentUri($contentUri); + $expectedResponse->setEnableAutoReload($enableAutoReload); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDocumentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + $response = $gapicClient->exportDocument($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.dialogflow.v2.Documents/ExportDocument', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDocumentTest'); + $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 exportDocumentExceptionTest() + { + $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/exportDocumentTest'); + $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->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + $response = $gapicClient->exportDocument($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDocumentTest'); + 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 getDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $mimeType = 'mimeType-196041627'; + $contentUri = 'contentUri-388807514'; + $enableAutoReload = false; + $expectedResponse = new Document(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setContentUri($contentUri); + $expectedResponse->setEnableAutoReload($enableAutoReload); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + $response = $gapicClient->getDocument($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.dialogflow.v2.Documents/GetDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDocumentExceptionTest() + { + $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->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + try { + $gapicClient->getDocument($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 importDocumentsTest() + { + $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/importDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportDocumentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + $documentTemplate = new ImportDocumentTemplate(); + $documentTemplateMimeType = 'documentTemplateMimeType-1300921501'; + $documentTemplate->setMimeType($documentTemplateMimeType); + $documentTemplateKnowledgeTypes = []; + $documentTemplate->setKnowledgeTypes($documentTemplateKnowledgeTypes); + $response = $gapicClient->importDocuments($formattedParent, $documentTemplate); + $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.dialogflow.v2.Documents/ImportDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDocumentTemplate(); + $this->assertProtobufEquals($documentTemplate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + $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 importDocumentsExceptionTest() + { + $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/importDocumentsTest'); + $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + $documentTemplate = new ImportDocumentTemplate(); + $documentTemplateMimeType = 'documentTemplateMimeType-1300921501'; + $documentTemplate->setMimeType($documentTemplateMimeType); + $documentTemplateKnowledgeTypes = []; + $documentTemplate->setKnowledgeTypes($documentTemplateKnowledgeTypes); + $response = $gapicClient->importDocuments($formattedParent, $documentTemplate); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + 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 listDocumentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $documentsElement = new Document(); + $documents = [ + $documentsElement, + ]; + $expectedResponse = new ListDocumentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDocuments($documents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + $response = $gapicClient->listDocuments($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Documents/ListDocuments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDocumentsExceptionTest() + { + $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + try { + $gapicClient->listDocuments($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 reloadDocumentTest() + { + $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/reloadDocumentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $mimeType = 'mimeType-196041627'; + $contentUri2 = 'contentUri218136793'; + $enableAutoReload = false; + $expectedResponse = new Document(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setContentUri($contentUri2); + $expectedResponse->setEnableAutoReload($enableAutoReload); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reloadDocumentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + $response = $gapicClient->reloadDocument($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.dialogflow.v2.Documents/ReloadDocument', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reloadDocumentTest'); + $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 reloadDocumentExceptionTest() + { + $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/reloadDocumentTest'); + $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->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); + $response = $gapicClient->reloadDocument($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reloadDocumentTest'); + 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 updateDocumentTest() + { + $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/updateDocumentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $mimeType = 'mimeType-196041627'; + $contentUri = 'contentUri-388807514'; + $enableAutoReload = false; + $expectedResponse = new Document(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setContentUri($contentUri); + $expectedResponse->setEnableAutoReload($enableAutoReload); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDocumentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $document = new Document(); + $documentDisplayName = 'documentDisplayName-59212206'; + $document->setDisplayName($documentDisplayName); + $documentMimeType = 'documentMimeType1242814409'; + $document->setMimeType($documentMimeType); + $documentKnowledgeTypes = []; + $document->setKnowledgeTypes($documentKnowledgeTypes); + $response = $gapicClient->updateDocument($document); + $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.dialogflow.v2.Documents/UpdateDocument', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDocumentTest'); + $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 updateDocumentExceptionTest() + { + $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/updateDocumentTest'); + $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 + $document = new Document(); + $documentDisplayName = 'documentDisplayName-59212206'; + $document->setDisplayName($documentDisplayName); + $documentMimeType = 'documentMimeType1242814409'; + $document->setMimeType($documentMimeType); + $documentKnowledgeTypes = []; + $document->setKnowledgeTypes($documentKnowledgeTypes); + $response = $gapicClient->updateDocument($document); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDocumentTest'); + 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EntityTypesClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EntityTypesClientTest.php new file mode 100644 index 000000000000..fe5f669b489e --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EntityTypesClientTest.php @@ -0,0 +1,1129 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EntityTypesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EntityTypesClient($options); + } + + /** @test */ + public function batchCreateEntitiesTest() + { + $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/batchCreateEntitiesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchCreateEntitiesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $entities = []; + $response = $gapicClient->batchCreateEntities($formattedParent, $entities); + $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.dialogflow.v2.EntityTypes/BatchCreateEntities', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEntities(); + $this->assertProtobufEquals($entities, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchCreateEntitiesTest'); + $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 batchCreateEntitiesExceptionTest() + { + $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/batchCreateEntitiesTest'); + $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $entities = []; + $response = $gapicClient->batchCreateEntities($formattedParent, $entities); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchCreateEntitiesTest'); + 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 batchDeleteEntitiesTest() + { + $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/batchDeleteEntitiesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchDeleteEntitiesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $entityValues = []; + $response = $gapicClient->batchDeleteEntities($formattedParent, $entityValues); + $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.dialogflow.v2.EntityTypes/BatchDeleteEntities', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEntityValues(); + $this->assertProtobufEquals($entityValues, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchDeleteEntitiesTest'); + $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 batchDeleteEntitiesExceptionTest() + { + $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/batchDeleteEntitiesTest'); + $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $entityValues = []; + $response = $gapicClient->batchDeleteEntities($formattedParent, $entityValues); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchDeleteEntitiesTest'); + 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 batchDeleteEntityTypesTest() + { + $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/batchDeleteEntityTypesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchDeleteEntityTypesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $entityTypeNames = []; + $response = $gapicClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); + $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.dialogflow.v2.EntityTypes/BatchDeleteEntityTypes', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEntityTypeNames(); + $this->assertProtobufEquals($entityTypeNames, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchDeleteEntityTypesTest'); + $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 batchDeleteEntityTypesExceptionTest() + { + $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/batchDeleteEntityTypesTest'); + $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->agentName('[PROJECT]'); + $entityTypeNames = []; + $response = $gapicClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchDeleteEntityTypesTest'); + 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 batchUpdateEntitiesTest() + { + $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/batchUpdateEntitiesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchUpdateEntitiesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $entities = []; + $response = $gapicClient->batchUpdateEntities($formattedParent, $entities); + $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.dialogflow.v2.EntityTypes/BatchUpdateEntities', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEntities(); + $this->assertProtobufEquals($entities, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchUpdateEntitiesTest'); + $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 batchUpdateEntitiesExceptionTest() + { + $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/batchUpdateEntitiesTest'); + $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $entities = []; + $response = $gapicClient->batchUpdateEntities($formattedParent, $entities); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchUpdateEntitiesTest'); + 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 batchUpdateEntityTypesTest() + { + $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/batchUpdateEntityTypesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchUpdateEntityTypesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchUpdateEntityTypesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $response = $gapicClient->batchUpdateEntityTypes($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.dialogflow.v2.EntityTypes/BatchUpdateEntityTypes', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchUpdateEntityTypesTest'); + $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 batchUpdateEntityTypesExceptionTest() + { + $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/batchUpdateEntityTypesTest'); + $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->agentName('[PROJECT]'); + $response = $gapicClient->batchUpdateEntityTypes($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchUpdateEntityTypesTest'); + 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 createEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $enableFuzzyExtraction = true; + $expectedResponse = new EntityType(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $entityType = new EntityType(); + $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; + $entityType->setDisplayName($entityTypeDisplayName); + $entityTypeKind = Kind::KIND_UNSPECIFIED; + $entityType->setKind($entityTypeKind); + $response = $gapicClient->createEntityType($formattedParent, $entityType); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.EntityTypes/CreateEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntityType(); + $this->assertProtobufEquals($entityType, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntityTypeExceptionTest() + { + $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->agentName('[PROJECT]'); + $entityType = new EntityType(); + $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; + $entityType->setDisplayName($entityTypeDisplayName); + $entityTypeKind = Kind::KIND_UNSPECIFIED; + $entityType->setKind($entityTypeKind); + try { + $gapicClient->createEntityType($formattedParent, $entityType); + // 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 deleteEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $gapicClient->deleteEntityType($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.EntityTypes/DeleteEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntityTypeExceptionTest() + { + $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + try { + $gapicClient->deleteEntityType($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 getEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $enableFuzzyExtraction = true; + $expectedResponse = new EntityType(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + $response = $gapicClient->getEntityType($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.dialogflow.v2.EntityTypes/GetEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntityTypeExceptionTest() + { + $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); + try { + $gapicClient->getEntityType($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 listEntityTypesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $entityTypesElement = new EntityType(); + $entityTypes = [ + $entityTypesElement, + ]; + $expectedResponse = new ListEntityTypesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntityTypes($entityTypes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $response = $gapicClient->listEntityTypes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntityTypes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.EntityTypes/ListEntityTypes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntityTypesExceptionTest() + { + $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->agentName('[PROJECT]'); + try { + $gapicClient->listEntityTypes($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 updateEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $enableFuzzyExtraction = true; + $expectedResponse = new EntityType(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); + $transport->addResponse($expectedResponse); + // Mock request + $entityType = new EntityType(); + $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; + $entityType->setDisplayName($entityTypeDisplayName); + $entityTypeKind = Kind::KIND_UNSPECIFIED; + $entityType->setKind($entityTypeKind); + $response = $gapicClient->updateEntityType($entityType); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.EntityTypes/UpdateEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getEntityType(); + $this->assertProtobufEquals($entityType, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntityTypeExceptionTest() + { + $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 + $entityType = new EntityType(); + $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; + $entityType->setDisplayName($entityTypeDisplayName); + $entityTypeKind = Kind::KIND_UNSPECIFIED; + $entityType->setKind($entityTypeKind); + try { + $gapicClient->updateEntityType($entityType); + // 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EnvironmentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EnvironmentsClientTest.php new file mode 100644 index 000000000000..82413ceeb063 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EnvironmentsClientTest.php @@ -0,0 +1,587 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EnvironmentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EnvironmentsClient($options); + } + + /** @test */ + public function createEnvironmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $agentVersion = 'agentVersion-26267234'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAgentVersion($agentVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $environment = new Environment(); + $environmentId = 'environmentId608412359'; + $response = $gapicClient->createEnvironment($formattedParent, $environment, $environmentId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Environments/CreateEnvironment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $actualValue = $actualRequestObject->getEnvironmentId(); + $this->assertProtobufEquals($environmentId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEnvironmentExceptionTest() + { + $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->agentName('[PROJECT]'); + $environment = new Environment(); + $environmentId = 'environmentId608412359'; + try { + $gapicClient->createEnvironment($formattedParent, $environment, $environmentId); + // 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 deleteEnvironmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); + $gapicClient->deleteEnvironment($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Environments/DeleteEnvironment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEnvironmentExceptionTest() + { + $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->environmentName('[PROJECT]', '[ENVIRONMENT]'); + try { + $gapicClient->deleteEnvironment($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 getEnvironmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $agentVersion = 'agentVersion-26267234'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAgentVersion($agentVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); + $response = $gapicClient->getEnvironment($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.dialogflow.v2.Environments/GetEnvironment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEnvironmentExceptionTest() + { + $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->environmentName('[PROJECT]', '[ENVIRONMENT]'); + try { + $gapicClient->getEnvironment($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 getEnvironmentHistoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $parent2 = 'parent21175163357'; + $nextPageToken = ''; + $entriesElement = new Entry(); + $entries = [ + $entriesElement, + ]; + $expectedResponse = new EnvironmentHistory(); + $expectedResponse->setParent($parent2); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntries($entries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); + $response = $gapicClient->getEnvironmentHistory($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Environments/GetEnvironmentHistory', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEnvironmentHistoryExceptionTest() + { + $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->environmentName('[PROJECT]', '[ENVIRONMENT]'); + try { + $gapicClient->getEnvironmentHistory($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 listEnvironmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $environmentsElement = new Environment(); + $environments = [ + $environmentsElement, + ]; + $expectedResponse = new ListEnvironmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEnvironments($environments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $response = $gapicClient->listEnvironments($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Environments/ListEnvironments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEnvironmentsExceptionTest() + { + $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->agentName('[PROJECT]'); + try { + $gapicClient->listEnvironments($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 updateEnvironmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $agentVersion = 'agentVersion-26267234'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAgentVersion($agentVersion); + $transport->addResponse($expectedResponse); + // Mock request + $environment = new Environment(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateEnvironment($environment, $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.dialogflow.v2.Environments/UpdateEnvironment', $actualFuncCall); + $actualValue = $actualRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEnvironmentExceptionTest() + { + $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 + $environment = new Environment(); + $updateMask = new FieldMask(); + try { + $gapicClient->updateEnvironment($environment, $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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/FulfillmentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/FulfillmentsClientTest.php new file mode 100644 index 000000000000..7a9fdc6fd390 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/FulfillmentsClientTest.php @@ -0,0 +1,320 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FulfillmentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FulfillmentsClient($options); + } + + /** @test */ + public function getFulfillmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $enabled = false; + $expectedResponse = new Fulfillment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnabled($enabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->fulfillmentName('[PROJECT]'); + $response = $gapicClient->getFulfillment($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.dialogflow.v2.Fulfillments/GetFulfillment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFulfillmentExceptionTest() + { + $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->fulfillmentName('[PROJECT]'); + try { + $gapicClient->getFulfillment($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 updateFulfillmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $enabled = false; + $expectedResponse = new Fulfillment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnabled($enabled); + $transport->addResponse($expectedResponse); + // Mock request + $fulfillment = new Fulfillment(); + $fulfillmentName = 'fulfillmentName1097998729'; + $fulfillment->setName($fulfillmentName); + $updateMask = new FieldMask(); + $response = $gapicClient->updateFulfillment($fulfillment, $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.dialogflow.v2.Fulfillments/UpdateFulfillment', $actualFuncCall); + $actualValue = $actualRequestObject->getFulfillment(); + $this->assertProtobufEquals($fulfillment, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateFulfillmentExceptionTest() + { + $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 + $fulfillment = new Fulfillment(); + $fulfillmentName = 'fulfillmentName1097998729'; + $fulfillment->setName($fulfillmentName); + $updateMask = new FieldMask(); + try { + $gapicClient->updateFulfillment($fulfillment, $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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/IntentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/IntentsClientTest.php new file mode 100644 index 000000000000..6ed657d29084 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/IntentsClientTest.php @@ -0,0 +1,805 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return IntentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new IntentsClient($options); + } + + /** @test */ + public function batchDeleteIntentsTest() + { + $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/batchDeleteIntentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchDeleteIntentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $intents = []; + $response = $gapicClient->batchDeleteIntents($formattedParent, $intents); + $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.dialogflow.v2.Intents/BatchDeleteIntents', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIntents(); + $this->assertProtobufEquals($intents, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchDeleteIntentsTest'); + $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 batchDeleteIntentsExceptionTest() + { + $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/batchDeleteIntentsTest'); + $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->agentName('[PROJECT]'); + $intents = []; + $response = $gapicClient->batchDeleteIntents($formattedParent, $intents); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchDeleteIntentsTest'); + 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 batchUpdateIntentsTest() + { + $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/batchUpdateIntentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchUpdateIntentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchUpdateIntentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $response = $gapicClient->batchUpdateIntents($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.dialogflow.v2.Intents/BatchUpdateIntents', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchUpdateIntentsTest'); + $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 batchUpdateIntentsExceptionTest() + { + $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/batchUpdateIntentsTest'); + $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->agentName('[PROJECT]'); + $response = $gapicClient->batchUpdateIntents($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchUpdateIntentsTest'); + 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 createIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $priority = 1165461084; + $isFallback = false; + $mlDisabled = true; + $liveAgentHandoff = false; + $endInteraction = true; + $action = 'action-1422950858'; + $resetContexts = true; + $rootFollowupIntentName = 'rootFollowupIntentName402253784'; + $parentFollowupIntentName = 'parentFollowupIntentName-1131901680'; + $expectedResponse = new Intent(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setPriority($priority); + $expectedResponse->setIsFallback($isFallback); + $expectedResponse->setMlDisabled($mlDisabled); + $expectedResponse->setLiveAgentHandoff($liveAgentHandoff); + $expectedResponse->setEndInteraction($endInteraction); + $expectedResponse->setAction($action); + $expectedResponse->setResetContexts($resetContexts); + $expectedResponse->setRootFollowupIntentName($rootFollowupIntentName); + $expectedResponse->setParentFollowupIntentName($parentFollowupIntentName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $intent = new Intent(); + $intentDisplayName = 'intentDisplayName-1733865935'; + $intent->setDisplayName($intentDisplayName); + $response = $gapicClient->createIntent($formattedParent, $intent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Intents/CreateIntent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getIntent(); + $this->assertProtobufEquals($intent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createIntentExceptionTest() + { + $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->agentName('[PROJECT]'); + $intent = new Intent(); + $intentDisplayName = 'intentDisplayName-1733865935'; + $intent->setDisplayName($intentDisplayName); + try { + $gapicClient->createIntent($formattedParent, $intent); + // 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 deleteIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->intentName('[PROJECT]', '[INTENT]'); + $gapicClient->deleteIntent($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Intents/DeleteIntent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteIntentExceptionTest() + { + $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->intentName('[PROJECT]', '[INTENT]'); + try { + $gapicClient->deleteIntent($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 getIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $priority = 1165461084; + $isFallback = false; + $mlDisabled = true; + $liveAgentHandoff = false; + $endInteraction = true; + $action = 'action-1422950858'; + $resetContexts = true; + $rootFollowupIntentName = 'rootFollowupIntentName402253784'; + $parentFollowupIntentName = 'parentFollowupIntentName-1131901680'; + $expectedResponse = new Intent(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setPriority($priority); + $expectedResponse->setIsFallback($isFallback); + $expectedResponse->setMlDisabled($mlDisabled); + $expectedResponse->setLiveAgentHandoff($liveAgentHandoff); + $expectedResponse->setEndInteraction($endInteraction); + $expectedResponse->setAction($action); + $expectedResponse->setResetContexts($resetContexts); + $expectedResponse->setRootFollowupIntentName($rootFollowupIntentName); + $expectedResponse->setParentFollowupIntentName($parentFollowupIntentName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->intentName('[PROJECT]', '[INTENT]'); + $response = $gapicClient->getIntent($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.dialogflow.v2.Intents/GetIntent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIntentExceptionTest() + { + $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->intentName('[PROJECT]', '[INTENT]'); + try { + $gapicClient->getIntent($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 listIntentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $intentsElement = new Intent(); + $intents = [ + $intentsElement, + ]; + $expectedResponse = new ListIntentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIntents($intents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $response = $gapicClient->listIntents($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIntents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Intents/ListIntents', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIntentsExceptionTest() + { + $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->agentName('[PROJECT]'); + try { + $gapicClient->listIntents($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 updateIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $priority = 1165461084; + $isFallback = false; + $mlDisabled = true; + $liveAgentHandoff = false; + $endInteraction = true; + $action = 'action-1422950858'; + $resetContexts = true; + $rootFollowupIntentName = 'rootFollowupIntentName402253784'; + $parentFollowupIntentName = 'parentFollowupIntentName-1131901680'; + $expectedResponse = new Intent(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setPriority($priority); + $expectedResponse->setIsFallback($isFallback); + $expectedResponse->setMlDisabled($mlDisabled); + $expectedResponse->setLiveAgentHandoff($liveAgentHandoff); + $expectedResponse->setEndInteraction($endInteraction); + $expectedResponse->setAction($action); + $expectedResponse->setResetContexts($resetContexts); + $expectedResponse->setRootFollowupIntentName($rootFollowupIntentName); + $expectedResponse->setParentFollowupIntentName($parentFollowupIntentName); + $transport->addResponse($expectedResponse); + // Mock request + $intent = new Intent(); + $intentDisplayName = 'intentDisplayName-1733865935'; + $intent->setDisplayName($intentDisplayName); + $response = $gapicClient->updateIntent($intent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Intents/UpdateIntent', $actualFuncCall); + $actualValue = $actualRequestObject->getIntent(); + $this->assertProtobufEquals($intent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateIntentExceptionTest() + { + $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 + $intent = new Intent(); + $intentDisplayName = 'intentDisplayName-1733865935'; + $intent->setDisplayName($intentDisplayName); + try { + $gapicClient->updateIntent($intent); + // 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/KnowledgeBasesClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/KnowledgeBasesClientTest.php new file mode 100644 index 000000000000..3169e40de146 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/KnowledgeBasesClientTest.php @@ -0,0 +1,514 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return KnowledgeBasesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new KnowledgeBasesClient($options); + } + + /** @test */ + public function createKnowledgeBaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new KnowledgeBase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $knowledgeBase = new KnowledgeBase(); + $knowledgeBaseDisplayName = 'knowledgeBaseDisplayName881802878'; + $knowledgeBase->setDisplayName($knowledgeBaseDisplayName); + $response = $gapicClient->createKnowledgeBase($formattedParent, $knowledgeBase); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.KnowledgeBases/CreateKnowledgeBase', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getKnowledgeBase(); + $this->assertProtobufEquals($knowledgeBase, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createKnowledgeBaseExceptionTest() + { + $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->projectName('[PROJECT]'); + $knowledgeBase = new KnowledgeBase(); + $knowledgeBaseDisplayName = 'knowledgeBaseDisplayName881802878'; + $knowledgeBase->setDisplayName($knowledgeBaseDisplayName); + try { + $gapicClient->createKnowledgeBase($formattedParent, $knowledgeBase); + // 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 deleteKnowledgeBaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + $gapicClient->deleteKnowledgeBase($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.KnowledgeBases/DeleteKnowledgeBase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteKnowledgeBaseExceptionTest() + { + $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + try { + $gapicClient->deleteKnowledgeBase($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 getKnowledgeBaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new KnowledgeBase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + $response = $gapicClient->getKnowledgeBase($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.dialogflow.v2.KnowledgeBases/GetKnowledgeBase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKnowledgeBaseExceptionTest() + { + $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); + try { + $gapicClient->getKnowledgeBase($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 listKnowledgeBasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $knowledgeBasesElement = new KnowledgeBase(); + $knowledgeBases = [ + $knowledgeBasesElement, + ]; + $expectedResponse = new ListKnowledgeBasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setKnowledgeBases($knowledgeBases); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listKnowledgeBases($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getKnowledgeBases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.KnowledgeBases/ListKnowledgeBases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKnowledgeBasesExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listKnowledgeBases($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 updateKnowledgeBaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new KnowledgeBase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $knowledgeBase = new KnowledgeBase(); + $knowledgeBaseDisplayName = 'knowledgeBaseDisplayName881802878'; + $knowledgeBase->setDisplayName($knowledgeBaseDisplayName); + $response = $gapicClient->updateKnowledgeBase($knowledgeBase); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.KnowledgeBases/UpdateKnowledgeBase', $actualFuncCall); + $actualValue = $actualRequestObject->getKnowledgeBase(); + $this->assertProtobufEquals($knowledgeBase, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateKnowledgeBaseExceptionTest() + { + $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 + $knowledgeBase = new KnowledgeBase(); + $knowledgeBaseDisplayName = 'knowledgeBaseDisplayName881802878'; + $knowledgeBase->setDisplayName($knowledgeBaseDisplayName); + try { + $gapicClient->updateKnowledgeBase($knowledgeBase); + // 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ParticipantsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ParticipantsClientTest.php new file mode 100644 index 000000000000..743e23e02211 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ParticipantsClientTest.php @@ -0,0 +1,806 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ParticipantsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ParticipantsClient($options); + } + + /** @test */ + public function analyzeContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $replyText = 'replyText-549180062'; + $expectedResponse = new AnalyzeContentResponse(); + $expectedResponse->setReplyText($replyText); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParticipant = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + $response = $gapicClient->analyzeContent($formattedParticipant); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Participants/AnalyzeContent', $actualFuncCall); + $actualValue = $actualRequestObject->getParticipant(); + $this->assertProtobufEquals($formattedParticipant, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeContentExceptionTest() + { + $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 + $formattedParticipant = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + try { + $gapicClient->analyzeContent($formattedParticipant); + // 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 createParticipantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $sipRecordingMediaLabel = 'sipRecordingMediaLabel-1522741274'; + $obfuscatedExternalUserId = 'obfuscatedExternalUserId-263618122'; + $expectedResponse = new Participant(); + $expectedResponse->setName($name); + $expectedResponse->setSipRecordingMediaLabel($sipRecordingMediaLabel); + $expectedResponse->setObfuscatedExternalUserId($obfuscatedExternalUserId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); + $participant = new Participant(); + $response = $gapicClient->createParticipant($formattedParent, $participant); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Participants/CreateParticipant', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getParticipant(); + $this->assertProtobufEquals($participant, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createParticipantExceptionTest() + { + $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]', '[CONVERSATION]'); + $participant = new Participant(); + try { + $gapicClient->createParticipant($formattedParent, $participant); + // 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 getParticipantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sipRecordingMediaLabel = 'sipRecordingMediaLabel-1522741274'; + $obfuscatedExternalUserId = 'obfuscatedExternalUserId-263618122'; + $expectedResponse = new Participant(); + $expectedResponse->setName($name2); + $expectedResponse->setSipRecordingMediaLabel($sipRecordingMediaLabel); + $expectedResponse->setObfuscatedExternalUserId($obfuscatedExternalUserId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + $response = $gapicClient->getParticipant($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.dialogflow.v2.Participants/GetParticipant', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getParticipantExceptionTest() + { + $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->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + try { + $gapicClient->getParticipant($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 listParticipantsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $participantsElement = new Participant(); + $participants = [ + $participantsElement, + ]; + $expectedResponse = new ListParticipantsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setParticipants($participants); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); + $response = $gapicClient->listParticipants($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getParticipants()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Participants/ListParticipants', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listParticipantsExceptionTest() + { + $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]', '[CONVERSATION]'); + try { + $gapicClient->listParticipants($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 streamingAnalyzeContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $replyText = 'replyText-549180062'; + $expectedResponse = new StreamingAnalyzeContentResponse(); + $expectedResponse->setReplyText($replyText); + $transport->addResponse($expectedResponse); + $replyText2 = 'replyText2518940821'; + $expectedResponse2 = new StreamingAnalyzeContentResponse(); + $expectedResponse2->setReplyText($replyText2); + $transport->addResponse($expectedResponse2); + $replyText3 = 'replyText3518940822'; + $expectedResponse3 = new StreamingAnalyzeContentResponse(); + $expectedResponse3->setReplyText($replyText3); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedParticipant = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + $request = new StreamingAnalyzeContentRequest(); + $request->setParticipant($formattedParticipant); + $formattedParticipant2 = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + $request2 = new StreamingAnalyzeContentRequest(); + $request2->setParticipant($formattedParticipant2); + $formattedParticipant3 = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + $request3 = new StreamingAnalyzeContentRequest(); + $request3->setParticipant($formattedParticipant3); + $bidi = $gapicClient->streamingAnalyzeContent(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Participants/StreamingAnalyzeContent', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function streamingAnalyzeContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $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->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->streamingAnalyzeContent(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream 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 suggestArticlesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $latestMessage2 = 'latestMessage2-440913086'; + $contextSize2 = 397491196; + $expectedResponse = new SuggestArticlesResponse(); + $expectedResponse->setLatestMessage($latestMessage2); + $expectedResponse->setContextSize($contextSize2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + $response = $gapicClient->suggestArticles($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.dialogflow.v2.Participants/SuggestArticles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function suggestArticlesExceptionTest() + { + $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->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + try { + $gapicClient->suggestArticles($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 suggestFaqAnswersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $latestMessage2 = 'latestMessage2-440913086'; + $contextSize2 = 397491196; + $expectedResponse = new SuggestFaqAnswersResponse(); + $expectedResponse->setLatestMessage($latestMessage2); + $expectedResponse->setContextSize($contextSize2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + $response = $gapicClient->suggestFaqAnswers($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.dialogflow.v2.Participants/SuggestFaqAnswers', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function suggestFaqAnswersExceptionTest() + { + $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->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + try { + $gapicClient->suggestFaqAnswers($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 suggestSmartRepliesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $latestMessage2 = 'latestMessage2-440913086'; + $contextSize2 = 397491196; + $expectedResponse = new SuggestSmartRepliesResponse(); + $expectedResponse->setLatestMessage($latestMessage2); + $expectedResponse->setContextSize($contextSize2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + $response = $gapicClient->suggestSmartReplies($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.dialogflow.v2.Participants/SuggestSmartReplies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function suggestSmartRepliesExceptionTest() + { + $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->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); + try { + $gapicClient->suggestSmartReplies($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 updateParticipantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $sipRecordingMediaLabel = 'sipRecordingMediaLabel-1522741274'; + $obfuscatedExternalUserId = 'obfuscatedExternalUserId-263618122'; + $expectedResponse = new Participant(); + $expectedResponse->setName($name); + $expectedResponse->setSipRecordingMediaLabel($sipRecordingMediaLabel); + $expectedResponse->setObfuscatedExternalUserId($obfuscatedExternalUserId); + $transport->addResponse($expectedResponse); + // Mock request + $participant = new Participant(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateParticipant($participant, $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.dialogflow.v2.Participants/UpdateParticipant', $actualFuncCall); + $actualValue = $actualRequestObject->getParticipant(); + $this->assertProtobufEquals($participant, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateParticipantExceptionTest() + { + $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 + $participant = new Participant(); + $updateMask = new FieldMask(); + try { + $gapicClient->updateParticipant($participant, $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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionEntityTypesClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionEntityTypesClientTest.php new file mode 100644 index 000000000000..66fa4a84a586 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionEntityTypesClientTest.php @@ -0,0 +1,519 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SessionEntityTypesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SessionEntityTypesClient($options); + } + + /** @test */ + public function createSessionEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new SessionEntityType(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $sessionEntityType = new SessionEntityType(); + $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; + $sessionEntityType->setName($sessionEntityTypeName); + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); + $sessionEntityTypeEntities = []; + $sessionEntityType->setEntities($sessionEntityTypeEntities); + $response = $gapicClient->createSessionEntityType($formattedParent, $sessionEntityType); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.SessionEntityTypes/CreateSessionEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSessionEntityType(); + $this->assertProtobufEquals($sessionEntityType, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSessionEntityTypeExceptionTest() + { + $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->sessionName('[PROJECT]', '[SESSION]'); + $sessionEntityType = new SessionEntityType(); + $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; + $sessionEntityType->setName($sessionEntityTypeName); + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); + $sessionEntityTypeEntities = []; + $sessionEntityType->setEntities($sessionEntityTypeEntities); + try { + $gapicClient->createSessionEntityType($formattedParent, $sessionEntityType); + // 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 deleteSessionEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); + $gapicClient->deleteSessionEntityType($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.SessionEntityTypes/DeleteSessionEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSessionEntityTypeExceptionTest() + { + $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->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); + try { + $gapicClient->deleteSessionEntityType($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 getSessionEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new SessionEntityType(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); + $response = $gapicClient->getSessionEntityType($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.dialogflow.v2.SessionEntityTypes/GetSessionEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSessionEntityTypeExceptionTest() + { + $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->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); + try { + $gapicClient->getSessionEntityType($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 listSessionEntityTypesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sessionEntityTypesElement = new SessionEntityType(); + $sessionEntityTypes = [ + $sessionEntityTypesElement, + ]; + $expectedResponse = new ListSessionEntityTypesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSessionEntityTypes($sessionEntityTypes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $response = $gapicClient->listSessionEntityTypes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSessionEntityTypes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.SessionEntityTypes/ListSessionEntityTypes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSessionEntityTypesExceptionTest() + { + $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->sessionName('[PROJECT]', '[SESSION]'); + try { + $gapicClient->listSessionEntityTypes($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 updateSessionEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new SessionEntityType(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $sessionEntityType = new SessionEntityType(); + $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; + $sessionEntityType->setName($sessionEntityTypeName); + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); + $sessionEntityTypeEntities = []; + $sessionEntityType->setEntities($sessionEntityTypeEntities); + $response = $gapicClient->updateSessionEntityType($sessionEntityType); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.SessionEntityTypes/UpdateSessionEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getSessionEntityType(); + $this->assertProtobufEquals($sessionEntityType, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSessionEntityTypeExceptionTest() + { + $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 + $sessionEntityType = new SessionEntityType(); + $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; + $sessionEntityType->setName($sessionEntityTypeName); + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); + $sessionEntityTypeEntities = []; + $sessionEntityType->setEntities($sessionEntityTypeEntities); + try { + $gapicClient->updateSessionEntityType($sessionEntityType); + // 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionsClientTest.php new file mode 100644 index 000000000000..d8b818a6bb74 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionsClientTest.php @@ -0,0 +1,365 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SessionsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SessionsClient($options); + } + + /** @test */ + public function detectIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $responseId = 'responseId1847552473'; + $outputAudio = '24'; + $expectedResponse = new DetectIntentResponse(); + $expectedResponse->setResponseId($responseId); + $expectedResponse->setOutputAudio($outputAudio); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSession = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $queryInput = new QueryInput(); + $response = $gapicClient->detectIntent($formattedSession, $queryInput); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Sessions/DetectIntent', $actualFuncCall); + $actualValue = $actualRequestObject->getSession(); + $this->assertProtobufEquals($formattedSession, $actualValue); + $actualValue = $actualRequestObject->getQueryInput(); + $this->assertProtobufEquals($queryInput, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function detectIntentExceptionTest() + { + $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 + $formattedSession = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $queryInput = new QueryInput(); + try { + $gapicClient->detectIntent($formattedSession, $queryInput); + // 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 streamingDetectIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $responseId = 'responseId1847552473'; + $outputAudio = '24'; + $expectedResponse = new StreamingDetectIntentResponse(); + $expectedResponse->setResponseId($responseId); + $expectedResponse->setOutputAudio($outputAudio); + $transport->addResponse($expectedResponse); + $responseId2 = 'responseId21676436300'; + $outputAudio2 = '-53'; + $expectedResponse2 = new StreamingDetectIntentResponse(); + $expectedResponse2->setResponseId($responseId2); + $expectedResponse2->setOutputAudio($outputAudio2); + $transport->addResponse($expectedResponse2); + $responseId3 = 'responseId31676436301'; + $outputAudio3 = '-52'; + $expectedResponse3 = new StreamingDetectIntentResponse(); + $expectedResponse3->setResponseId($responseId3); + $expectedResponse3->setOutputAudio($outputAudio3); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedSession = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $queryInput = new QueryInput(); + $request = new StreamingDetectIntentRequest(); + $request->setSession($formattedSession); + $request->setQueryInput($queryInput); + $formattedSession2 = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $queryInput2 = new QueryInput(); + $request2 = new StreamingDetectIntentRequest(); + $request2->setSession($formattedSession2); + $request2->setQueryInput($queryInput2); + $formattedSession3 = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); + $queryInput3 = new QueryInput(); + $request3 = new StreamingDetectIntentRequest(); + $request3->setSession($formattedSession3); + $request3->setQueryInput($queryInput3); + $bidi = $gapicClient->streamingDetectIntent(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Sessions/StreamingDetectIntent', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function streamingDetectIntentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $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->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->streamingDetectIntent(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/VersionsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/VersionsClientTest.php new file mode 100644 index 000000000000..004f7d2889c4 --- /dev/null +++ b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/VersionsClientTest.php @@ -0,0 +1,511 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VersionsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VersionsClient($options); + } + + /** @test */ + public function createVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $versionNumber = 135927952; + $expectedResponse = new Version(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVersionNumber($versionNumber); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $version = new Version(); + $response = $gapicClient->createVersion($formattedParent, $version); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Versions/CreateVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createVersionExceptionTest() + { + $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->agentName('[PROJECT]'); + $version = new Version(); + try { + $gapicClient->createVersion($formattedParent, $version); + // 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 deleteVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->versionName('[PROJECT]', '[VERSION]'); + $gapicClient->deleteVersion($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Versions/DeleteVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteVersionExceptionTest() + { + $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->versionName('[PROJECT]', '[VERSION]'); + try { + $gapicClient->deleteVersion($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 getVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $versionNumber = 135927952; + $expectedResponse = new Version(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setVersionNumber($versionNumber); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->versionName('[PROJECT]', '[VERSION]'); + $response = $gapicClient->getVersion($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.dialogflow.v2.Versions/GetVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVersionExceptionTest() + { + $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->versionName('[PROJECT]', '[VERSION]'); + try { + $gapicClient->getVersion($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 listVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $versionsElement = new Version(); + $versions = [ + $versionsElement, + ]; + $expectedResponse = new ListVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVersions($versions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]'); + $response = $gapicClient->listVersions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Versions/ListVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVersionsExceptionTest() + { + $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->agentName('[PROJECT]'); + try { + $gapicClient->listVersions($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 updateVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $versionNumber = 135927952; + $expectedResponse = new Version(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVersionNumber($versionNumber); + $transport->addResponse($expectedResponse); + // Mock request + $version = new Version(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateVersion($version, $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.dialogflow.v2.Versions/UpdateVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateVersionExceptionTest() + { + $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 + $version = new Version(); + $updateMask = new FieldMask(); + try { + $gapicClient->updateVersion($version, $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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + try { + $gapicClient->getLocation(); + // 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + try { + $gapicClient->listLocations(); + // 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()); + } +} From cb11144beb22466b6502cae6428e13d175bf560a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 13 Jan 2023 19:07:21 +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 --- Dialogflow/metadata/V2/Agent.php | Bin 5813 -> 5807 bytes Dialogflow/metadata/V2/AnswerRecord.php | Bin 4176 -> 4426 bytes Dialogflow/metadata/V2/AudioConfig.php | Bin 3571 -> 3565 bytes Dialogflow/metadata/V2/Context.php | 6 +- Dialogflow/metadata/V2/Conversation.php | Bin 4498 -> 5535 bytes .../metadata/V2/ConversationDataset.php | Bin 5110 -> 5104 bytes Dialogflow/metadata/V2/ConversationEvent.php | Bin 1364 -> 1358 bytes Dialogflow/metadata/V2/ConversationModel.php | Bin 9059 -> 9095 bytes .../metadata/V2/ConversationProfile.php | Bin 10883 -> 10877 bytes Dialogflow/metadata/V2/Document.php | Bin 7671 -> 7665 bytes Dialogflow/metadata/V2/EntityType.php | Bin 7428 -> 7422 bytes Dialogflow/metadata/V2/Environment.php | Bin 5528 -> 5522 bytes Dialogflow/metadata/V2/Fulfillment.php | Bin 2914 -> 2908 bytes Dialogflow/metadata/V2/Gcs.php | 6 +- .../metadata/V2/HumanAgentAssistantEvent.php | 6 +- Dialogflow/metadata/V2/Intent.php | Bin 12748 -> 12742 bytes Dialogflow/metadata/V2/KnowledgeBase.php | 6 +- Dialogflow/metadata/V2/Participant.php | Bin 11924 -> 11918 bytes Dialogflow/metadata/V2/Session.php | Bin 6686 -> 6680 bytes Dialogflow/metadata/V2/SessionEntityType.php | Bin 5751 -> 5745 bytes Dialogflow/metadata/V2/ValidationResult.php | Bin 1132 -> 1126 bytes Dialogflow/metadata/V2/Version.php | Bin 3775 -> 3769 bytes Dialogflow/metadata/V2/Webhook.php | 6 +- .../samples/V2/AgentsClient/export_agent.php | 11 +- .../samples/V2/AgentsClient/import_agent.php | 12 +- .../samples/V2/AgentsClient/restore_agent.php | 5 +- .../create_conversation_dataset.php | 6 +- .../delete_conversation_dataset.php | 3 +- .../import_conversation_data.php | 6 +- .../list_conversation_datasets.php | 4 +- .../create_conversation_model.php | 6 +- .../delete_conversation_model.php | 3 +- .../deploy_conversation_model.php | 3 +- .../undeploy_conversation_model.php | 3 +- .../clear_suggestion_feature_config.php | 6 +- .../create_conversation_profile.php | 3 +- .../set_suggestion_feature_config.php | 6 +- .../update_conversation_profile.php | 3 +- .../create_conversation.php | 13 +- .../suggest_conversation_summary.php | 0 .../V2/DocumentsClient/create_document.php | 3 +- .../V2/DocumentsClient/delete_document.php | 3 +- .../V2/DocumentsClient/export_document.php | 3 +- .../V2/DocumentsClient/import_documents.php | 6 +- .../V2/DocumentsClient/reload_document.php | 3 +- .../V2/DocumentsClient/update_document.php | 3 +- .../batch_update_entity_types.php | 3 +- .../V2/IntentsClient/batch_update_intents.php | 3 +- Dialogflow/src/V2/AgentAssistantFeedback.php | 60 +- .../SummarizationFeedback.php | 8 +- Dialogflow/src/V2/AnalyzeContentRequest.php | 3 +- Dialogflow/src/V2/AnalyzeContentResponse.php | 43 +- Dialogflow/src/V2/AnswerRecord.php | 24 +- .../src/V2/ArticleSuggestionModelMetadata.php | 12 +- Dialogflow/src/V2/AssistQueryParameters.php | 12 +- Dialogflow/src/V2/AutomatedAgentReply.php | 16 +- .../src/V2/BatchCreateEntitiesRequest.php | 3 +- .../src/V2/BatchDeleteEntitiesRequest.php | 3 +- .../src/V2/BatchDeleteEntityTypesRequest.php | 3 +- .../src/V2/BatchDeleteIntentsRequest.php | 3 +- .../src/V2/BatchUpdateEntitiesRequest.php | 3 +- .../src/V2/BatchUpdateEntityTypesRequest.php | 3 +- .../src/V2/BatchUpdateEntityTypesResponse.php | 3 +- .../src/V2/BatchUpdateIntentsResponse.php | 3 +- .../src/V2/CompleteConversationRequest.php | 3 +- Dialogflow/src/V2/Conversation.php | 52 +- Dialogflow/src/V2/ConversationDataset.php | 12 +- Dialogflow/src/V2/ConversationInfo.php | 24 +- .../src/V2/ConversationModelEvaluation.php | 90 ++ Dialogflow/src/V2/CreateContextRequest.php | 3 +- ...eateConversationModelOperationMetadata.php | 4 +- .../V2/CreateConversationProfileRequest.php | 3 +- .../src/V2/CreateConversationRequest.php | 19 +- Dialogflow/src/V2/CreateDocumentRequest.php | 3 +- Dialogflow/src/V2/CreateEntityTypeRequest.php | 3 +- .../src/V2/CreateEnvironmentRequest.php | 3 +- Dialogflow/src/V2/CreateIntentRequest.php | 3 +- .../src/V2/CreateKnowledgeBaseRequest.php | 3 +- .../src/V2/CreateParticipantRequest.php | 3 +- .../src/V2/CreateSessionEntityTypeRequest.php | 3 +- Dialogflow/src/V2/CreateVersionRequest.php | 3 +- Dialogflow/src/V2/DeleteAgentRequest.php | 3 +- .../src/V2/DeleteAllContextsRequest.php | 3 +- Dialogflow/src/V2/DeleteContextRequest.php | 3 +- ...leteConversationModelOperationMetadata.php | 4 +- .../V2/DeleteConversationProfileRequest.php | 3 +- Dialogflow/src/V2/DeleteDocumentRequest.php | 3 +- Dialogflow/src/V2/DeleteEntityTypeRequest.php | 3 +- .../src/V2/DeleteEnvironmentRequest.php | 3 +- Dialogflow/src/V2/DeleteIntentRequest.php | 3 +- .../src/V2/DeleteKnowledgeBaseRequest.php | 3 +- .../src/V2/DeleteSessionEntityTypeRequest.php | 3 +- Dialogflow/src/V2/DeleteVersionRequest.php | 3 +- ...ployConversationModelOperationMetadata.php | 4 +- Dialogflow/src/V2/DetectIntentRequest.php | 48 +- Dialogflow/src/V2/Document.php | 3 +- Dialogflow/src/V2/EntityType.php | 36 +- Dialogflow/src/V2/Environment.php | 32 +- Dialogflow/src/V2/EnvironmentHistory.php | 35 +- .../EvaluationConfig/SmartComposeConfig.php | 32 +- .../V2/EvaluationConfig/SmartReplyConfig.php | 32 +- Dialogflow/src/V2/EventInput.php | 16 +- Dialogflow/src/V2/ExportAgentRequest.php | 35 +- Dialogflow/src/V2/ExportAgentResponse.php | 3 +- Dialogflow/src/V2/ExportDocumentRequest.php | 3 +- Dialogflow/src/V2/Fulfillment.php | 24 +- .../src/V2/Fulfillment/GenericWebService.php | 28 +- Dialogflow/src/V2/Gapic/AgentsGapicClient.php | 28 +- .../src/V2/Gapic/AnswerRecordsGapicClient.php | 3 +- .../Gapic/ConversationDatasetsGapicClient.php | 19 +- .../Gapic/ConversationModelsGapicClient.php | 15 +- .../Gapic/ConversationProfilesGapicClient.php | 21 +- .../src/V2/Gapic/ConversationsGapicClient.php | 182 ++- .../src/V2/Gapic/DocumentsGapicClient.php | 32 +- .../src/V2/Gapic/EntityTypesGapicClient.php | 3 +- .../src/V2/Gapic/IntentsGapicClient.php | 3 +- .../V2/Gapic/KnowledgeBasesGapicClient.php | 3 +- .../src/V2/Gapic/ParticipantsGapicClient.php | 5 +- .../Gapic/SessionEntityTypesGapicClient.php | 3 +- .../src/V2/Gapic/SessionsGapicClient.php | 14 +- Dialogflow/src/V2/GetAgentRequest.php | 3 +- Dialogflow/src/V2/GetContextRequest.php | 3 +- .../src/V2/GetConversationProfileRequest.php | 3 +- Dialogflow/src/V2/GetConversationRequest.php | 3 +- Dialogflow/src/V2/GetDocumentRequest.php | 3 +- Dialogflow/src/V2/GetEntityTypeRequest.php | 3 +- .../src/V2/GetEnvironmentHistoryRequest.php | 19 +- Dialogflow/src/V2/GetEnvironmentRequest.php | 3 +- Dialogflow/src/V2/GetFulfillmentRequest.php | 3 +- Dialogflow/src/V2/GetIntentRequest.php | 3 +- Dialogflow/src/V2/GetKnowledgeBaseRequest.php | 3 +- Dialogflow/src/V2/GetParticipantRequest.php | 3 +- .../src/V2/GetSessionEntityTypeRequest.php | 3 +- .../src/V2/GetValidationResultRequest.php | 3 +- Dialogflow/src/V2/GetVersionRequest.php | 3 +- .../MessageAnalysisConfig.php | 48 +- .../DialogflowQuerySource.php | 16 +- Dialogflow/src/V2/ImportAgentRequest.php | 3 +- ...mportConversationDataOperationMetadata.php | 4 +- ...mportConversationDataOperationResponse.php | 5 +- .../src/V2/ImportConversationDataRequest.php | 3 +- Dialogflow/src/V2/ImportDocumentsRequest.php | 3 +- Dialogflow/src/V2/ImportDocumentsResponse.php | 3 +- Dialogflow/src/V2/InputAudioConfig.php | 68 +- Dialogflow/src/V2/Intent.php | 64 +- .../V2/Intent/Message/ColumnProperties.php | 3 +- .../src/V2/Intent/Message/TableCardCell.php | 3 +- Dialogflow/src/V2/Intent/TrainingPhrase.php | 16 +- .../src/V2/ListAnswerRecordsRequest.php | 3 +- .../src/V2/ListAnswerRecordsResponse.php | 3 +- Dialogflow/src/V2/ListContextsRequest.php | 3 +- Dialogflow/src/V2/ListContextsResponse.php | 3 +- .../V2/ListConversationDatasetsRequest.php | 16 +- .../V2/ListConversationProfilesRequest.php | 3 +- .../V2/ListConversationProfilesResponse.php | 3 +- .../src/V2/ListConversationsRequest.php | 3 +- .../src/V2/ListConversationsResponse.php | 3 +- Dialogflow/src/V2/ListDocumentsRequest.php | 3 +- Dialogflow/src/V2/ListDocumentsResponse.php | 3 +- Dialogflow/src/V2/ListEntityTypesRequest.php | 3 +- Dialogflow/src/V2/ListEntityTypesResponse.php | 3 +- Dialogflow/src/V2/ListEnvironmentsRequest.php | 19 +- .../src/V2/ListEnvironmentsResponse.php | 3 +- Dialogflow/src/V2/ListIntentsRequest.php | 3 +- Dialogflow/src/V2/ListIntentsResponse.php | 3 +- .../src/V2/ListKnowledgeBasesRequest.php | 3 +- .../src/V2/ListKnowledgeBasesResponse.php | 3 +- Dialogflow/src/V2/ListMessagesRequest.php | 3 +- Dialogflow/src/V2/ListMessagesResponse.php | 3 +- Dialogflow/src/V2/ListParticipantsRequest.php | 3 +- .../src/V2/ListParticipantsResponse.php | 3 +- .../src/V2/ListSessionEntityTypesRequest.php | 3 +- .../src/V2/ListSessionEntityTypesResponse.php | 3 +- Dialogflow/src/V2/ListVersionsRequest.php | 19 +- Dialogflow/src/V2/ListVersionsResponse.php | 3 +- Dialogflow/src/V2/LoggingConfig.php | 16 +- Dialogflow/src/V2/NotificationConfig.php | 20 +- Dialogflow/src/V2/Participant.php | 104 +- Dialogflow/src/V2/ReloadDocumentRequest.php | 31 +- Dialogflow/src/V2/RestoreAgentRequest.php | 3 +- Dialogflow/src/V2/SearchAgentsRequest.php | 3 +- Dialogflow/src/V2/SearchAgentsResponse.php | 3 +- Dialogflow/src/V2/SentimentAnalysisResult.php | 11 +- .../SessionEntityType/EntityOverrideMode.php | 5 +- Dialogflow/src/V2/SetAgentRequest.php | 3 +- Dialogflow/src/V2/SmartReplyModelMetadata.php | 12 +- Dialogflow/src/V2/SpeechModelVariant.php | 7 +- Dialogflow/src/V2/SpeechToTextConfig.php | 51 +- .../src/V2/StreamingAnalyzeContentRequest.php | 32 +- .../V2/StreamingAnalyzeContentResponse.php | 40 +- .../src/V2/StreamingDetectIntentRequest.php | 142 +- .../src/V2/StreamingDetectIntentResponse.php | 5 +- .../src/V2/StreamingRecognitionResult.php | 12 +- .../MessageType.php | 11 +- Dialogflow/src/V2/SuggestArticlesRequest.php | 23 +- Dialogflow/src/V2/SuggestArticlesResponse.php | 39 +- .../V2/SuggestConversationSummaryRequest.php | 6 +- .../V2/SuggestConversationSummaryResponse.php | 6 +- .../Summary.php | 6 +- .../src/V2/SuggestFaqAnswersRequest.php | 3 +- .../src/V2/SuggestFaqAnswersResponse.php | 39 +- .../src/V2/SuggestSmartRepliesRequest.php | 3 +- .../src/V2/SuggestSmartRepliesResponse.php | 39 +- Dialogflow/src/V2/SuggestionResult.php | 8 +- Dialogflow/src/V2/TextToSpeechSettings.php | 72 +- Dialogflow/src/V2/TrainAgentRequest.php | 3 +- ...ployConversationModelOperationMetadata.php | 4 +- .../src/V2/UpdateAnswerRecordRequest.php | 3 +- Dialogflow/src/V2/UpdateContextRequest.php | 3 +- .../V2/UpdateConversationProfileRequest.php | 3 +- Dialogflow/src/V2/UpdateDocumentRequest.php | 3 +- Dialogflow/src/V2/UpdateEntityTypeRequest.php | 3 +- .../src/V2/UpdateEnvironmentRequest.php | 3 +- .../src/V2/UpdateFulfillmentRequest.php | 3 +- Dialogflow/src/V2/UpdateIntentRequest.php | 3 +- .../src/V2/UpdateKnowledgeBaseRequest.php | 3 +- .../src/V2/UpdateParticipantRequest.php | 3 +- .../src/V2/UpdateSessionEntityTypeRequest.php | 3 +- Dialogflow/src/V2/UpdateVersionRequest.php | 3 +- Dialogflow/src/V2/Version.php | 48 +- Dialogflow/src/V2/VoiceSelectionParams.php | 28 +- Dialogflow/src/V2/WebhookResponse.php | 111 +- Dialogflow/src/V2/gapic_metadata.json | 5 + .../conversations_client_config.json | 5 + .../conversations_rest_client_config.php | 19 + .../Unit/V2/ConversationModelsClientTest.php | 4 + .../tests/Unit/V2/ConversationsClientTest.php | 63 + .../Google/Cloud/Dialogflow/V2/Agent.php | Bin 5807 -> 0 bytes .../Cloud/Dialogflow/V2/AnswerRecord.php | Bin 4426 -> 0 bytes .../Cloud/Dialogflow/V2/AudioConfig.php | Bin 3565 -> 0 bytes .../Google/Cloud/Dialogflow/V2/Context.php | 70 - .../Cloud/Dialogflow/V2/Conversation.php | Bin 5535 -> 0 bytes .../Dialogflow/V2/ConversationDataset.php | Bin 5104 -> 0 bytes .../Cloud/Dialogflow/V2/ConversationEvent.php | Bin 1358 -> 0 bytes .../Cloud/Dialogflow/V2/ConversationModel.php | Bin 9095 -> 0 bytes .../Dialogflow/V2/ConversationProfile.php | Bin 10877 -> 0 bytes .../Google/Cloud/Dialogflow/V2/Document.php | Bin 7665 -> 0 bytes .../Google/Cloud/Dialogflow/V2/EntityType.php | Bin 7422 -> 0 bytes .../Cloud/Dialogflow/V2/Environment.php | Bin 5522 -> 0 bytes .../Cloud/Dialogflow/V2/Fulfillment.php | Bin 2908 -> 0 bytes .../Google/Cloud/Dialogflow/V2/Gcs.php | 33 - .../V2/HumanAgentAssistantEvent.php | 32 - .../Google/Cloud/Dialogflow/V2/Intent.php | Bin 12742 -> 0 bytes .../Cloud/Dialogflow/V2/KnowledgeBase.php | 66 - .../Cloud/Dialogflow/V2/Participant.php | Bin 11918 -> 0 bytes .../Google/Cloud/Dialogflow/V2/Session.php | Bin 6680 -> 0 bytes .../Cloud/Dialogflow/V2/SessionEntityType.php | Bin 5745 -> 0 bytes .../Cloud/Dialogflow/V2/ValidationResult.php | Bin 1126 -> 0 bytes .../Google/Cloud/Dialogflow/V2/Version.php | Bin 3769 -> 0 bytes .../Google/Cloud/Dialogflow/V2/Webhook.php | 50 - .../src/Google/Cloud/Dialogflow/V2/Agent.php | 541 ------- .../Cloud/Dialogflow/V2/Agent/ApiVersion.php | 71 - .../Cloud/Dialogflow/V2/Agent/MatchMode.php | 66 - .../Google/Cloud/Dialogflow/V2/Agent/Tier.php | 72 - .../Dialogflow/V2/AgentAssistantFeedback.php | 243 --- .../AnswerRelevance.php | 64 - .../DocumentCorrectness.php | 64 - .../DocumentEfficiency.php | 64 - ...AgentAssistantFeedback_AnswerRelevance.php | 16 - ...tAssistantFeedback_DocumentCorrectness.php | 16 - ...ntAssistantFeedback_DocumentEfficiency.php | 16 - ...ssistantFeedback_SummarizationFeedback.php | 16 - .../Dialogflow/V2/AgentAssistantRecord.php | 108 -- .../Cloud/Dialogflow/V2/Agent_ApiVersion.php | 16 - .../Cloud/Dialogflow/V2/Agent_MatchMode.php | 16 - .../Google/Cloud/Dialogflow/V2/Agent_Tier.php | 16 - .../Cloud/Dialogflow/V2/AgentsGrpcClient.php | 253 ---- .../Dialogflow/V2/AnalyzeContentRequest.php | 401 ----- .../Dialogflow/V2/AnalyzeContentResponse.php | 428 ------ .../Dialogflow/V2/AnnotatedMessagePart.php | 195 --- .../Cloud/Dialogflow/V2/AnswerFeedback.php | 274 ---- .../V2/AnswerFeedback/CorrectnessLevel.php | 71 - .../V2/AnswerFeedback_CorrectnessLevel.php | 16 - .../Cloud/Dialogflow/V2/AnswerRecord.php | 189 --- .../Dialogflow/V2/AnswerRecordsGrpcClient.php | 67 - .../Cloud/Dialogflow/V2/ArticleAnswer.php | 261 ---- .../V2/ArticleSuggestionModelMetadata.php | 71 - .../Dialogflow/V2/AssistQueryParameters.php | 131 -- .../Cloud/Dialogflow/V2/AudioEncoding.php | 118 -- .../Dialogflow/V2/AutomatedAgentConfig.php | 119 -- .../Dialogflow/V2/AutomatedAgentReply.php | 203 --- .../AutomatedAgentReplyType.php | 70 - ...atedAgentReply_AutomatedAgentReplyType.php | 16 - .../V2/BatchCreateEntitiesRequest.php | 156 -- .../V2/BatchDeleteEntitiesRequest.php | 164 -- .../V2/BatchDeleteEntityTypesRequest.php | 110 -- .../V2/BatchDeleteIntentsRequest.php | 110 -- .../V2/BatchUpdateEntitiesRequest.php | 200 --- .../V2/BatchUpdateEntityTypesRequest.php | 250 --- .../V2/BatchUpdateEntityTypesResponse.php | 68 - .../V2/BatchUpdateIntentsRequest.php | 278 ---- .../V2/BatchUpdateIntentsResponse.php | 68 - ...ggestionFeatureConfigOperationMetadata.php | 192 --- .../ClearSuggestionFeatureConfigRequest.php | 147 -- .../V2/CompleteConversationRequest.php | 76 - .../Google/Cloud/Dialogflow/V2/Context.php | 269 ---- .../Dialogflow/V2/ContextsGrpcClient.php | 127 -- .../Cloud/Dialogflow/V2/Conversation.php | 380 ----- .../V2/Conversation/ConversationStage.php | 69 - .../V2/Conversation/LifecycleState.php | 64 - .../Dialogflow/V2/ConversationDataset.php | 316 ---- .../V2/ConversationDatasetsGrpcClient.php | 143 -- .../Cloud/Dialogflow/V2/ConversationEvent.php | 200 --- .../Dialogflow/V2/ConversationEvent/Type.php | 96 -- .../Dialogflow/V2/ConversationEvent_Type.php | 16 - .../Cloud/Dialogflow/V2/ConversationInfo.php | 75 - .../Cloud/Dialogflow/V2/ConversationModel.php | 346 ----- .../V2/ConversationModel/ModelType.php | 64 - .../Dialogflow/V2/ConversationModel/State.php | 108 -- .../V2/ConversationModelEvaluation.php | 329 ---- .../V2/ConversationModel_ModelType.php | 16 - .../Dialogflow/V2/ConversationModel_State.php | 16 - .../V2/ConversationModelsGrpcClient.php | 212 --- .../Dialogflow/V2/ConversationPhoneNumber.php | 68 - .../Dialogflow/V2/ConversationProfile.php | 651 -------- .../V2/ConversationProfilesGrpcClient.php | 178 --- .../V2/Conversation_ConversationStage.php | 16 - .../V2/Conversation_LifecycleState.php | 16 - .../Dialogflow/V2/ConversationsGrpcClient.php | 153 -- .../Dialogflow/V2/CreateContextRequest.php | 132 -- ...teConversationDatasetOperationMetadata.php | 75 - .../V2/CreateConversationDatasetRequest.php | 116 -- ...sationModelEvaluationOperationMetadata.php | 201 --- .../State.php | 85 -- ...ModelEvaluationOperationMetadata_State.php | 16 - ...eateConversationModelEvaluationRequest.php | 120 -- ...eateConversationModelOperationMetadata.php | 155 -- .../State.php | 94 -- ...nversationModelOperationMetadata_State.php | 16 - .../V2/CreateConversationModelRequest.php | 116 -- .../V2/CreateConversationProfileRequest.php | 116 -- .../V2/CreateConversationRequest.php | 182 --- .../Dialogflow/V2/CreateDocumentRequest.php | 120 -- .../Dialogflow/V2/CreateEntityTypeRequest.php | 166 -- .../V2/CreateEnvironmentRequest.php | 158 -- .../Dialogflow/V2/CreateIntentRequest.php | 200 --- .../V2/CreateKnowledgeBaseRequest.php | 116 -- .../V2/CreateParticipantRequest.php | 120 -- .../V2/CreateSessionEntityTypeRequest.php | 132 -- .../Dialogflow/V2/CreateVersionRequest.php | 124 -- .../Dialogflow/V2/DeleteAgentRequest.php | 72 - .../V2/DeleteAllContextsRequest.php | 88 -- .../Dialogflow/V2/DeleteContextRequest.php | 88 -- ...teConversationDatasetOperationMetadata.php | 33 - .../V2/DeleteConversationDatasetRequest.php | 76 - ...leteConversationModelOperationMetadata.php | 121 -- .../V2/DeleteConversationModelRequest.php | 72 - .../V2/DeleteConversationProfileRequest.php | 78 - .../Dialogflow/V2/DeleteDocumentRequest.php | 76 - .../Dialogflow/V2/DeleteEntityTypeRequest.php | 72 - .../V2/DeleteEnvironmentRequest.php | 88 -- .../Dialogflow/V2/DeleteIntentRequest.php | 76 - .../V2/DeleteKnowledgeBaseRequest.php | 114 -- .../V2/DeleteSessionEntityTypeRequest.php | 92 -- .../Dialogflow/V2/DeleteVersionRequest.php | 84 -- ...ployConversationModelOperationMetadata.php | 121 -- .../V2/DeployConversationModelRequest.php | 72 - .../Dialogflow/V2/DetectIntentRequest.php | 389 ----- .../Dialogflow/V2/DetectIntentResponse.php | 273 ---- .../Google/Cloud/Dialogflow/V2/Document.php | 500 ------ .../Dialogflow/V2/Document/KnowledgeType.php | 85 -- .../Dialogflow/V2/Document/ReloadStatus.php | 132 -- .../Cloud/Dialogflow/V2/Document/State.php | 85 -- .../Dialogflow/V2/Document_KnowledgeType.php | 16 - .../Dialogflow/V2/Document_ReloadStatus.php | 16 - .../Cloud/Dialogflow/V2/Document_State.php | 16 - .../Dialogflow/V2/DocumentsGrpcClient.php | 215 --- .../Cloud/Dialogflow/V2/DtmfParameters.php | 67 - .../Google/Cloud/Dialogflow/V2/EntityType.php | 274 ---- .../V2/EntityType/AutoExpansionMode.php | 60 - .../Cloud/Dialogflow/V2/EntityType/Entity.php | 148 -- .../Cloud/Dialogflow/V2/EntityType/Kind.php | 75 - .../Cloud/Dialogflow/V2/EntityTypeBatch.php | 67 - .../V2/EntityType_AutoExpansionMode.php | 16 - .../Cloud/Dialogflow/V2/EntityType_Entity.php | 16 - .../Cloud/Dialogflow/V2/EntityType_Kind.php | 16 - .../Dialogflow/V2/EntityTypesGrpcClient.php | 265 ---- .../Cloud/Dialogflow/V2/Environment.php | 362 ----- .../Cloud/Dialogflow/V2/Environment/State.php | 75 - .../Dialogflow/V2/EnvironmentHistory.php | 164 -- .../V2/EnvironmentHistory/Entry.php | 148 -- .../V2/EnvironmentHistory_Entry.php | 16 - .../Cloud/Dialogflow/V2/Environment_State.php | 16 - .../Dialogflow/V2/EnvironmentsGrpcClient.php | 136 -- .../Cloud/Dialogflow/V2/EvaluationConfig.php | 142 -- .../EvaluationConfig/SmartComposeConfig.php | 124 -- .../V2/EvaluationConfig/SmartReplyConfig.php | 124 -- .../EvaluationConfig_SmartComposeConfig.php | 16 - .../V2/EvaluationConfig_SmartReplyConfig.php | 16 - .../Google/Cloud/Dialogflow/V2/EventInput.php | 229 --- .../Dialogflow/V2/ExportAgentRequest.php | 138 -- .../Dialogflow/V2/ExportAgentResponse.php | 112 -- .../Dialogflow/V2/ExportDocumentRequest.php | 194 --- .../Dialogflow/V2/ExportOperationMetadata.php | 77 - .../Google/Cloud/Dialogflow/V2/FaqAnswer.php | 269 ---- .../Cloud/Dialogflow/V2/Fulfillment.php | 247 --- .../Dialogflow/V2/Fulfillment/Feature.php | 70 - .../V2/Fulfillment/Feature/Type.php | 57 - .../V2/Fulfillment/GenericWebService.php | 236 --- .../Dialogflow/V2/Fulfillment_Feature.php | 16 - .../V2/Fulfillment_Feature_Type.php | 16 - .../V2/Fulfillment_GenericWebService.php | 16 - .../Dialogflow/V2/FulfillmentsGrpcClient.php | 65 - .../Cloud/Dialogflow/V2/GcsDestination.php | 83 - .../Google/Cloud/Dialogflow/V2/GcsSources.php | 75 - .../Cloud/Dialogflow/V2/GetAgentRequest.php | 72 - .../Cloud/Dialogflow/V2/GetContextRequest.php | 88 -- .../V2/GetConversationDatasetRequest.php | 76 - .../GetConversationModelEvaluationRequest.php | 76 - .../V2/GetConversationModelRequest.php | 72 - .../V2/GetConversationProfileRequest.php | 76 - .../Dialogflow/V2/GetConversationRequest.php | 76 - .../Dialogflow/V2/GetDocumentRequest.php | 76 - .../Dialogflow/V2/GetEntityTypeRequest.php | 122 -- .../V2/GetEnvironmentHistoryRequest.php | 160 -- .../Dialogflow/V2/GetEnvironmentRequest.php | 88 -- .../Dialogflow/V2/GetFulfillmentRequest.php | 72 - .../Cloud/Dialogflow/V2/GetIntentRequest.php | 156 -- .../Dialogflow/V2/GetKnowledgeBaseRequest.php | 76 - .../Dialogflow/V2/GetParticipantRequest.php | 76 - .../V2/GetSessionEntityTypeRequest.php | 92 -- .../V2/GetValidationResultRequest.php | 122 -- .../Cloud/Dialogflow/V2/GetVersionRequest.php | 84 -- .../V2/HumanAgentAssistantConfig.php | 217 --- .../ConversationModelConfig.php | 76 - .../ConversationProcessConfig.php | 74 - .../MessageAnalysisConfig.php | 196 --- .../SuggestionConfig.php | 140 -- .../SuggestionFeatureConfig.php | 302 ---- .../SuggestionQueryConfig.php | 322 ---- .../ContextFilterSettings.php | 143 -- .../DialogflowQuerySource.php | 83 - .../DocumentQuerySource.php | 83 - .../KnowledgeBaseQuerySource.php | 83 - .../SuggestionTriggerSettings.php | 108 -- ...ssistantConfig_ConversationModelConfig.php | 16 - ...istantConfig_ConversationProcessConfig.php | 16 - ...tAssistantConfig_MessageAnalysisConfig.php | 16 - ...nAgentAssistantConfig_SuggestionConfig.php | 16 - ...ssistantConfig_SuggestionFeatureConfig.php | 16 - ...tAssistantConfig_SuggestionQueryConfig.php | 16 - ...stionQueryConfig_ContextFilterSettings.php | 16 - ...stionQueryConfig_DialogflowQuerySource.php | 16 - ...gestionQueryConfig_DocumentQuerySource.php | 16 - ...onQueryConfig_KnowledgeBaseQuerySource.php | 16 - ...istantConfig_SuggestionTriggerSettings.php | 16 - .../V2/HumanAgentAssistantEvent.php | 148 -- .../Dialogflow/V2/HumanAgentHandoffConfig.php | 111 -- .../LivePersonConfig.php | 74 - .../SalesforceLiveAgentConfig.php | 184 --- ...manAgentHandoffConfig_LivePersonConfig.php | 16 - ...andoffConfig_SalesforceLiveAgentConfig.php | 16 - .../Dialogflow/V2/ImportAgentRequest.php | 165 -- ...mportConversationDataOperationMetadata.php | 163 -- ...mportConversationDataOperationResponse.php | 111 -- .../V2/ImportConversationDataRequest.php | 120 -- .../Dialogflow/V2/ImportDocumentTemplate.php | 147 -- .../Dialogflow/V2/ImportDocumentsRequest.php | 212 --- .../Dialogflow/V2/ImportDocumentsResponse.php | 68 - .../Cloud/Dialogflow/V2/InputAudioConfig.php | 570 ------- .../Cloud/Dialogflow/V2/InputConfig.php | 82 - .../Cloud/Dialogflow/V2/InputDataset.php | 76 - .../Cloud/Dialogflow/V2/InputTextConfig.php | 75 - .../src/Google/Cloud/Dialogflow/V2/Intent.php | 904 ----------- .../V2/Intent/FollowupIntentInfo.php | 112 -- .../Cloud/Dialogflow/V2/Intent/Message.php | 545 ------- .../V2/Intent/Message/BasicCard.php | 216 --- .../V2/Intent/Message/BasicCard/Button.php | 114 -- .../BasicCard/Button/OpenUriAction.php | 70 - .../V2/Intent/Message/BrowseCarouselCard.php | 113 -- .../BrowseCarouselCardItem.php | 234 --- .../BrowseCarouselCardItem/OpenUrlAction.php | 108 -- .../OpenUrlAction/UrlTypeHint.php | 65 - .../ImageDisplayOptions.php | 89 -- .../Dialogflow/V2/Intent/Message/Card.php | 172 --- .../V2/Intent/Message/Card/Button.php | 108 -- .../V2/Intent/Message/CarouselSelect.php | 70 - .../V2/Intent/Message/CarouselSelect/Item.php | 192 --- .../V2/Intent/Message/ColumnProperties.php | 105 -- .../ColumnProperties/HorizontalAlignment.php | 71 - .../Dialogflow/V2/Intent/Message/Image.php | 108 -- .../V2/Intent/Message/LinkOutSuggestion.php | 109 -- .../V2/Intent/Message/ListSelect.php | 138 -- .../V2/Intent/Message/ListSelect/Item.php | 192 --- .../V2/Intent/Message/MediaContent.php | 104 -- .../MediaContent/ResponseMediaObject.php | 213 --- .../MediaContent/ResponseMediaType.php | 57 - .../Dialogflow/V2/Intent/Message/Platform.php | 116 -- .../V2/Intent/Message/QuickReplies.php | 104 -- .../V2/Intent/Message/SelectItemInfo.php | 113 -- .../V2/Intent/Message/SimpleResponse.php | 150 -- .../V2/Intent/Message/SimpleResponses.php | 73 - .../V2/Intent/Message/Suggestion.php | 71 - .../V2/Intent/Message/Suggestions.php | 70 - .../V2/Intent/Message/TableCard.php | 250 --- .../V2/Intent/Message/TableCardCell.php | 71 - .../V2/Intent/Message/TableCardRow.php | 104 -- .../Dialogflow/V2/Intent/Message/Text.php | 70 - .../Cloud/Dialogflow/V2/Intent/Parameter.php | 360 ----- .../Dialogflow/V2/Intent/TrainingPhrase.php | 240 --- .../V2/Intent/TrainingPhrase/Part.php | 196 --- .../V2/Intent/TrainingPhrase/Type.php | 70 - .../Dialogflow/V2/Intent/WebhookState.php | 65 - .../Cloud/Dialogflow/V2/IntentBatch.php | 67 - .../Google/Cloud/Dialogflow/V2/IntentView.php | 56 - .../V2/Intent_FollowupIntentInfo.php | 16 - .../Cloud/Dialogflow/V2/Intent_Message.php | 16 - .../V2/Intent_Message_BasicCard.php | 16 - .../V2/Intent_Message_BasicCard_Button.php | 16 - ...Message_BasicCard_Button_OpenUriAction.php | 16 - .../V2/Intent_Message_BrowseCarouselCard.php | 16 - ...wseCarouselCard_BrowseCarouselCardItem.php | 16 - ...d_BrowseCarouselCardItem_OpenUrlAction.php | 16 - ...uselCardItem_OpenUrlAction_UrlTypeHint.php | 16 - ...BrowseCarouselCard_ImageDisplayOptions.php | 16 - .../Dialogflow/V2/Intent_Message_Card.php | 16 - .../V2/Intent_Message_Card_Button.php | 16 - .../V2/Intent_Message_CarouselSelect.php | 16 - .../V2/Intent_Message_CarouselSelect_Item.php | 16 - .../V2/Intent_Message_ColumnProperties.php | 16 - ...e_ColumnProperties_HorizontalAlignment.php | 16 - .../Dialogflow/V2/Intent_Message_Image.php | 16 - .../V2/Intent_Message_LinkOutSuggestion.php | 16 - .../V2/Intent_Message_ListSelect.php | 16 - .../V2/Intent_Message_ListSelect_Item.php | 16 - .../V2/Intent_Message_MediaContent.php | 16 - ...ssage_MediaContent_ResponseMediaObject.php | 16 - ...Message_MediaContent_ResponseMediaType.php | 16 - .../Dialogflow/V2/Intent_Message_Platform.php | 16 - .../V2/Intent_Message_QuickReplies.php | 16 - .../V2/Intent_Message_SelectItemInfo.php | 16 - .../V2/Intent_Message_SimpleResponse.php | 16 - .../V2/Intent_Message_SimpleResponses.php | 16 - .../V2/Intent_Message_Suggestion.php | 16 - .../V2/Intent_Message_Suggestions.php | 16 - .../V2/Intent_Message_TableCard.php | 16 - .../V2/Intent_Message_TableCardCell.php | 16 - .../V2/Intent_Message_TableCardRow.php | 16 - .../Dialogflow/V2/Intent_Message_Text.php | 16 - .../Cloud/Dialogflow/V2/Intent_Parameter.php | 16 - .../Dialogflow/V2/Intent_TrainingPhrase.php | 16 - .../V2/Intent_TrainingPhrase_Part.php | 16 - .../V2/Intent_TrainingPhrase_Type.php | 16 - .../Dialogflow/V2/Intent_WebhookState.php | 16 - .../Cloud/Dialogflow/V2/IntentsGrpcClient.php | 178 --- .../Cloud/Dialogflow/V2/KnowledgeBase.php | 166 -- .../V2/KnowledgeBasesGrpcClient.php | 111 -- .../V2/KnowledgeOperationMetadata.php | 143 -- .../V2/KnowledgeOperationMetadata/State.php | 71 - .../V2/KnowledgeOperationMetadata_State.php | 16 - .../V2/ListAnswerRecordsRequest.php | 215 --- .../V2/ListAnswerRecordsResponse.php | 122 -- .../Dialogflow/V2/ListContextsRequest.php | 160 -- .../Dialogflow/V2/ListContextsResponse.php | 110 -- .../V2/ListConversationDatasetsRequest.php | 144 -- .../V2/ListConversationDatasetsResponse.php | 106 -- ...istConversationModelEvaluationsRequest.php | 144 -- ...stConversationModelEvaluationsResponse.php | 106 -- .../V2/ListConversationModelsRequest.php | 144 -- .../V2/ListConversationModelsResponse.php | 106 -- .../V2/ListConversationProfilesRequest.php | 144 -- .../V2/ListConversationProfilesResponse.php | 110 -- .../V2/ListConversationsRequest.php | 234 --- .../V2/ListConversationsResponse.php | 110 -- .../Dialogflow/V2/ListDocumentsRequest.php | 238 --- .../Dialogflow/V2/ListDocumentsResponse.php | 106 -- .../Dialogflow/V2/ListEntityTypesRequest.php | 194 --- .../Dialogflow/V2/ListEntityTypesResponse.php | 110 -- .../Dialogflow/V2/ListEnvironmentsRequest.php | 152 -- .../V2/ListEnvironmentsResponse.php | 110 -- .../Dialogflow/V2/ListIntentsRequest.php | 256 ---- .../Dialogflow/V2/ListIntentsResponse.php | 110 -- .../V2/ListKnowledgeBasesRequest.php | 250 --- .../V2/ListKnowledgeBasesResponse.php | 106 -- .../Dialogflow/V2/ListMessagesRequest.php | 206 --- .../Dialogflow/V2/ListMessagesResponse.php | 114 -- .../Dialogflow/V2/ListParticipantsRequest.php | 148 -- .../V2/ListParticipantsResponse.php | 110 -- .../V2/ListSessionEntityTypesRequest.php | 160 -- .../V2/ListSessionEntityTypesResponse.php | 110 -- .../Dialogflow/V2/ListVersionsRequest.php | 152 -- .../Dialogflow/V2/ListVersionsResponse.php | 110 -- .../Cloud/Dialogflow/V2/LoggingConfig.php | 79 - .../Google/Cloud/Dialogflow/V2/Message.php | 395 ----- .../Cloud/Dialogflow/V2/MessageAnnotation.php | 109 -- .../Dialogflow/V2/NotificationConfig.php | 149 -- .../V2/NotificationConfig/MessageFormat.php | 64 - .../V2/NotificationConfig_MessageFormat.php | 16 - .../V2/OriginalDetectIntentRequest.php | 202 --- .../Cloud/Dialogflow/V2/OutputAudio.php | 115 -- .../Cloud/Dialogflow/V2/OutputAudioConfig.php | 163 -- .../Dialogflow/V2/OutputAudioEncoding.php | 86 -- .../Cloud/Dialogflow/V2/Participant.php | 387 ----- .../Cloud/Dialogflow/V2/Participant/Role.php | 72 - .../Cloud/Dialogflow/V2/Participant_Role.php | 16 - .../Dialogflow/V2/ParticipantsGrpcClient.php | 189 --- .../Google/Cloud/Dialogflow/V2/QueryInput.php | 148 -- .../Cloud/Dialogflow/V2/QueryParameters.php | 415 ----- .../Cloud/Dialogflow/V2/QueryResult.php | 855 ----------- .../Dialogflow/V2/ReloadDocumentRequest.php | 203 --- .../Dialogflow/V2/RestoreAgentRequest.php | 165 -- .../Dialogflow/V2/SearchAgentsRequest.php | 144 -- .../Dialogflow/V2/SearchAgentsResponse.php | 110 -- .../Google/Cloud/Dialogflow/V2/Sentiment.php | 112 -- .../V2/SentimentAnalysisRequestConfig.php | 75 - .../Dialogflow/V2/SentimentAnalysisResult.php | 89 -- .../Cloud/Dialogflow/V2/SessionEntityType.php | 181 --- .../SessionEntityType/EntityOverrideMode.php | 73 - .../SessionEntityType_EntityOverrideMode.php | 16 - .../V2/SessionEntityTypesGrpcClient.php | 134 -- .../Dialogflow/V2/SessionsGrpcClient.php | 92 -- .../Cloud/Dialogflow/V2/SetAgentRequest.php | 122 -- ...ggestionFeatureConfigOperationMetadata.php | 192 --- .../V2/SetSuggestionFeatureConfigRequest.php | 158 -- .../Cloud/Dialogflow/V2/SmartReplyAnswer.php | 155 -- .../Cloud/Dialogflow/V2/SmartReplyMetrics.php | 143 -- .../V2/SmartReplyMetrics/TopNMetrics.php | 124 -- .../V2/SmartReplyMetrics_TopNMetrics.php | 16 - .../Dialogflow/V2/SmartReplyModelMetadata.php | 71 - .../Cloud/Dialogflow/V2/SpeechContext.php | 162 -- .../Dialogflow/V2/SpeechModelVariant.php | 92 -- .../Dialogflow/V2/SpeechToTextConfig.php | 158 -- .../Cloud/Dialogflow/V2/SpeechWordInfo.php | 225 --- .../Cloud/Dialogflow/V2/SsmlVoiceGender.php | 70 - .../V2/StreamingAnalyzeContentRequest.php | 565 ------- .../V2/StreamingAnalyzeContentResponse.php | 452 ------ .../V2/StreamingDetectIntentRequest.php | 488 ------ .../V2/StreamingDetectIntentResponse.php | 323 ---- .../V2/StreamingRecognitionResult.php | 363 ----- .../MessageType.php | 71 - ...StreamingRecognitionResult_MessageType.php | 16 - .../Dialogflow/V2/SuggestArticlesRequest.php | 212 --- .../Dialogflow/V2/SuggestArticlesResponse.php | 168 --- ...estConversationSummaryResponse_Summary.php | 16 - .../V2/SuggestFaqAnswersRequest.php | 208 --- .../V2/SuggestFaqAnswersResponse.php | 168 --- .../V2/SuggestSmartRepliesRequest.php | 216 --- .../V2/SuggestSmartRepliesResponse.php | 176 --- .../Cloud/Dialogflow/V2/SuggestionFeature.php | 69 - .../Dialogflow/V2/SuggestionFeature/Type.php | 71 - .../Dialogflow/V2/SuggestionFeature_Type.php | 16 - .../Cloud/Dialogflow/V2/SuggestionResult.php | 180 --- .../Dialogflow/V2/SynthesizeSpeechConfig.php | 269 ---- .../Cloud/Dialogflow/V2/TelephonyDtmf.php | 160 -- .../Dialogflow/V2/TelephonyDtmfEvents.php | 67 - .../Google/Cloud/Dialogflow/V2/TextInput.php | 119 -- .../Dialogflow/V2/TextToSpeechSettings.php | 197 --- .../Cloud/Dialogflow/V2/TrainAgentRequest.php | 72 - ...ployConversationModelOperationMetadata.php | 121 -- .../V2/UndeployConversationModelRequest.php | 72 - .../V2/UpdateAnswerRecordRequest.php | 122 -- .../Dialogflow/V2/UpdateContextRequest.php | 122 -- .../V2/UpdateConversationProfileRequest.php | 122 -- .../Dialogflow/V2/UpdateDocumentRequest.php | 130 -- .../Dialogflow/V2/UpdateEntityTypeRequest.php | 172 --- .../V2/UpdateEnvironmentRequest.php | 168 --- .../V2/UpdateFulfillmentRequest.php | 126 -- .../Dialogflow/V2/UpdateIntentRequest.php | 206 --- .../V2/UpdateKnowledgeBaseRequest.php | 130 -- .../V2/UpdateParticipantRequest.php | 122 -- .../V2/UpdateSessionEntityTypeRequest.php | 122 -- .../Dialogflow/V2/UpdateVersionRequest.php | 138 -- .../Cloud/Dialogflow/V2/ValidationError.php | 183 --- .../V2/ValidationError/Severity.php | 78 - .../V2/ValidationError_Severity.php | 16 - .../Cloud/Dialogflow/V2/ValidationResult.php | 67 - .../Google/Cloud/Dialogflow/V2/Version.php | 254 ---- .../Dialogflow/V2/Version/VersionStatus.php | 71 - .../Dialogflow/V2/Version_VersionStatus.php | 16 - .../Dialogflow/V2/VersionsGrpcClient.php | 116 -- .../Dialogflow/V2/VoiceSelectionParams.php | 129 -- .../Cloud/Dialogflow/V2/WebhookRequest.php | 217 --- .../Cloud/Dialogflow/V2/WebhookResponse.php | 430 ------ .../samples/V2/AgentsClient/delete_agent.php | 65 - .../samples/V2/AgentsClient/export_agent.php | 99 -- .../v2/samples/V2/AgentsClient/get_agent.php | 67 - .../samples/V2/AgentsClient/get_location.php | 53 - .../V2/AgentsClient/get_validation_result.php | 68 - .../samples/V2/AgentsClient/import_agent.php | 102 -- .../V2/AgentsClient/list_locations.php | 58 - .../samples/V2/AgentsClient/restore_agent.php | 100 -- .../samples/V2/AgentsClient/search_agents.php | 78 - .../v2/samples/V2/AgentsClient/set_agent.php | 99 -- .../samples/V2/AgentsClient/train_agent.php | 89 -- .../V2/AnswerRecordsClient/get_location.php | 53 - .../list_answer_records.php | 74 - .../V2/AnswerRecordsClient/list_locations.php | 58 - .../update_answer_record.php | 61 - .../V2/ContextsClient/create_context.php | 95 -- .../V2/ContextsClient/delete_all_contexts.php | 69 - .../V2/ContextsClient/delete_context.php | 69 - .../samples/V2/ContextsClient/get_context.php | 71 - .../V2/ContextsClient/get_location.php | 53 - .../V2/ContextsClient/list_contexts.php | 76 - .../V2/ContextsClient/list_locations.php | 58 - .../V2/ContextsClient/update_context.php | 85 -- .../create_conversation_dataset.php | 95 -- .../delete_conversation_dataset.php | 90 -- .../get_conversation_dataset.php | 72 - .../get_location.php | 53 - .../import_conversation_data.php | 99 -- .../list_conversation_datasets.php | 73 - .../list_locations.php | 58 - .../create_conversation_model.php | 109 -- .../create_conversation_model_evaluation.php | 90 -- .../delete_conversation_model.php | 84 -- .../deploy_conversation_model.php | 87 -- .../get_conversation_model.php | 66 - .../get_conversation_model_evaluation.php | 67 - .../ConversationModelsClient/get_location.php | 53 - .../list_conversation_model_evaluations.php | 71 - .../list_conversation_models.php | 71 - .../list_locations.php | 58 - .../undeploy_conversation_model.php | 87 -- .../clear_suggestion_feature_config.php | 107 -- .../create_conversation_profile.php | 83 - .../delete_conversation_profile.php | 69 - .../get_conversation_profile.php | 71 - .../get_location.php | 53 - .../list_conversation_profiles.php | 72 - .../list_locations.php | 58 - .../set_suggestion_feature_config.php | 110 -- .../update_conversation_profile.php | 79 - .../complete_conversation.php | 69 - .../create_conversation.php | 102 -- .../ConversationsClient/get_conversation.php | 68 - .../V2/ConversationsClient/get_location.php | 53 - .../list_conversations.php | 72 - .../V2/ConversationsClient/list_locations.php | 58 - .../V2/ConversationsClient/list_messages.php | 77 - .../V2/DocumentsClient/create_document.php | 112 -- .../V2/DocumentsClient/delete_document.php | 86 -- .../V2/DocumentsClient/export_document.php | 89 -- .../V2/DocumentsClient/get_document.php | 68 - .../V2/DocumentsClient/get_location.php | 53 - .../V2/DocumentsClient/import_documents.php | 110 -- .../V2/DocumentsClient/list_documents.php | 73 - .../V2/DocumentsClient/list_locations.php | 58 - .../V2/DocumentsClient/reload_document.php | 94 -- .../V2/DocumentsClient/update_document.php | 101 -- .../batch_create_entities.php | 121 -- .../batch_delete_entities.php | 96 -- .../batch_delete_entity_types.php | 97 -- .../batch_update_entities.php | 124 -- .../batch_update_entity_types.php | 92 -- .../EntityTypesClient/create_entity_type.php | 84 -- .../EntityTypesClient/delete_entity_type.php | 69 - .../V2/EntityTypesClient/get_entity_type.php | 67 - .../V2/EntityTypesClient/get_location.php | 53 - .../EntityTypesClient/list_entity_types.php | 72 - .../V2/EntityTypesClient/list_locations.php | 58 - .../EntityTypesClient/update_entity_type.php | 77 - .../EnvironmentsClient/create_environment.php | 75 - .../EnvironmentsClient/delete_environment.php | 71 - .../V2/EnvironmentsClient/get_environment.php | 73 - .../get_environment_history.php | 78 - .../V2/EnvironmentsClient/get_location.php | 53 - .../EnvironmentsClient/list_environments.php | 75 - .../V2/EnvironmentsClient/list_locations.php | 58 - .../EnvironmentsClient/update_environment.php | 69 - .../V2/FulfillmentsClient/get_fulfillment.php | 67 - .../V2/FulfillmentsClient/get_location.php | 53 - .../V2/FulfillmentsClient/list_locations.php | 58 - .../FulfillmentsClient/update_fulfillment.php | 77 - .../V2/IntentsClient/batch_delete_intents.php | 97 -- .../V2/IntentsClient/batch_update_intents.php | 92 -- .../V2/IntentsClient/create_intent.php | 77 - .../V2/IntentsClient/delete_intent.php | 70 - .../samples/V2/IntentsClient/get_intent.php | 67 - .../samples/V2/IntentsClient/get_location.php | 53 - .../samples/V2/IntentsClient/list_intents.php | 80 - .../V2/IntentsClient/list_locations.php | 58 - .../V2/IntentsClient/update_intent.php | 73 - .../create_knowledge_base.php | 76 - .../delete_knowledge_base.php | 66 - .../get_knowledge_base.php | 68 - .../V2/KnowledgeBasesClient/get_location.php | 53 - .../list_knowledge_bases.php | 72 - .../KnowledgeBasesClient/list_locations.php | 58 - .../update_knowledge_base.php | 70 - .../V2/ParticipantsClient/analyze_content.php | 77 - .../ParticipantsClient/create_participant.php | 71 - .../V2/ParticipantsClient/get_location.php | 53 - .../V2/ParticipantsClient/get_participant.php | 72 - .../V2/ParticipantsClient/list_locations.php | 58 - .../ParticipantsClient/list_participants.php | 73 - .../streaming_analyze_content.php | 97 -- .../ParticipantsClient/suggest_articles.php | 73 - .../suggest_faq_answers.php | 73 - .../suggest_smart_replies.php | 73 - .../ParticipantsClient/update_participant.php | 58 - .../create_session_entity_type.php | 140 -- .../delete_session_entity_type.php | 78 - .../SessionEntityTypesClient/get_location.php | 53 - .../get_session_entity_type.php | 80 - .../list_locations.php | 58 - .../list_session_entity_types.php | 80 - .../update_session_entity_type.php | 124 -- .../V2/SessionsClient/detect_intent.php | 100 -- .../V2/SessionsClient/get_location.php | 53 - .../V2/SessionsClient/list_locations.php | 58 - .../streaming_detect_intent.php | 109 -- .../V2/VersionsClient/create_version.php | 75 - .../V2/VersionsClient/delete_version.php | 69 - .../V2/VersionsClient/get_location.php | 53 - .../samples/V2/VersionsClient/get_version.php | 71 - .../V2/VersionsClient/list_locations.php | 58 - .../V2/VersionsClient/list_versions.php | 75 - .../V2/VersionsClient/update_version.php | 62 - .../Dialogflow/v2/src/V2/AgentsClient.php | 34 - .../v2/src/V2/AnswerRecordsClient.php | 34 - .../Dialogflow/v2/src/V2/ContextsClient.php | 34 - .../v2/src/V2/ConversationDatasetsClient.php | 34 - .../v2/src/V2/ConversationModelsClient.php | 34 - .../v2/src/V2/ConversationProfilesClient.php | 34 - .../v2/src/V2/ConversationsClient.php | 34 - .../Dialogflow/v2/src/V2/DocumentsClient.php | 34 - .../v2/src/V2/EntityTypesClient.php | 34 - .../v2/src/V2/EnvironmentsClient.php | 34 - .../v2/src/V2/FulfillmentsClient.php | 34 - .../v2/src/V2/Gapic/AgentsGapicClient.php | 1158 -------------- .../src/V2/Gapic/AnswerRecordsGapicClient.php | 626 -------- .../v2/src/V2/Gapic/ContextsGapicClient.php | 974 ------------ .../Gapic/ConversationDatasetsGapicClient.php | 813 ---------- .../Gapic/ConversationModelsGapicClient.php | 1193 --------------- .../Gapic/ConversationProfilesGapicClient.php | 1015 ------------- .../src/V2/Gapic/ConversationsGapicClient.php | 1086 ------------- .../v2/src/V2/Gapic/DocumentsGapicClient.php | 1266 ---------------- .../src/V2/Gapic/EntityTypesGapicClient.php | 1343 ----------------- .../src/V2/Gapic/EnvironmentsGapicClient.php | 965 ------------ .../src/V2/Gapic/FulfillmentsGapicClient.php | 507 ------- .../v2/src/V2/Gapic/IntentsGapicClient.php | 1104 -------------- .../V2/Gapic/KnowledgeBasesGapicClient.php | 772 ---------- .../src/V2/Gapic/ParticipantsGapicClient.php | 1217 --------------- .../Gapic/SessionEntityTypesGapicClient.php | 955 ------------ .../v2/src/V2/Gapic/SessionsGapicClient.php | 698 --------- .../v2/src/V2/Gapic/VersionsGapicClient.php | 779 ---------- .../Dialogflow/v2/src/V2/IntentsClient.php | 34 - .../v2/src/V2/KnowledgeBasesClient.php | 34 - .../v2/src/V2/ParticipantsClient.php | 34 - .../v2/src/V2/SessionEntityTypesClient.php | 34 - .../Dialogflow/v2/src/V2/SessionsClient.php | 34 - .../Dialogflow/v2/src/V2/VersionsClient.php | 34 - .../Dialogflow/v2/src/V2/gapic_metadata.json | 847 ----------- .../V2/resources/agents_client_config.json | 89 -- .../V2/resources/agents_descriptor_config.php | 68 - .../resources/agents_rest_client_config.php | 250 --- .../answer_records_client_config.json | 54 - .../answer_records_descriptor_config.php | 28 - .../answer_records_rest_client_config.php | 129 -- .../V2/resources/contexts_client_config.json | 74 - .../resources/contexts_descriptor_config.php | 28 - .../resources/contexts_rest_client_config.php | 245 --- .../conversation_datasets_client_config.json | 69 - ...onversation_datasets_descriptor_config.php | 58 - ...nversation_datasets_rest_client_config.php | 162 -- .../conversation_models_client_config.json | 89 -- .../conversation_models_descriptor_config.php | 88 -- ...conversation_models_rest_client_config.php | 240 --- .../conversation_profiles_client_config.json | 79 - ...onversation_profiles_descriptor_config.php | 48 - ...nversation_profiles_rest_client_config.php | 220 --- .../conversations_client_config.json | 74 - .../conversations_descriptor_config.php | 38 - .../conversations_rest_client_config.php | 194 --- .../V2/resources/documents_client_config.json | 84 -- .../resources/documents_descriptor_config.php | 88 -- .../documents_rest_client_config.php | 260 ---- .../resources/entity_types_client_config.json | 94 -- .../entity_types_descriptor_config.php | 78 - .../entity_types_rest_client_config.php | 271 ---- .../resources/environments_client_config.json | 74 - .../environments_descriptor_config.php | 38 - .../environments_rest_client_config.php | 205 --- .../resources/fulfillments_client_config.json | 54 - .../fulfillments_descriptor_config.php | 18 - .../fulfillments_rest_client_config.php | 129 -- .../V2/resources/intents_client_config.json | 79 - .../resources/intents_descriptor_config.php | 48 - .../resources/intents_rest_client_config.php | 222 --- .../knowledge_bases_client_config.json | 69 - .../knowledge_bases_descriptor_config.php | 28 - .../knowledge_bases_rest_client_config.php | 198 --- .../resources/participants_client_config.json | 109 -- .../participants_descriptor_config.php | 33 - .../participants_rest_client_config.php | 241 --- .../session_entity_types_client_config.json | 69 - ...session_entity_types_descriptor_config.php | 28 - ...ession_entity_types_rest_client_config.php | 220 --- .../V2/resources/sessions_client_config.json | 74 - .../resources/sessions_descriptor_config.php | 23 - .../resources/sessions_rest_client_config.php | 115 -- .../V2/resources/versions_client_config.json | 69 - .../resources/versions_descriptor_config.php | 28 - .../resources/versions_rest_client_config.php | 182 --- .../v2/tests/Unit/V2/AgentsClientTest.php | 1012 ------------- .../tests/Unit/V2/AnswerRecordsClientTest.php | 322 ---- .../v2/tests/Unit/V2/ContextsClientTest.php | 565 ------- .../V2/ConversationDatasetsClientTest.php | 700 --------- .../Unit/V2/ConversationModelsClientTest.php | 1064 ------------- .../V2/ConversationProfilesClientTest.php | 808 ---------- .../tests/Unit/V2/ConversationsClientTest.php | 579 ------- .../v2/tests/Unit/V2/DocumentsClientTest.php | 1109 -------------- .../tests/Unit/V2/EntityTypesClientTest.php | 1129 -------------- .../tests/Unit/V2/EnvironmentsClientTest.php | 587 ------- .../tests/Unit/V2/FulfillmentsClientTest.php | 320 ---- .../v2/tests/Unit/V2/IntentsClientTest.php | 805 ---------- .../Unit/V2/KnowledgeBasesClientTest.php | 514 ------- .../tests/Unit/V2/ParticipantsClientTest.php | 806 ---------- .../Unit/V2/SessionEntityTypesClientTest.php | 519 ------- .../v2/tests/Unit/V2/SessionsClientTest.php | 365 ----- .../v2/tests/Unit/V2/VersionsClientTest.php | 511 ------- 912 files changed, 1836 insertions(+), 99723 deletions(-) rename {owl-bot-staging/Dialogflow/v2 => Dialogflow}/samples/V2/ConversationsClient/suggest_conversation_summary.php (100%) rename {owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow => Dialogflow/src}/V2/AgentAssistantFeedback/SummarizationFeedback.php (92%) rename {owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow => Dialogflow/src}/V2/SuggestConversationSummaryRequest.php (98%) rename {owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow => Dialogflow/src}/V2/SuggestConversationSummaryResponse.php (98%) rename {owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow => Dialogflow/src}/V2/SuggestConversationSummaryResponse/Summary.php (94%) delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Agent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/AnswerRecord.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/AudioConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Context.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Conversation.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationDataset.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationEvent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationModel.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationProfile.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Document.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/EntityType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Environment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Fulfillment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Gcs.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Intent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/KnowledgeBase.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Participant.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Session.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/SessionEntityType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ValidationResult.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Version.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Webhook.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/ApiVersion.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/MatchMode.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/Tier.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/AnswerRelevance.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentCorrectness.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentEfficiency.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_AnswerRelevance.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_DocumentCorrectness.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_DocumentEfficiency.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_SummarizationFeedback.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantRecord.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_ApiVersion.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_MatchMode.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_Tier.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnnotatedMessagePart.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback/CorrectnessLevel.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback_CorrectnessLevel.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecord.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecordsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleAnswer.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleSuggestionModelMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AssistQueryParameters.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AudioEncoding.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply/AutomatedAgentReplyType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply_AutomatedAgentReplyType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchCreateEntitiesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntitiesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntityTypesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteIntentsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntitiesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CompleteConversationRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Context.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ContextsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/ConversationStage.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/LifecycleState.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDataset.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDatasetsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent/Type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent_Type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationInfo.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/ModelType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelEvaluation.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_ModelType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationPhoneNumber.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfile.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfilesGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_ConversationStage.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_LifecycleState.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateContextRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata/State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata_State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata/State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata_State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationProfileRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateDocumentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEntityTypeRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEnvironmentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateIntentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateKnowledgeBaseRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateParticipantRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateSessionEntityTypeRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateVersionRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAgentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAllContextsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteContextRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationProfileRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteDocumentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEntityTypeRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEnvironmentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteIntentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteKnowledgeBaseRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteSessionEntityTypeRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteVersionRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/KnowledgeType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/ReloadStatus.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_KnowledgeType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_ReloadStatus.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DocumentsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DtmfParameters.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/AutoExpansionMode.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Entity.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Kind.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypeBatch.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_AutoExpansionMode.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_Entity.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_Kind.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypesGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment/State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory/Entry.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory_Entry.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment_State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartComposeConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartReplyConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartComposeConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartReplyConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EventInput.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportDocumentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FaqAnswer.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature/Type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/GenericWebService.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature_Type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_GenericWebService.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FulfillmentsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsDestination.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsSources.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetAgentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetContextRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationDatasetRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelEvaluationRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationProfileRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetDocumentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEntityTypeRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentHistoryRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetFulfillmentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetIntentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetKnowledgeBaseRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetParticipantRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetSessionEntityTypeRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetValidationResultRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetVersionRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationModelConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationProcessConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionFeatureConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/ContextFilterSettings.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DocumentQuerySource.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/KnowledgeBaseQuerySource.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionTriggerSettings.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationModelConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationProcessConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_MessageAnalysisConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionFeatureConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_SuggestionTriggerSettings.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/LivePersonConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/SalesforceLiveAgentConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_LivePersonConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_SalesforceLiveAgentConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportAgentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentTemplate.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputAudioConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputDataset.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputTextConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/FollowupIntentInfo.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button/OpenUriAction.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction/UrlTypeHint.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/ImageDisplayOptions.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card/Button.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect/Item.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties/HorizontalAlignment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Image.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/LinkOutSuggestion.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect/Item.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaObject.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Platform.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/QuickReplies.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SelectItemInfo.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponses.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestion.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestions.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCard.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardCell.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardRow.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Text.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Parameter.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Part.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/WebhookState.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentBatch.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentView.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_FollowupIntentInfo.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BasicCard.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BasicCard_Button.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BasicCard_Button_OpenUriAction.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction_UrlTypeHint.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_BrowseCarouselCard_ImageDisplayOptions.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Card.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Card_Button.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_CarouselSelect.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_CarouselSelect_Item.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_ColumnProperties.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_ColumnProperties_HorizontalAlignment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Image.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_LinkOutSuggestion.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_ListSelect.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_ListSelect_Item.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_MediaContent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_MediaContent_ResponseMediaObject.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_MediaContent_ResponseMediaType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Platform.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_QuickReplies.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_SelectItemInfo.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_SimpleResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_SimpleResponses.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Suggestion.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Suggestions.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_TableCard.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_TableCardCell.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_TableCardRow.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Message_Text.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_Parameter.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_TrainingPhrase.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_TrainingPhrase_Part.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_TrainingPhrase_Type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_WebhookState.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBase.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBasesGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata/State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata_State.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/LoggingConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Message.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/MessageAnnotation.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig/MessageFormat.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig_MessageFormat.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OriginalDetectIntentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudio.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioEncoding.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant/Role.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant_Role.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ParticipantsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryInput.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryParameters.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryResult.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ReloadDocumentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/RestoreAgentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Sentiment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisRequestConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisResult.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType/EntityOverrideMode.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType_EntityOverrideMode.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityTypesGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetAgentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyAnswer.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics/TopNMetrics.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics_TopNMetrics.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyModelMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechContext.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechModelVariant.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechToTextConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechWordInfo.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SsmlVoiceGender.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult/MessageType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult_MessageType.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse_Summary.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature/Type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature_Type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionResult.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SynthesizeSpeechConfig.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmf.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmfEvents.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextInput.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextToSpeechSettings.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TrainAgentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelOperationMetadata.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateAnswerRecordRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateContextRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateConversationProfileRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateDocumentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEntityTypeRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEnvironmentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateFulfillmentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateIntentRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateKnowledgeBaseRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateParticipantRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateSessionEntityTypeRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateVersionRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError/Severity.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError_Severity.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationResult.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version/VersionStatus.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version_VersionStatus.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VersionsGrpcClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VoiceSelectionParams.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookRequest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookResponse.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/delete_agent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/export_agent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_agent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_validation_result.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/import_agent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/restore_agent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/search_agents.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/set_agent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/train_agent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_answer_records.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/update_answer_record.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/create_context.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_all_contexts.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_context.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_context.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_contexts.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/update_context.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_conversation_dataset.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/import_conversation_data.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_conversation_datasets.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model_evaluation.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/delete_conversation_model.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/deploy_conversation_model.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model_evaluation.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_model_evaluations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_models.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/undeploy_conversation_model.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/create_conversation_profile.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/delete_conversation_profile.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_conversation_profile.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_conversation_profiles.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/update_conversation_profile.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/complete_conversation.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/create_conversation.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_conversation.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_conversations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_messages.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/create_document.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/delete_document.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/export_document.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_document.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/import_documents.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_documents.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/reload_document.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/update_document.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_create_entities.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entities.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entity_types.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entities.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entity_types.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/create_entity_type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/delete_entity_type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_entity_type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_entity_types.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/update_entity_type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/create_environment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/delete_environment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment_history.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_environments.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/update_environment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_fulfillment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/update_fulfillment.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_delete_intents.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_update_intents.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/create_intent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/delete_intent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_intent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_intents.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/update_intent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/create_knowledge_base.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/delete_knowledge_base.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_knowledge_base.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_knowledge_bases.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/update_knowledge_base.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/analyze_content.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/create_participant.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_participant.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_participants.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/streaming_analyze_content.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_articles.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_faq_answers.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_smart_replies.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/update_participant.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/create_session_entity_type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/delete_session_entity_type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_session_entity_type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_session_entity_types.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/update_session_entity_type.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/detect_intent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/streaming_detect_intent.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/create_version.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/delete_version.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_location.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_version.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_locations.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_versions.php delete mode 100644 owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/update_version.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/AgentsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/AnswerRecordsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ContextsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ConversationDatasetsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ConversationModelsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ConversationProfilesClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ConversationsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/DocumentsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/EntityTypesClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/EnvironmentsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/FulfillmentsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AgentsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AnswerRecordsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ContextsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationDatasetsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationModelsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationProfilesGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/DocumentsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EntityTypesGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EnvironmentsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/FulfillmentsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/IntentsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/KnowledgeBasesGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ParticipantsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionEntityTypesGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/Gapic/VersionsGapicClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/IntentsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/KnowledgeBasesClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/ParticipantsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/SessionEntityTypesClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/SessionsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/VersionsClient.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_client_config.json delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_descriptor_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_rest_client_config.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AgentsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AnswerRecordsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ContextsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationDatasetsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationModelsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationProfilesClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/DocumentsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EntityTypesClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EnvironmentsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/FulfillmentsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/IntentsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/KnowledgeBasesClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ParticipantsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionEntityTypesClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionsClientTest.php delete mode 100644 owl-bot-staging/Dialogflow/v2/tests/Unit/V2/VersionsClientTest.php diff --git a/Dialogflow/metadata/V2/Agent.php b/Dialogflow/metadata/V2/Agent.php index caa3694defb376d297f260a4e6c44bd1e779f8ce..3f823d547bb2f2f155379f406c07c2d243b8b16e 100644 GIT binary patch delta 88 zcmdn0yIyz09%jZRoA)vc2r*8cd`{HB-Yz*OzcfWJJwHD^Csi*wKUY6JUq2-?F(*Gg bEhoQRKd~UQ%m_)KAjujbTaYx_S*!>E%4{Kb delta 78 zcmZ3lyH$6?9%jZ>oA)vc2r>(} diff --git a/Dialogflow/metadata/V2/AnswerRecord.php b/Dialogflow/metadata/V2/AnswerRecord.php index 172429094bf86c345bd86002ccb5f3ac5c041289..6c00b5c31b58d5265337daaff09f3bfa2b2fafc8 100644 GIT binary patch delta 266 zcmcbha7t-IJ2T5~DK5RqIxNzgmoa~5Wn|ktkJFz~Nhp^~thh8cH?b(QDzPLpKQBHl zH8mwEF*#d;MS)R++sI=wBcJT#16*P*!N|(opsJjhA2>2f^)YgZVwD!sVCFkerr|0XZWG3e1r>EuQm+L1MWR@8r2^1t*BV-GbCg0;P F0sz0)T6h2e delta 97 zcmX@5bU|T5J2Ok8B$wV~9Tw@$%b35jGO}!*$LY_w`7L)b3**Aci2@dCF6sIC={c!- y>G?T{dFgujMd|wKsd)uO`6c=K5UIq1%;JfGBHY#~nTa|1>1jFn<&$p+6afHmjUyZY diff --git a/Dialogflow/metadata/V2/AudioConfig.php b/Dialogflow/metadata/V2/AudioConfig.php index 75f9d8b4ed78ae38c3c6b30e9c6c903ffad63524..2f8a26e8eacf53a19ef221afa86d54788f95aa06 100644 GIT binary patch delta 95 zcmew?{Z@LzBqo+AVqCfty>&MqW@_bRyf)dB$IRX?IVZm~MK3)+KRqW^FF8L~KRsVR iB{MN6KRqoczg$1DAhXN}NuVIf8X;SdwD|~+J|h5+z$0z| delta 85 zcmaDW{aJd$Bqo+wVqCfty>&MqW@_bRyffL8$4t#7JwHD^Csi*!KPNFST`#{VT|YfF lub?QuBwrsQl~|BjJTXv&+d3sPF(*GgEhoQx^FAJZMgT-OA6fta diff --git a/Dialogflow/metadata/V2/Context.php b/Dialogflow/metadata/V2/Context.php index 2655f6de3341..12791ba0816e 100644 --- a/Dialogflow/metadata/V2/Context.php +++ b/Dialogflow/metadata/V2/Context.php @@ -23,7 +23,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Struct::initOnce(); $pool->internalAddGeneratedFile( ' -–" +" (google/cloud/dialogflow/v2/context.protogoogle.cloud.dialogflow.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/struct.proto" Context name ( BàA @@ -60,8 +60,8 @@ public static function initOnce() { CreateContext0.google.cloud.dialogflow.v2.CreateContextRequest#.google.cloud.dialogflow.v2.Context"Ô‚Ó䓼"1/v2/{parent=projects/*/agent/sessions/*}/contexts:contextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:contextZH"=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts:contextZ_"T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts:contextÚAparent,contextâ UpdateContext0.google.cloud.dialogflow.v2.UpdateContextRequest#.google.cloud.dialogflow.v2.Context"ù‚Óä“Ü29/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:contextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:contextZP2E/v2/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}:contextZg2\\/v2/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}:contextÚAcontext,update_mask‚ DeleteContext0.google.cloud.dialogflow.v2.DeleteContextRequest.google.protobuf.Empty"¦‚Ó䓘*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}Z?*=/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}ZV*T/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}ÚAnameŒ -DeleteAllContexts4.google.cloud.dialogflow.v2.DeleteAllContextsRequest.google.protobuf.Empty"¨‚Ó䓘*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZ?*=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contextsZV*T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contextsÚAparentxÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB› -com.google.cloud.dialogflow.v2B ContextProtoPZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflowø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' +DeleteAllContexts4.google.cloud.dialogflow.v2.DeleteAllContextsRequest.google.protobuf.Empty"¨‚Ó䓘*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZ?*=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contextsZV*T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contextsÚAparentxÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB• +com.google.cloud.dialogflow.v2B ContextProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' , true); static::$is_initialized = true; diff --git a/Dialogflow/metadata/V2/Conversation.php b/Dialogflow/metadata/V2/Conversation.php index 0858d18d88439cf0b3a132b7d9ff8124a7830f04..9bfeeba7ecdd62f7051d479d255f9c9d5e485fd4 100644 GIT binary patch delta 898 zcmbQFJYRc*7c*0j%4Q$tFYIPY`x&_ugGe#l?x~sS?Zzj2fIyYQG$nxfCZqWRnW_ zg-8gAfc2N8R+PjSXI7<3umBaZDqUyhQo?61)K!mSwSHD;g_ zBS20JCEkg8AwVO8p=P+|l@wJ9IdSnO<`tKx7R48(Cg&HWKtor1awDg_iz8Sj2rMCG z%q57aotuj}JGBz(N?tD3vc#OyR0*)Zt(Ytrjjr%+cIJM{qA2u*iAxH%LxpTXK2gT4 z0GdRk>_F=5@u`DEr_wdXrpr$zGaX=53ehh!(yvBISO@rI?DdNw=@As1R!}yUv}wht z6_u)#fN2IJpN1XrX54Z_N!n5sryM1LX;*Txn?Nl4EJiN5rw&ri=u)dR}tr|0XZWG3e1r>EuQm+L1MWCFc}5GY8pM&?Xb5G(=!TkJTT delta 112 zcmbQQJxO_k7cCHaOU)Y(A?s9Fu&-;{xRjT5YqvYg=Y?6~BMPk_(FmlNy=jTp- z$SOVghKQJ&OL~5OdQPfddVWq~UbQM!J5YF# diff --git a/Dialogflow/metadata/V2/ConversationDataset.php b/Dialogflow/metadata/V2/ConversationDataset.php index d14fcda9dfe028ddfc62e3b73ffece6d56e2213e..ade09fcd10c0575655fd1adcde5b3392ba310450 100644 GIT binary patch delta 98 zcmeyS{y}}iQD&BV@?55q3t6Nmrb%u7$IQgfxNtI~u${eKa!!6}ie7qtetJ%-UUGh} letN!sN@ikCetKF?ez|^PL1vi|l0ZR{HA1!^X>yBj5diESB!B<_ delta 88 zcmeyM{!M+uQD&AW@?55q3t6Nmrb%u7$IQgfxO_6Bu$`JqdVYR-PO4sdeokUux?X-! ox_)|UUO`cQNxnWrDzPB5cw(Rkw{=QpVorW~T26lX}N%>_&!7#ZhJPGqsMw@c2+FHO-)&(BZKN!3fv&(%-Q*H6hz%*jtr b%gHa-Pb|nRGeQz5NU}!A79>r6#8LzRwlg8U delta 78 zcmX@db%kp~J`>}-%>_&!7#WvNPGqrBb4kz7PtQr!OV7_q%uCnHFG|->Pt7YR$}h>+ ehe#zBWEM{h6ydf`$xO`2PfyFqFQ0ser3e6lwH>Jd diff --git a/Dialogflow/metadata/V2/ConversationModel.php b/Dialogflow/metadata/V2/ConversationModel.php index ffa92ae71d5ab61a13b64e5aa5c3bfa23847d003..4136092dc73e22d0cd8e2672e7ce3acbd50ee84d 100644 GIT binary patch delta 149 zcmaFt*6zN+hnex?W?$wREG*|)xTGg5ib*eK;b7Df(%_OVN-U4hD9ugGi%%^}%!w~a z%`M1DEJ=+|E-sVcP+-*HbYgzs$h?__Gh32z{^SBB8+*Itocz)hz4ZM2^qf?^`6*<@mo@k2716eJLZCTylQyWJXr$$-9-L z)m+l^^V4%u_0scm67$ma@{7{-(^K;bit4Zm!{~Y=jW&Ar0ON-=jx~D>!)NU=H#cR b<>Z&^Cl+Lu86gQ2Bv~V53z8;J()VrRV1)=B4Z97p3c`r{)zD<(K5^ eL!=T5GK(h$if~(}WG3e1r>EuQmrw4|{0IP=4<1GU diff --git a/Dialogflow/metadata/V2/Document.php b/Dialogflow/metadata/V2/Document.php index cc14e5eaf66555529827492dd31c9f37b5d71f4b..1204deeb9879e93544bb0a3dc83d41d6dc9561ee 100644 GIT binary patch delta 88 zcmexv{n2{ED`v*Mn_n|4N-|EH%qwebZrB7 delta 78 zcmexp{oQ)QD`v*Sn_n|4N;1xw%qwfG=8~SDpPrMdm!6-Kn3t}XUzDz&o|;!slwXps e50OeN$Sj^1D8g->l9`y3pPrVJUp~2Bwg>>frXD5$ diff --git a/Dialogflow/metadata/V2/EntityType.php b/Dialogflow/metadata/V2/EntityType.php index 1bf4435b628c34bb6fe92bb16916cd90c05ee321..7aa8f1a058824371f7ab3e846f26f2cac0f3d576 100644 GIT binary patch delta 98 zcmZp%`e(VJl9_Se<|^j766`Y=x#W`bb0-^cOHa0x5wW*R&dD!L(M!+IPtQr!1Ip;9 k=j*3rCg$X)r{(0A>n9dumKh-l6eL+AWDAlePm(DD0IlaE+yDRo delta 88 zcmexo*Tn*UK+T o*H2H)D=5k@$=8QSB^G2BPYe{{wob`R%*jtr%gHaF+#^#20AqO{$N&HU diff --git a/Dialogflow/metadata/V2/Environment.php b/Dialogflow/metadata/V2/Environment.php index 9cc01d0c52859aef950f8b5790ace26d93122f2b..af2ba4f9c4d9adbe03458d431b738a2bb4398af0 100644 GIT binary patch delta 88 zcmbQCJxO~52Mgo2&73R?1sG>eUM*r~Zl9`y3pPrVJUp`quvo0v=3Ic73)$tCCK>P^JekS$1>{DG?o0J0t=Gynhq delta 88 zcmca3_DF2QePinternalAddGeneratedFile( ' -¤ +ž $google/cloud/dialogflow/v2/gcs.protogoogle.cloud.dialogflow.v2" GcsSources uris ( BàA" GcsDestination -uri ( B— -com.google.cloud.dialogflow.v2BGcsProtoPZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflowø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' +uri ( B‘ +com.google.cloud.dialogflow.v2BGcsProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' , true); static::$is_initialized = true; diff --git a/Dialogflow/metadata/V2/HumanAgentAssistantEvent.php b/Dialogflow/metadata/V2/HumanAgentAssistantEvent.php index c807db82cc37..3f2efe820e73 100644 --- a/Dialogflow/metadata/V2/HumanAgentAssistantEvent.php +++ b/Dialogflow/metadata/V2/HumanAgentAssistantEvent.php @@ -17,13 +17,13 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); $pool->internalAddGeneratedFile( ' -£ + cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' , true); static::$is_initialized = true; diff --git a/Dialogflow/metadata/V2/Intent.php b/Dialogflow/metadata/V2/Intent.php index 88b9ad43120e80a7aea221046d3c28bd6666e4ce..f7c9f4f8346b04c709d395dfef0c00af1451101e 100644 GIT binary patch delta 98 zcmX?;d@OmxJ7&h7&F`7N=&(;=^JekS$1>9A#Jp07W4sY5)KL delta 88 zcmX?>d?tCrJ7&g7o8L2k(P5v($R(GYpF6pcM|v`=p@5o8dVYR-PO4sdeokUux?X-! ox_)|UUO`cQNxnWrDzPB5cw(Rkw{=QpVorW~T26lXinternalAddGeneratedFile( ' -ä +Þ /google/cloud/dialogflow/v2/knowledge_base.protogoogle.cloud.dialogflow.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"ü KnowledgeBase name (  @@ -56,8 +56,8 @@ public static function initOnce() { GetKnowledgeBase3.google.cloud.dialogflow.v2.GetKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"œ‚Óä“Ž&/v2/{name=projects/*/knowledgeBases/*}Z42/v2/{name=projects/*/locations/*/knowledgeBases/*}Z.,/v2/{name=projects/*/agent/knowledgeBases/*}ÚAnameØ CreateKnowledgeBase6.google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"Ý‚Ó䓾"&/v2/{parent=projects/*}/knowledgeBases:knowledge_baseZD"2/v2/{parent=projects/*/locations/*}/knowledgeBases:knowledge_baseZ>",/v2/{parent=projects/*/agent}/knowledgeBases:knowledge_baseÚAparent,knowledge_base„ DeleteKnowledgeBase6.google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest.google.protobuf.Empty"œ‚Óä“Ž*&/v2/{name=projects/*/knowledgeBases/*}Z4*2/v2/{name=projects/*/locations/*/knowledgeBases/*}Z.*,/v2/{name=projects/*/agent/knowledgeBases/*}ÚAnameŠ -UpdateKnowledgeBase6.google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"‚Óä“ë25/v2/{knowledge_base.name=projects/*/knowledgeBases/*}:knowledge_baseZS2A/v2/{knowledge_base.name=projects/*/locations/*/knowledgeBases/*}:knowledge_baseZM2;/v2/{knowledge_base.name=projects/*/agent/knowledgeBases/*}:knowledge_baseÚAknowledge_base,update_maskxÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB¡ -com.google.cloud.dialogflow.v2BKnowledgeBaseProtoPZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflowø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' +UpdateKnowledgeBase6.google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"‚Óä“ë25/v2/{knowledge_base.name=projects/*/knowledgeBases/*}:knowledge_baseZS2A/v2/{knowledge_base.name=projects/*/locations/*/knowledgeBases/*}:knowledge_baseZM2;/v2/{knowledge_base.name=projects/*/agent/knowledgeBases/*}:knowledge_baseÚAknowledge_base,update_maskxÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB› +com.google.cloud.dialogflow.v2BKnowledgeBaseProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' , true); static::$is_initialized = true; diff --git a/Dialogflow/metadata/V2/Participant.php b/Dialogflow/metadata/V2/Participant.php index baa7cfb205a360bc84b71bb5cad493264af17c04..778b215c7776706da38d94b649a87a6dfb5a1b58 100644 GIT binary patch delta 104 zcmbOd+ZVgRjD@8!giB|lx6bA?76(oCnT%X=$@#gH1^J{WpU@Sxw@c2+FHO-)&(BZK qN!0_&=%?rFr(`DPPt7YR$}h>+he#zBWEM{h6ydf`$xO`2PfyFqFP|)7GXUt#Q19R192mJyX2hw(iFY){QUHsRK4WbQX j{glkaoc#2(ocwbA#DdH+BP4->Bx{6hLDJ@MiQ|j_?rbE| delta 86 zcmbPXGS6hgR~DB0np_%_-?2(>7GXUt#Q0(I192lYm-PJn^qf?^^!%K}ymY<%qICWA m)VzYC{E~cqh*V-hX7R*85pL_0%*34h^t7D(^38z~#~A^aC?LK7 diff --git a/Dialogflow/metadata/V2/SessionEntityType.php b/Dialogflow/metadata/V2/SessionEntityType.php index a43fca1e6047bed4b4ef8547bb010b27e2f00555..51d43436e46cc34ccd380add5212c419110897f2 100644 GIT binary patch delta 98 zcmeya^HFER1ZKurnxBvhE delta 88 zcmeyU^Id1d1ZKtsn$R(GYpF6oxSbFkOQE4@o^!)tvoK(H^{G7zRbiMqd obp7?ql6-xLRAND9@x(w8ZtIlH#GL%}w4D6%$^S)*0Lq9VqW}N^ diff --git a/Dialogflow/metadata/V2/ValidationResult.php b/Dialogflow/metadata/V2/ValidationResult.php index 15fa7a3b1d9f8c170aee791b1bc248def6c561b0..9baa2f455897615e8d5f736e100c23154b2224af 100644 GIT binary patch delta 88 zcmaFE@r+}`2S&#An?EvkFfz`YT*Yi{Zl9`y3pPrVJUq1N@a}fZ>b{??+ diff --git a/Dialogflow/metadata/V2/Version.php b/Dialogflow/metadata/V2/Version.php index fa9c3ec1d85caab250c3d4d510e7e41f4622e462..b1f9bc09a0945675df9294d88105e9ba9aede058 100644 GIT binary patch delta 98 zcmdllyHj>U9y4Rh=6vQfF7~O6Tyn|zxsxBVNl*UHD`;<*oReRgqL-eZpPrMd2b9rI k&(}}MOw7qoPs_?ZJm;tn3JELmXlvT*`2Ql0CDjj@&Et; diff --git a/Dialogflow/metadata/V2/Webhook.php b/Dialogflow/metadata/V2/Webhook.php index f09812615c47..b227dbf2f949 100644 --- a/Dialogflow/metadata/V2/Webhook.php +++ b/Dialogflow/metadata/V2/Webhook.php @@ -21,7 +21,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Struct::initOnce(); $pool->internalAddGeneratedFile( ' -Ù +Ó (google/cloud/dialogflow/v2/webhook.protogoogle.cloud.dialogflow.v2\'google/cloud/dialogflow/v2/intent.proto(google/cloud/dialogflow/v2/session.proto4google/cloud/dialogflow/v2/session_entity_type.protogoogle/protobuf/struct.proto"Ö WebhookRequest session (  @@ -40,8 +40,8 @@ public static function initOnce() { OriginalDetectIntentRequest source (  version ( ( -payload ( 2.google.protobuf.StructB› -com.google.cloud.dialogflow.v2B WebhookProtoPZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflowø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' +payload ( 2.google.protobuf.StructB• +com.google.cloud.dialogflow.v2B WebhookProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' , true); static::$is_initialized = true; diff --git a/Dialogflow/samples/V2/AgentsClient/export_agent.php b/Dialogflow/samples/V2/AgentsClient/export_agent.php index 3be3b1f551aa..499f04654e64 100644 --- a/Dialogflow/samples/V2/AgentsClient/export_agent.php +++ b/Dialogflow/samples/V2/AgentsClient/export_agent.php @@ -38,15 +38,16 @@ * * - `metadata`: An empty [Struct * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse] + * - `response`: + * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse] * * @param string $formattedParent The project that the agent to export is associated with. * Format: `projects/`. Please see * {@see AgentsClient::projectName()} for help formatting this field. - * @param string $agentUri The [Google Cloud Storage](https://cloud.google.com/storage/docs/) - * URI to export the agent to. - * The format of this URI must be `gs:///`. - * If left unspecified, the serialized agent is returned inline. + * @param string $agentUri The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. * * Dialogflow performs a write operation for the Cloud Storage object * on the caller's behalf, so your request authentication must diff --git a/Dialogflow/samples/V2/AgentsClient/import_agent.php b/Dialogflow/samples/V2/AgentsClient/import_agent.php index ba8d2ca024b4..27fd7f0819d9 100644 --- a/Dialogflow/samples/V2/AgentsClient/import_agent.php +++ b/Dialogflow/samples/V2/AgentsClient/import_agent.php @@ -33,11 +33,13 @@ * * Uploads new intents and entity types without deleting the existing ones. * Intents and entity types with the same name are replaced with the new - * versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft - * agent will be trained automatically (unless disabled in agent settings). - * However, once the import is done, training may not be completed yet. Please - * call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train - * explicitly. + * versions from + * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After + * the import, the imported draft agent will be trained automatically (unless + * disabled in agent settings). However, once the import is done, training may + * not be completed yet. Please call + * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the + * operation it returns in order to train explicitly. * * This method is a [long-running * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). diff --git a/Dialogflow/samples/V2/AgentsClient/restore_agent.php b/Dialogflow/samples/V2/AgentsClient/restore_agent.php index d2ced5ba8db3..36c98f3c555b 100644 --- a/Dialogflow/samples/V2/AgentsClient/restore_agent.php +++ b/Dialogflow/samples/V2/AgentsClient/restore_agent.php @@ -35,8 +35,9 @@ * entity types in the older version are deleted. After the restore, the * restored draft agent will be trained automatically (unless disabled in * agent settings). However, once the restore is done, training may not be - * completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it - * returns in order to train explicitly. + * completed yet. Please call + * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the + * operation it returns in order to train explicitly. * * This method is a [long-running * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). diff --git a/Dialogflow/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php b/Dialogflow/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php index df76565755fc..c980592bbde2 100644 --- a/Dialogflow/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php +++ b/Dialogflow/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php @@ -36,8 +36,10 @@ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata] - * - `response`: [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset] + * - `metadata`: + * [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata] + * - `response`: + * [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset] * * @param string $parent The project to create conversation dataset for. Format: * `projects//locations/` diff --git a/Dialogflow/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php b/Dialogflow/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php index de23dc6b7ab5..4b9239b2f860 100644 --- a/Dialogflow/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php +++ b/Dialogflow/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php @@ -35,7 +35,8 @@ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata] + * - `metadata`: + * [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * diff --git a/Dialogflow/samples/V2/ConversationDatasetsClient/import_conversation_data.php b/Dialogflow/samples/V2/ConversationDatasetsClient/import_conversation_data.php index 7518846a5ac3..e0b8f76f4af6 100644 --- a/Dialogflow/samples/V2/ConversationDatasetsClient/import_conversation_data.php +++ b/Dialogflow/samples/V2/ConversationDatasetsClient/import_conversation_data.php @@ -39,8 +39,10 @@ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata] - * - `response`: [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse] + * - `metadata`: + * [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata] + * - `response`: + * [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse] * * @param string $formattedName Dataset resource name. Format: * `projects//locations//locations/` + * @param string $formattedParent The project and location name to list all conversation datasets + * for. Format: `projects//locations/` * Please see {@see ConversationDatasetsClient::locationName()} for help formatting this field. */ function list_conversation_datasets_sample(string $formattedParent): void diff --git a/Dialogflow/samples/V2/ConversationModelsClient/create_conversation_model.php b/Dialogflow/samples/V2/ConversationModelsClient/create_conversation_model.php index a7a4ddb6fa89..3d47ec9fc47a 100644 --- a/Dialogflow/samples/V2/ConversationModelsClient/create_conversation_model.php +++ b/Dialogflow/samples/V2/ConversationModelsClient/create_conversation_model.php @@ -38,8 +38,10 @@ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata] - * - `response`: [ConversationModel][google.cloud.dialogflow.v2.ConversationModel] + * - `metadata`: + * [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata] + * - `response`: + * [ConversationModel][google.cloud.dialogflow.v2.ConversationModel] * * @param string $conversationModelDisplayName The display name of the model. At most 64 bytes long. * @param string $formattedConversationModelDatasetsDataset ConversationDataset resource name. Format: diff --git a/Dialogflow/samples/V2/ConversationModelsClient/delete_conversation_model.php b/Dialogflow/samples/V2/ConversationModelsClient/delete_conversation_model.php index 90133497fb60..cd116a8f198d 100644 --- a/Dialogflow/samples/V2/ConversationModelsClient/delete_conversation_model.php +++ b/Dialogflow/samples/V2/ConversationModelsClient/delete_conversation_model.php @@ -35,7 +35,8 @@ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata] + * - `metadata`: + * [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * diff --git a/Dialogflow/samples/V2/ConversationModelsClient/deploy_conversation_model.php b/Dialogflow/samples/V2/ConversationModelsClient/deploy_conversation_model.php index d65adcd0fb52..d62810b1e426 100644 --- a/Dialogflow/samples/V2/ConversationModelsClient/deploy_conversation_model.php +++ b/Dialogflow/samples/V2/ConversationModelsClient/deploy_conversation_model.php @@ -38,7 +38,8 @@ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata] + * - `metadata`: + * [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * diff --git a/Dialogflow/samples/V2/ConversationModelsClient/undeploy_conversation_model.php b/Dialogflow/samples/V2/ConversationModelsClient/undeploy_conversation_model.php index 008a632cb63c..9e21b35c55fa 100644 --- a/Dialogflow/samples/V2/ConversationModelsClient/undeploy_conversation_model.php +++ b/Dialogflow/samples/V2/ConversationModelsClient/undeploy_conversation_model.php @@ -38,7 +38,8 @@ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata] + * - `metadata`: + * [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * diff --git a/Dialogflow/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php b/Dialogflow/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php index ec2a805848ea..c9894d735cb4 100644 --- a/Dialogflow/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php +++ b/Dialogflow/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php @@ -39,8 +39,10 @@ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata] - * - `response`: [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] + * - `metadata`: + * [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata] + * - `response`: + * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] * * @param string $conversationProfile The Conversation Profile to add or update the suggestion feature * config. Format: `projects//locations//locations/`. Please see diff --git a/Dialogflow/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php b/Dialogflow/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php index e4339e733246..5fee12f454c1 100644 --- a/Dialogflow/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php +++ b/Dialogflow/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php @@ -41,8 +41,10 @@ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata] - * - `response`: [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] + * - `metadata`: + * [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata] + * - `response`: + * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] * * If a long running operation to add or update suggestion feature * config for the same conversation profile, participant role and suggestion diff --git a/Dialogflow/samples/V2/ConversationProfilesClient/update_conversation_profile.php b/Dialogflow/samples/V2/ConversationProfilesClient/update_conversation_profile.php index 1087f3968ec2..476eadcecbe9 100644 --- a/Dialogflow/samples/V2/ConversationProfilesClient/update_conversation_profile.php +++ b/Dialogflow/samples/V2/ConversationProfilesClient/update_conversation_profile.php @@ -33,7 +33,8 @@ * * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] * aren't populated in the response. You can retrieve them via - * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] API. + * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] + * API. * * @param string $conversationProfileDisplayName Human readable name for this profile. Max length 1024 bytes. */ diff --git a/Dialogflow/samples/V2/ConversationsClient/create_conversation.php b/Dialogflow/samples/V2/ConversationsClient/create_conversation.php index 09bd9fe07468..eeab8258e543 100644 --- a/Dialogflow/samples/V2/ConversationsClient/create_conversation.php +++ b/Dialogflow/samples/V2/ConversationsClient/create_conversation.php @@ -41,11 +41,14 @@ * For Assist Stage, there's no dialogflow agent responding to user queries. * But we will provide suggestions which are generated from conversation. * - * If [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] is configured for a dialogflow - * agent, conversation will start from `Automated Agent Stage`, otherwise, it - * will start from `Assist Stage`. And during `Automated Agent Stage`, once an - * [Intent][google.cloud.dialogflow.v2.Intent] with [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] is triggered, conversation - * will transfer to Assist Stage. + * If + * [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] + * is configured for a dialogflow agent, conversation will start from + * `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And + * during `Automated Agent Stage`, once an + * [Intent][google.cloud.dialogflow.v2.Intent] with + * [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] + * is triggered, conversation will transfer to Assist Stage. * * @param string $formattedParent Resource identifier of the project creating the conversation. * Format: `projects//locations/`. Please see diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/suggest_conversation_summary.php b/Dialogflow/samples/V2/ConversationsClient/suggest_conversation_summary.php similarity index 100% rename from owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/suggest_conversation_summary.php rename to Dialogflow/samples/V2/ConversationsClient/suggest_conversation_summary.php diff --git a/Dialogflow/samples/V2/DocumentsClient/create_document.php b/Dialogflow/samples/V2/DocumentsClient/create_document.php index a0f75c905edc..d2d5acd0820d 100644 --- a/Dialogflow/samples/V2/DocumentsClient/create_document.php +++ b/Dialogflow/samples/V2/DocumentsClient/create_document.php @@ -37,7 +37,8 @@ * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] * - `response`: [Document][google.cloud.dialogflow.v2.Document] * * @param string $formattedParent The knowledge base to create a document for. diff --git a/Dialogflow/samples/V2/DocumentsClient/delete_document.php b/Dialogflow/samples/V2/DocumentsClient/delete_document.php index 70b0419fe99b..1a4c829003b1 100644 --- a/Dialogflow/samples/V2/DocumentsClient/delete_document.php +++ b/Dialogflow/samples/V2/DocumentsClient/delete_document.php @@ -35,7 +35,8 @@ * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * diff --git a/Dialogflow/samples/V2/DocumentsClient/export_document.php b/Dialogflow/samples/V2/DocumentsClient/export_document.php index 810aff29509e..6bb7e5b92932 100644 --- a/Dialogflow/samples/V2/DocumentsClient/export_document.php +++ b/Dialogflow/samples/V2/DocumentsClient/export_document.php @@ -37,7 +37,8 @@ * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] * - `response`: [Document][google.cloud.dialogflow.v2.Document] * * @param string $formattedName The name of the document to export. diff --git a/Dialogflow/samples/V2/DocumentsClient/import_documents.php b/Dialogflow/samples/V2/DocumentsClient/import_documents.php index 36afd5857508..2cd4190fab0a 100644 --- a/Dialogflow/samples/V2/DocumentsClient/import_documents.php +++ b/Dialogflow/samples/V2/DocumentsClient/import_documents.php @@ -40,8 +40,10 @@ * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: + * [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse] * * @param string $formattedParent The knowledge base to import documents into. * Format: `projects//locations/.google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency document_efficiency = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $document_efficiency = 0; + /** + * Optional. Feedback for conversation summarization. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback summarization_feedback = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $summarization_feedback = null; /** * Constructor. @@ -72,8 +80,12 @@ class AgentAssistantFeedback extends \Google\Protobuf\Internal\Message * @type int $document_efficiency * Optional. Whether or not the suggested document is efficient. For example, * if the document is poorly written, hard to understand, hard to use or - * too long to find useful information, [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] is + * too long to find useful information, + * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] + * is * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. + * @type \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback $summarization_feedback + * Optional. Feedback for conversation summarization. * } */ public function __construct($data = NULL) { @@ -158,7 +170,9 @@ public function setDocumentCorrectness($var) /** * Optional. Whether or not the suggested document is efficient. For example, * if the document is poorly written, hard to understand, hard to use or - * too long to find useful information, [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] is + * too long to find useful information, + * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] + * is * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. * * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency document_efficiency = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -172,7 +186,9 @@ public function getDocumentEfficiency() /** * Optional. Whether or not the suggested document is efficient. For example, * if the document is poorly written, hard to understand, hard to use or - * too long to find useful information, [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] is + * too long to find useful information, + * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] + * is * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. * * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency document_efficiency = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -187,5 +203,41 @@ public function setDocumentEfficiency($var) return $this; } + /** + * Optional. Feedback for conversation summarization. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback summarization_feedback = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback|null + */ + public function getSummarizationFeedback() + { + return $this->summarization_feedback; + } + + public function hasSummarizationFeedback() + { + return isset($this->summarization_feedback); + } + + public function clearSummarizationFeedback() + { + unset($this->summarization_feedback); + } + + /** + * Optional. Feedback for conversation summarization. + * + * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback summarization_feedback = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback $var + * @return $this + */ + public function setSummarizationFeedback($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback::class); + $this->summarization_feedback = $var; + + return $this; + } + } diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/SummarizationFeedback.php b/Dialogflow/src/V2/AgentAssistantFeedback/SummarizationFeedback.php similarity index 92% rename from owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/SummarizationFeedback.php rename to Dialogflow/src/V2/AgentAssistantFeedback/SummarizationFeedback.php index 7191a6938718..535a439949bf 100644 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/SummarizationFeedback.php +++ b/Dialogflow/src/V2/AgentAssistantFeedback/SummarizationFeedback.php @@ -20,19 +20,19 @@ class SummarizationFeedback extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; */ - protected $start_time = null; + private $start_time = null; /** * Timestamp when the summary was submitted. * * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; */ - protected $submit_time = null; + private $submit_time = null; /** * Text of actual submitted summary. * * Generated from protobuf field string summary_text = 3; */ - protected $summary_text = ''; + private $summary_text = ''; /** * Constructor. @@ -153,6 +153,4 @@ public function setSummaryText($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SummarizationFeedback::class, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback_SummarizationFeedback::class); diff --git a/Dialogflow/src/V2/AnalyzeContentRequest.php b/Dialogflow/src/V2/AnalyzeContentRequest.php index bf6c3e3cd03f..19bc3fad1400 100644 --- a/Dialogflow/src/V2/AnalyzeContentRequest.php +++ b/Dialogflow/src/V2/AnalyzeContentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]. + * The request message for + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]. * * Generated from protobuf message google.cloud.dialogflow.v2.AnalyzeContentRequest */ diff --git a/Dialogflow/src/V2/AnalyzeContentResponse.php b/Dialogflow/src/V2/AnalyzeContentResponse.php index 841af3903358..1fcaec403132 100644 --- a/Dialogflow/src/V2/AnalyzeContentResponse.php +++ b/Dialogflow/src/V2/AnalyzeContentResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]. + * The response message for + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]. * * Generated from protobuf message google.cloud.dialogflow.v2.AnalyzeContentResponse */ @@ -41,7 +42,9 @@ class AnalyzeContentResponse extends \Google\Protobuf\Internal\Message * Only set if a Dialogflow automated agent has responded. * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] instead. + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] + * instead. * * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 3; */ @@ -54,7 +57,8 @@ class AnalyzeContentResponse extends \Google\Protobuf\Internal\Message private $message = null; /** * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. * Note that any failure of Agent Assist features will not lead to the overall * failure of an AnalyzeContent API call. Instead, the features will @@ -66,7 +70,8 @@ class AnalyzeContentResponse extends \Google\Protobuf\Internal\Message private $human_agent_suggestion_results; /** * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. * Same as human_agent_suggestion_results, any failure of Agent Assist * features will not lead to the overall failure of an AnalyzeContent API @@ -107,12 +112,15 @@ class AnalyzeContentResponse extends \Google\Protobuf\Internal\Message * Only set if a Dialogflow automated agent has responded. * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] instead. + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] + * instead. * @type \Google\Cloud\Dialogflow\V2\Message $message * Message analyzed by CCAI. * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $human_agent_suggestion_results * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. * Note that any failure of Agent Assist features will not lead to the overall * failure of an AnalyzeContent API call. Instead, the features will @@ -120,7 +128,8 @@ class AnalyzeContentResponse extends \Google\Protobuf\Internal\Message * SuggestionResult. * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $end_user_suggestion_results * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. * Same as human_agent_suggestion_results, any failure of Agent Assist * features will not lead to the overall failure of an AnalyzeContent API @@ -221,7 +230,9 @@ public function setReplyAudio($var) * Only set if a Dialogflow automated agent has responded. * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] instead. + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] + * instead. * * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 3; * @return \Google\Cloud\Dialogflow\V2\AutomatedAgentReply|null @@ -245,7 +256,9 @@ public function clearAutomatedAgentReply() * Only set if a Dialogflow automated agent has responded. * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] instead. + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] + * instead. * * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 3; * @param \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $var @@ -297,7 +310,8 @@ public function setMessage($var) /** * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. * Note that any failure of Agent Assist features will not lead to the overall * failure of an AnalyzeContent API call. Instead, the features will @@ -314,7 +328,8 @@ public function getHumanAgentSuggestionResults() /** * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. * Note that any failure of Agent Assist features will not lead to the overall * failure of an AnalyzeContent API call. Instead, the features will @@ -335,7 +350,8 @@ public function setHumanAgentSuggestionResults($var) /** * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. * Same as human_agent_suggestion_results, any failure of Agent Assist * features will not lead to the overall failure of an AnalyzeContent API @@ -352,7 +368,8 @@ public function getEndUserSuggestionResults() /** * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. * Same as human_agent_suggestion_results, any failure of Agent Assist * features will not lead to the overall failure of an AnalyzeContent API diff --git a/Dialogflow/src/V2/AnswerRecord.php b/Dialogflow/src/V2/AnswerRecord.php index 101a981299de..7c67e1957fce 100644 --- a/Dialogflow/src/V2/AnswerRecord.php +++ b/Dialogflow/src/V2/AnswerRecord.php @@ -23,9 +23,11 @@ * agent assistant suggestion generated. * A typical workflow for customers provide feedback to an answer is: * 1. For human agent assistant, customers get suggestion via ListSuggestions - * API. Together with the answers, [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] are returned to the - * customers. - * 2. The customer uses the [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the + * API. Together with the answers, + * [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] are + * returned to the customers. + * 2. The customer uses the + * [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the * [UpdateAnswerRecord][] method to send feedback about a specific answer * that they believe is wrong. * @@ -43,8 +45,8 @@ class AnswerRecord extends \Google\Protobuf\Internal\Message private $name = ''; /** * Required. The AnswerFeedback for this record. You can set this with - * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] in order to give us feedback about - * this answer. + * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] + * in order to give us feedback about this answer. * * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback answer_feedback = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -63,8 +65,8 @@ class AnswerRecord extends \Google\Protobuf\Internal\Message * ID>/answerRecords/`. * @type \Google\Cloud\Dialogflow\V2\AnswerFeedback $answer_feedback * Required. The AnswerFeedback for this record. You can set this with - * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] in order to give us feedback about - * this answer. + * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] + * in order to give us feedback about this answer. * @type \Google\Cloud\Dialogflow\V2\AgentAssistantRecord $agent_assistant_record * Output only. The record for human agent assistant. * } @@ -106,8 +108,8 @@ public function setName($var) /** * Required. The AnswerFeedback for this record. You can set this with - * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] in order to give us feedback about - * this answer. + * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] + * in order to give us feedback about this answer. * * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback answer_feedback = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\Dialogflow\V2\AnswerFeedback|null @@ -129,8 +131,8 @@ public function clearAnswerFeedback() /** * Required. The AnswerFeedback for this record. You can set this with - * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] in order to give us feedback about - * this answer. + * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] + * in order to give us feedback about this answer. * * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback answer_feedback = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\Dialogflow\V2\AnswerFeedback $var diff --git a/Dialogflow/src/V2/ArticleSuggestionModelMetadata.php b/Dialogflow/src/V2/ArticleSuggestionModelMetadata.php index e738d94f8729..7e0ac5a2e4a9 100644 --- a/Dialogflow/src/V2/ArticleSuggestionModelMetadata.php +++ b/Dialogflow/src/V2/ArticleSuggestionModelMetadata.php @@ -16,7 +16,8 @@ class ArticleSuggestionModelMetadata extends \Google\Protobuf\Internal\Message { /** - * Optional. Type of the article suggestion model. If not provided, model_type is used. + * Optional. Type of the article suggestion model. If not provided, model_type + * is used. * * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -29,7 +30,8 @@ class ArticleSuggestionModelMetadata extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $training_model_type - * Optional. Type of the article suggestion model. If not provided, model_type is used. + * Optional. Type of the article suggestion model. If not provided, model_type + * is used. * } */ public function __construct($data = NULL) { @@ -38,7 +40,8 @@ public function __construct($data = NULL) { } /** - * Optional. Type of the article suggestion model. If not provided, model_type is used. + * Optional. Type of the article suggestion model. If not provided, model_type + * is used. * * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -49,7 +52,8 @@ public function getTrainingModelType() } /** - * Optional. Type of the article suggestion model. If not provided, model_type is used. + * Optional. Type of the article suggestion model. If not provided, model_type + * is used. * * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/Dialogflow/src/V2/AssistQueryParameters.php b/Dialogflow/src/V2/AssistQueryParameters.php index d526ca6b4d6a..2deb569bf5cd 100644 --- a/Dialogflow/src/V2/AssistQueryParameters.php +++ b/Dialogflow/src/V2/AssistQueryParameters.php @@ -18,7 +18,8 @@ class AssistQueryParameters extends \Google\Protobuf\Internal\Message /** * Key-value filters on the metadata of documents returned by article * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple * values for a metadata key should be concatenated by comma. For example, * filters to match all documents that have 'US' or 'CA' in their market * metadata values and 'agent' in their user metadata values will be @@ -46,7 +47,8 @@ class AssistQueryParameters extends \Google\Protobuf\Internal\Message * @type array|\Google\Protobuf\Internal\MapField $documents_metadata_filters * Key-value filters on the metadata of documents returned by article * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple * values for a metadata key should be concatenated by comma. For example, * filters to match all documents that have 'US' or 'CA' in their market * metadata values and 'agent' in their user metadata values will be @@ -70,7 +72,8 @@ public function __construct($data = NULL) { /** * Key-value filters on the metadata of documents returned by article * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple * values for a metadata key should be concatenated by comma. For example, * filters to match all documents that have 'US' or 'CA' in their market * metadata values and 'agent' in their user metadata values will be @@ -96,7 +99,8 @@ public function getDocumentsMetadataFilters() /** * Key-value filters on the metadata of documents returned by article * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple * values for a metadata key should be concatenated by comma. For example, * filters to match all documents that have 'US' or 'CA' in their market * metadata values and 'agent' in their user metadata values will be diff --git a/Dialogflow/src/V2/AutomatedAgentReply.php b/Dialogflow/src/V2/AutomatedAgentReply.php index 80160f13d32a..3f2e31010a9f 100644 --- a/Dialogflow/src/V2/AutomatedAgentReply.php +++ b/Dialogflow/src/V2/AutomatedAgentReply.php @@ -16,7 +16,9 @@ class AutomatedAgentReply extends \Google\Protobuf\Internal\Message { /** - * Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] call. + * Response of the Dialogflow + * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] + * call. * * Generated from protobuf field .google.cloud.dialogflow.v2.DetectIntentResponse detect_intent_response = 1; */ @@ -51,7 +53,9 @@ class AutomatedAgentReply extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\Dialogflow\V2\DetectIntentResponse $detect_intent_response - * Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] call. + * Response of the Dialogflow + * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] + * call. * @type int $automated_agent_reply_type * AutomatedAgentReply type. * @type bool $allow_cancellation @@ -70,7 +74,9 @@ public function __construct($data = NULL) { } /** - * Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] call. + * Response of the Dialogflow + * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] + * call. * * Generated from protobuf field .google.cloud.dialogflow.v2.DetectIntentResponse detect_intent_response = 1; * @return \Google\Cloud\Dialogflow\V2\DetectIntentResponse|null @@ -91,7 +97,9 @@ public function clearDetectIntentResponse() } /** - * Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] call. + * Response of the Dialogflow + * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] + * call. * * Generated from protobuf field .google.cloud.dialogflow.v2.DetectIntentResponse detect_intent_response = 1; * @param \Google\Cloud\Dialogflow\V2\DetectIntentResponse $var diff --git a/Dialogflow/src/V2/BatchCreateEntitiesRequest.php b/Dialogflow/src/V2/BatchCreateEntitiesRequest.php index d7df79a96618..fb576df8f4e9 100644 --- a/Dialogflow/src/V2/BatchCreateEntitiesRequest.php +++ b/Dialogflow/src/V2/BatchCreateEntitiesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities]. + * The request message for + * [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities]. * * Generated from protobuf message google.cloud.dialogflow.v2.BatchCreateEntitiesRequest */ diff --git a/Dialogflow/src/V2/BatchDeleteEntitiesRequest.php b/Dialogflow/src/V2/BatchDeleteEntitiesRequest.php index bb348e2a2d84..531d29ef6054 100644 --- a/Dialogflow/src/V2/BatchDeleteEntitiesRequest.php +++ b/Dialogflow/src/V2/BatchDeleteEntitiesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities]. + * The request message for + * [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities]. * * Generated from protobuf message google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest */ diff --git a/Dialogflow/src/V2/BatchDeleteEntityTypesRequest.php b/Dialogflow/src/V2/BatchDeleteEntityTypesRequest.php index 09a4d36dbb90..86a620e2fa95 100644 --- a/Dialogflow/src/V2/BatchDeleteEntityTypesRequest.php +++ b/Dialogflow/src/V2/BatchDeleteEntityTypesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes]. + * The request message for + * [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes]. * * Generated from protobuf message google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest */ diff --git a/Dialogflow/src/V2/BatchDeleteIntentsRequest.php b/Dialogflow/src/V2/BatchDeleteIntentsRequest.php index a647e66e750e..86cebd99e1b1 100644 --- a/Dialogflow/src/V2/BatchDeleteIntentsRequest.php +++ b/Dialogflow/src/V2/BatchDeleteIntentsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents]. + * The request message for + * [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents]. * * Generated from protobuf message google.cloud.dialogflow.v2.BatchDeleteIntentsRequest */ diff --git a/Dialogflow/src/V2/BatchUpdateEntitiesRequest.php b/Dialogflow/src/V2/BatchUpdateEntitiesRequest.php index 35b5dfede9c4..a3f2d74d7c3d 100644 --- a/Dialogflow/src/V2/BatchUpdateEntitiesRequest.php +++ b/Dialogflow/src/V2/BatchUpdateEntitiesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities]. + * The request message for + * [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities]. * * Generated from protobuf message google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest */ diff --git a/Dialogflow/src/V2/BatchUpdateEntityTypesRequest.php b/Dialogflow/src/V2/BatchUpdateEntityTypesRequest.php index f42b6dae6754..acd32218a20b 100644 --- a/Dialogflow/src/V2/BatchUpdateEntityTypesRequest.php +++ b/Dialogflow/src/V2/BatchUpdateEntityTypesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. + * The request message for + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. * * Generated from protobuf message google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest */ diff --git a/Dialogflow/src/V2/BatchUpdateEntityTypesResponse.php b/Dialogflow/src/V2/BatchUpdateEntityTypesResponse.php index a9865f3b8be9..b73eca89fee6 100644 --- a/Dialogflow/src/V2/BatchUpdateEntityTypesResponse.php +++ b/Dialogflow/src/V2/BatchUpdateEntityTypesResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. + * The response message for + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. * * Generated from protobuf message google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse */ diff --git a/Dialogflow/src/V2/BatchUpdateIntentsResponse.php b/Dialogflow/src/V2/BatchUpdateIntentsResponse.php index 14fff1f0fd9c..fe289de698ad 100644 --- a/Dialogflow/src/V2/BatchUpdateIntentsResponse.php +++ b/Dialogflow/src/V2/BatchUpdateIntentsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]. + * The response message for + * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]. * * Generated from protobuf message google.cloud.dialogflow.v2.BatchUpdateIntentsResponse */ diff --git a/Dialogflow/src/V2/CompleteConversationRequest.php b/Dialogflow/src/V2/CompleteConversationRequest.php index 44f2db760ee6..896eef1fd393 100644 --- a/Dialogflow/src/V2/CompleteConversationRequest.php +++ b/Dialogflow/src/V2/CompleteConversationRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Conversations.CompleteConversation][google.cloud.dialogflow.v2.Conversations.CompleteConversation]. + * The request message for + * [Conversations.CompleteConversation][google.cloud.dialogflow.v2.Conversations.CompleteConversation]. * * Generated from protobuf message google.cloud.dialogflow.v2.CompleteConversationRequest */ diff --git a/Dialogflow/src/V2/Conversation.php b/Dialogflow/src/V2/Conversation.php index 721321c3bbaf..11cc3b55760d 100644 --- a/Dialogflow/src/V2/Conversation.php +++ b/Dialogflow/src/V2/Conversation.php @@ -42,8 +42,8 @@ class Conversation extends \Google\Protobuf\Internal\Message */ private $conversation_profile = ''; /** - * Output only. It will not be empty if the conversation is to be connected over - * telephony. + * Output only. It will not be empty if the conversation is to be connected + * over telephony. * * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -65,12 +65,15 @@ class Conversation extends \Google\Protobuf\Internal\Message * human agent is handling the conversation. * If the conversation is created with the conversation profile that has * Dialogflow config set, defaults to - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; Otherwise, defaults to + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; + * Otherwise, defaults to * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. * If the conversation is created with the conversation profile that has * Dialogflow config set but explicitly sets conversation_stage to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], it skips - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] stage and directly goes to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], + * it skips + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] + * stage and directly goes to * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. * * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7; @@ -95,8 +98,8 @@ class Conversation extends \Google\Protobuf\Internal\Message * Format: `projects//locations//conversationProfiles/`. * @type \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber $phone_number - * Output only. It will not be empty if the conversation is to be connected over - * telephony. + * Output only. It will not be empty if the conversation is to be connected + * over telephony. * @type \Google\Protobuf\Timestamp $start_time * Output only. The time the conversation was started. * @type \Google\Protobuf\Timestamp $end_time @@ -106,12 +109,15 @@ class Conversation extends \Google\Protobuf\Internal\Message * human agent is handling the conversation. * If the conversation is created with the conversation profile that has * Dialogflow config set, defaults to - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; Otherwise, defaults to + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; + * Otherwise, defaults to * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. * If the conversation is created with the conversation profile that has * Dialogflow config set but explicitly sets conversation_stage to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], it skips - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] stage and directly goes to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], + * it skips + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] + * stage and directly goes to * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. * } */ @@ -209,8 +215,8 @@ public function setConversationProfile($var) } /** - * Output only. It will not be empty if the conversation is to be connected over - * telephony. + * Output only. It will not be empty if the conversation is to be connected + * over telephony. * * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber|null @@ -231,8 +237,8 @@ public function clearPhoneNumber() } /** - * Output only. It will not be empty if the conversation is to be connected over - * telephony. + * Output only. It will not be empty if the conversation is to be connected + * over telephony. * * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber $var @@ -323,12 +329,15 @@ public function setEndTime($var) * human agent is handling the conversation. * If the conversation is created with the conversation profile that has * Dialogflow config set, defaults to - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; Otherwise, defaults to + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; + * Otherwise, defaults to * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. * If the conversation is created with the conversation profile that has * Dialogflow config set but explicitly sets conversation_stage to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], it skips - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] stage and directly goes to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], + * it skips + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] + * stage and directly goes to * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. * * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7; @@ -344,12 +353,15 @@ public function getConversationStage() * human agent is handling the conversation. * If the conversation is created with the conversation profile that has * Dialogflow config set, defaults to - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; Otherwise, defaults to + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; + * Otherwise, defaults to * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. * If the conversation is created with the conversation profile that has * Dialogflow config set but explicitly sets conversation_stage to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], it skips - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] stage and directly goes to + * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], + * it skips + * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] + * stage and directly goes to * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. * * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7; diff --git a/Dialogflow/src/V2/ConversationDataset.php b/Dialogflow/src/V2/ConversationDataset.php index db47961bf141..8a069cc231a1 100644 --- a/Dialogflow/src/V2/ConversationDataset.php +++ b/Dialogflow/src/V2/ConversationDataset.php @@ -57,7 +57,8 @@ class ConversationDataset extends \Google\Protobuf\Internal\Message */ private $conversation_info = null; /** - * Output only. The number of conversations this conversation dataset contains. + * Output only. The number of conversations this conversation dataset + * contains. * * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -84,7 +85,8 @@ class ConversationDataset extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Dialogflow\V2\ConversationInfo $conversation_info * Output only. Metadata set during conversation data import. * @type int|string $conversation_count - * Output only. The number of conversations this conversation dataset contains. + * Output only. The number of conversations this conversation dataset + * contains. * } */ public function __construct($data = NULL) { @@ -283,7 +285,8 @@ public function setConversationInfo($var) } /** - * Output only. The number of conversations this conversation dataset contains. + * Output only. The number of conversations this conversation dataset + * contains. * * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int|string @@ -294,7 +297,8 @@ public function getConversationCount() } /** - * Output only. The number of conversations this conversation dataset contains. + * Output only. The number of conversations this conversation dataset + * contains. * * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int|string $var diff --git a/Dialogflow/src/V2/ConversationInfo.php b/Dialogflow/src/V2/ConversationInfo.php index c6ee7aaf4e10..0bea4f446db2 100644 --- a/Dialogflow/src/V2/ConversationInfo.php +++ b/Dialogflow/src/V2/ConversationInfo.php @@ -16,9 +16,9 @@ class ConversationInfo extends \Google\Protobuf\Internal\Message { /** - * Optional. The language code of the conversation data within this dataset. See - * https://cloud.google.com/apis/design/standard_fields for more information. - * Supports all UTF-8 languages. + * Optional. The language code of the conversation data within this dataset. + * See https://cloud.google.com/apis/design/standard_fields for more + * information. Supports all UTF-8 languages. * * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -31,9 +31,9 @@ class ConversationInfo extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $language_code - * Optional. The language code of the conversation data within this dataset. See - * https://cloud.google.com/apis/design/standard_fields for more information. - * Supports all UTF-8 languages. + * Optional. The language code of the conversation data within this dataset. + * See https://cloud.google.com/apis/design/standard_fields for more + * information. Supports all UTF-8 languages. * } */ public function __construct($data = NULL) { @@ -42,9 +42,9 @@ public function __construct($data = NULL) { } /** - * Optional. The language code of the conversation data within this dataset. See - * https://cloud.google.com/apis/design/standard_fields for more information. - * Supports all UTF-8 languages. + * Optional. The language code of the conversation data within this dataset. + * See https://cloud.google.com/apis/design/standard_fields for more + * information. Supports all UTF-8 languages. * * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -55,9 +55,9 @@ public function getLanguageCode() } /** - * Optional. The language code of the conversation data within this dataset. See - * https://cloud.google.com/apis/design/standard_fields for more information. - * Supports all UTF-8 languages. + * Optional. The language code of the conversation data within this dataset. + * See https://cloud.google.com/apis/design/standard_fields for more + * information. Supports all UTF-8 languages. * * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/Dialogflow/src/V2/ConversationModelEvaluation.php b/Dialogflow/src/V2/ConversationModelEvaluation.php index f19e28f761b0..0dce1fbe604a 100644 --- a/Dialogflow/src/V2/ConversationModelEvaluation.php +++ b/Dialogflow/src/V2/ConversationModelEvaluation.php @@ -41,6 +41,26 @@ class ConversationModelEvaluation extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $create_time = null; + /** + * Output only. Human eval template in csv format. + * It tooks real-world conversations provided through input dataset, generates + * example suggestions for customer to verify quality of the model. + * For Smart Reply, the generated csv file contains columns of + * Context, (Suggestions,Q1,Q2)*3, Actual reply. + * Context contains at most 10 latest messages in the conversation prior to + * the current suggestion. + * Q1: "Would you send it as the next message of agent?" + * Evaluated based on whether the suggest is appropriate to be sent by + * agent in current context. + * Q2: "Does the suggestion move the conversation closer to resolution?" + * Evaluated based on whether the suggestion provide solutions, or answers + * customer's question or collect information from customer to resolve the + * customer's issue. + * Actual reply column contains the actual agent reply sent in the context. + * + * Generated from protobuf field string raw_human_eval_template_csv = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $raw_human_eval_template_csv = ''; protected $metrics; /** @@ -61,6 +81,22 @@ class ConversationModelEvaluation extends \Google\Protobuf\Internal\Message * Output only. Creation time of this model. * @type \Google\Cloud\Dialogflow\V2\SmartReplyMetrics $smart_reply_metrics * Output only. Only available when model is for smart reply. + * @type string $raw_human_eval_template_csv + * Output only. Human eval template in csv format. + * It tooks real-world conversations provided through input dataset, generates + * example suggestions for customer to verify quality of the model. + * For Smart Reply, the generated csv file contains columns of + * Context, (Suggestions,Q1,Q2)*3, Actual reply. + * Context contains at most 10 latest messages in the conversation prior to + * the current suggestion. + * Q1: "Would you send it as the next message of agent?" + * Evaluated based on whether the suggest is appropriate to be sent by + * agent in current context. + * Q2: "Does the suggestion move the conversation closer to resolution?" + * Evaluated based on whether the suggestion provide solutions, or answers + * customer's question or collect information from customer to resolve the + * customer's issue. + * Actual reply column contains the actual agent reply sent in the context. * } */ public function __construct($data = NULL) { @@ -227,6 +263,60 @@ public function setSmartReplyMetrics($var) return $this; } + /** + * Output only. Human eval template in csv format. + * It tooks real-world conversations provided through input dataset, generates + * example suggestions for customer to verify quality of the model. + * For Smart Reply, the generated csv file contains columns of + * Context, (Suggestions,Q1,Q2)*3, Actual reply. + * Context contains at most 10 latest messages in the conversation prior to + * the current suggestion. + * Q1: "Would you send it as the next message of agent?" + * Evaluated based on whether the suggest is appropriate to be sent by + * agent in current context. + * Q2: "Does the suggestion move the conversation closer to resolution?" + * Evaluated based on whether the suggestion provide solutions, or answers + * customer's question or collect information from customer to resolve the + * customer's issue. + * Actual reply column contains the actual agent reply sent in the context. + * + * Generated from protobuf field string raw_human_eval_template_csv = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRawHumanEvalTemplateCsv() + { + return $this->raw_human_eval_template_csv; + } + + /** + * Output only. Human eval template in csv format. + * It tooks real-world conversations provided through input dataset, generates + * example suggestions for customer to verify quality of the model. + * For Smart Reply, the generated csv file contains columns of + * Context, (Suggestions,Q1,Q2)*3, Actual reply. + * Context contains at most 10 latest messages in the conversation prior to + * the current suggestion. + * Q1: "Would you send it as the next message of agent?" + * Evaluated based on whether the suggest is appropriate to be sent by + * agent in current context. + * Q2: "Does the suggestion move the conversation closer to resolution?" + * Evaluated based on whether the suggestion provide solutions, or answers + * customer's question or collect information from customer to resolve the + * customer's issue. + * Actual reply column contains the actual agent reply sent in the context. + * + * Generated from protobuf field string raw_human_eval_template_csv = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRawHumanEvalTemplateCsv($var) + { + GPBUtil::checkString($var, True); + $this->raw_human_eval_template_csv = $var; + + return $this; + } + /** * @return string */ diff --git a/Dialogflow/src/V2/CreateContextRequest.php b/Dialogflow/src/V2/CreateContextRequest.php index 89bc5a5edf6a..659e1fe1eb44 100644 --- a/Dialogflow/src/V2/CreateContextRequest.php +++ b/Dialogflow/src/V2/CreateContextRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext]. + * The request message for + * [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateContextRequest */ diff --git a/Dialogflow/src/V2/CreateConversationModelOperationMetadata.php b/Dialogflow/src/V2/CreateConversationModelOperationMetadata.php index 6e3567e96135..0e4c9c7e530f 100644 --- a/Dialogflow/src/V2/CreateConversationModelOperationMetadata.php +++ b/Dialogflow/src/V2/CreateConversationModelOperationMetadata.php @@ -9,7 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Metadata for a [ConversationModels.CreateConversationModel][google.cloud.dialogflow.v2.ConversationModels.CreateConversationModel] operation. + * Metadata for a + * [ConversationModels.CreateConversationModel][google.cloud.dialogflow.v2.ConversationModels.CreateConversationModel] + * operation. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata */ diff --git a/Dialogflow/src/V2/CreateConversationProfileRequest.php b/Dialogflow/src/V2/CreateConversationProfileRequest.php index f61e1b618e57..f05528c39971 100644 --- a/Dialogflow/src/V2/CreateConversationProfileRequest.php +++ b/Dialogflow/src/V2/CreateConversationProfileRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfile]. + * The request message for + * [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfile]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateConversationProfileRequest */ diff --git a/Dialogflow/src/V2/CreateConversationRequest.php b/Dialogflow/src/V2/CreateConversationRequest.php index b0176678ca30..9f64b09d4608 100644 --- a/Dialogflow/src/V2/CreateConversationRequest.php +++ b/Dialogflow/src/V2/CreateConversationRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Conversations.CreateConversation][google.cloud.dialogflow.v2.Conversations.CreateConversation]. + * The request message for + * [Conversations.CreateConversation][google.cloud.dialogflow.v2.Conversations.CreateConversation]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateConversationRequest */ @@ -29,8 +30,8 @@ class CreateConversationRequest extends \Google\Protobuf\Internal\Message */ private $conversation = null; /** - * Optional. Identifier of the conversation. Generally it's auto generated by Google. - * Only set it if you cannot wait for the response to return a + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a * auto-generated one to you. * The conversation ID must be compliant with the regression fomula * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. @@ -55,8 +56,8 @@ class CreateConversationRequest extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Dialogflow\V2\Conversation $conversation * Required. The conversation to create. * @type string $conversation_id - * Optional. Identifier of the conversation. Generally it's auto generated by Google. - * Only set it if you cannot wait for the response to return a + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a * auto-generated one to you. * The conversation ID must be compliant with the regression fomula * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. @@ -136,8 +137,8 @@ public function setConversation($var) } /** - * Optional. Identifier of the conversation. Generally it's auto generated by Google. - * Only set it if you cannot wait for the response to return a + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a * auto-generated one to you. * The conversation ID must be compliant with the regression fomula * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. @@ -155,8 +156,8 @@ public function getConversationId() } /** - * Optional. Identifier of the conversation. Generally it's auto generated by Google. - * Only set it if you cannot wait for the response to return a + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a * auto-generated one to you. * The conversation ID must be compliant with the regression fomula * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. diff --git a/Dialogflow/src/V2/CreateDocumentRequest.php b/Dialogflow/src/V2/CreateDocumentRequest.php index 081cf992f40c..7bfc8b06a424 100644 --- a/Dialogflow/src/V2/CreateDocumentRequest.php +++ b/Dialogflow/src/V2/CreateDocumentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2.Documents.CreateDocument]. + * Request message for + * [Documents.CreateDocument][google.cloud.dialogflow.v2.Documents.CreateDocument]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateDocumentRequest */ diff --git a/Dialogflow/src/V2/CreateEntityTypeRequest.php b/Dialogflow/src/V2/CreateEntityTypeRequest.php index bf69378bfdad..8a5086b77643 100644 --- a/Dialogflow/src/V2/CreateEntityTypeRequest.php +++ b/Dialogflow/src/V2/CreateEntityTypeRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType]. + * The request message for + * [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateEntityTypeRequest */ diff --git a/Dialogflow/src/V2/CreateEnvironmentRequest.php b/Dialogflow/src/V2/CreateEnvironmentRequest.php index 3e4bfc513686..1e1009d59710 100644 --- a/Dialogflow/src/V2/CreateEnvironmentRequest.php +++ b/Dialogflow/src/V2/CreateEnvironmentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Environments.CreateEnvironment][google.cloud.dialogflow.v2.Environments.CreateEnvironment]. + * The request message for + * [Environments.CreateEnvironment][google.cloud.dialogflow.v2.Environments.CreateEnvironment]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateEnvironmentRequest */ diff --git a/Dialogflow/src/V2/CreateIntentRequest.php b/Dialogflow/src/V2/CreateIntentRequest.php index 6e730f6e463b..6c8aad289200 100644 --- a/Dialogflow/src/V2/CreateIntentRequest.php +++ b/Dialogflow/src/V2/CreateIntentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent]. + * The request message for + * [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateIntentRequest */ diff --git a/Dialogflow/src/V2/CreateKnowledgeBaseRequest.php b/Dialogflow/src/V2/CreateKnowledgeBaseRequest.php index 953f6e1352b0..f492cbea4ba1 100644 --- a/Dialogflow/src/V2/CreateKnowledgeBaseRequest.php +++ b/Dialogflow/src/V2/CreateKnowledgeBaseRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.CreateKnowledgeBase]. + * Request message for + * [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.CreateKnowledgeBase]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest */ diff --git a/Dialogflow/src/V2/CreateParticipantRequest.php b/Dialogflow/src/V2/CreateParticipantRequest.php index 464348e69f58..306784fdc6d4 100644 --- a/Dialogflow/src/V2/CreateParticipantRequest.php +++ b/Dialogflow/src/V2/CreateParticipantRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Participants.CreateParticipant][google.cloud.dialogflow.v2.Participants.CreateParticipant]. + * The request message for + * [Participants.CreateParticipant][google.cloud.dialogflow.v2.Participants.CreateParticipant]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateParticipantRequest */ diff --git a/Dialogflow/src/V2/CreateSessionEntityTypeRequest.php b/Dialogflow/src/V2/CreateSessionEntityTypeRequest.php index bbc4dcef767e..ba6235569dbf 100644 --- a/Dialogflow/src/V2/CreateSessionEntityTypeRequest.php +++ b/Dialogflow/src/V2/CreateSessionEntityTypeRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType]. + * The request message for + * [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest */ diff --git a/Dialogflow/src/V2/CreateVersionRequest.php b/Dialogflow/src/V2/CreateVersionRequest.php index b24cd32aaeed..ddba29f940e9 100644 --- a/Dialogflow/src/V2/CreateVersionRequest.php +++ b/Dialogflow/src/V2/CreateVersionRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Versions.CreateVersion][google.cloud.dialogflow.v2.Versions.CreateVersion]. + * The request message for + * [Versions.CreateVersion][google.cloud.dialogflow.v2.Versions.CreateVersion]. * * Generated from protobuf message google.cloud.dialogflow.v2.CreateVersionRequest */ diff --git a/Dialogflow/src/V2/DeleteAgentRequest.php b/Dialogflow/src/V2/DeleteAgentRequest.php index d556a615377a..af8b2b2a1212 100644 --- a/Dialogflow/src/V2/DeleteAgentRequest.php +++ b/Dialogflow/src/V2/DeleteAgentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent]. + * The request message for + * [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteAgentRequest */ diff --git a/Dialogflow/src/V2/DeleteAllContextsRequest.php b/Dialogflow/src/V2/DeleteAllContextsRequest.php index bc3e4ef80664..a1239d956ba6 100644 --- a/Dialogflow/src/V2/DeleteAllContextsRequest.php +++ b/Dialogflow/src/V2/DeleteAllContextsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts]. + * The request message for + * [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteAllContextsRequest */ diff --git a/Dialogflow/src/V2/DeleteContextRequest.php b/Dialogflow/src/V2/DeleteContextRequest.php index a5c7c57e53fb..b26bca62309c 100644 --- a/Dialogflow/src/V2/DeleteContextRequest.php +++ b/Dialogflow/src/V2/DeleteContextRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext]. + * The request message for + * [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteContextRequest */ diff --git a/Dialogflow/src/V2/DeleteConversationModelOperationMetadata.php b/Dialogflow/src/V2/DeleteConversationModelOperationMetadata.php index 3ad857642220..343d08b19776 100644 --- a/Dialogflow/src/V2/DeleteConversationModelOperationMetadata.php +++ b/Dialogflow/src/V2/DeleteConversationModelOperationMetadata.php @@ -9,7 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Metadata for a [ConversationModels.DeleteConversationModel][google.cloud.dialogflow.v2.ConversationModels.DeleteConversationModel] operation. + * Metadata for a + * [ConversationModels.DeleteConversationModel][google.cloud.dialogflow.v2.ConversationModels.DeleteConversationModel] + * operation. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata */ diff --git a/Dialogflow/src/V2/DeleteConversationProfileRequest.php b/Dialogflow/src/V2/DeleteConversationProfileRequest.php index 5bb8f46be4e4..ca4c2ee2c1ab 100644 --- a/Dialogflow/src/V2/DeleteConversationProfileRequest.php +++ b/Dialogflow/src/V2/DeleteConversationProfileRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfile]. + * The request message for + * [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfile]. * This operation fails if the conversation profile is still referenced from * a phone number. * diff --git a/Dialogflow/src/V2/DeleteDocumentRequest.php b/Dialogflow/src/V2/DeleteDocumentRequest.php index 3bc87158b9dd..5849aca3a788 100644 --- a/Dialogflow/src/V2/DeleteDocumentRequest.php +++ b/Dialogflow/src/V2/DeleteDocumentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2.Documents.DeleteDocument]. + * Request message for + * [Documents.DeleteDocument][google.cloud.dialogflow.v2.Documents.DeleteDocument]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteDocumentRequest */ diff --git a/Dialogflow/src/V2/DeleteEntityTypeRequest.php b/Dialogflow/src/V2/DeleteEntityTypeRequest.php index 65e00832f5a5..e4fe6ea00edd 100644 --- a/Dialogflow/src/V2/DeleteEntityTypeRequest.php +++ b/Dialogflow/src/V2/DeleteEntityTypeRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType]. + * The request message for + * [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteEntityTypeRequest */ diff --git a/Dialogflow/src/V2/DeleteEnvironmentRequest.php b/Dialogflow/src/V2/DeleteEnvironmentRequest.php index ba28f53a8f7c..1c6f40e1afd8 100644 --- a/Dialogflow/src/V2/DeleteEnvironmentRequest.php +++ b/Dialogflow/src/V2/DeleteEnvironmentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.v2.Environments.DeleteEnvironment]. + * The request message for + * [Environments.DeleteEnvironment][google.cloud.dialogflow.v2.Environments.DeleteEnvironment]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteEnvironmentRequest */ diff --git a/Dialogflow/src/V2/DeleteIntentRequest.php b/Dialogflow/src/V2/DeleteIntentRequest.php index 3f8d5769bff2..3f7db29d23b8 100644 --- a/Dialogflow/src/V2/DeleteIntentRequest.php +++ b/Dialogflow/src/V2/DeleteIntentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent]. + * The request message for + * [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteIntentRequest */ diff --git a/Dialogflow/src/V2/DeleteKnowledgeBaseRequest.php b/Dialogflow/src/V2/DeleteKnowledgeBaseRequest.php index 81bd7fdb9cc4..39411f4c1eb1 100644 --- a/Dialogflow/src/V2/DeleteKnowledgeBaseRequest.php +++ b/Dialogflow/src/V2/DeleteKnowledgeBaseRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.DeleteKnowledgeBase]. + * Request message for + * [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.DeleteKnowledgeBase]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest */ diff --git a/Dialogflow/src/V2/DeleteSessionEntityTypeRequest.php b/Dialogflow/src/V2/DeleteSessionEntityTypeRequest.php index 87f459836771..1fc4d515e83b 100644 --- a/Dialogflow/src/V2/DeleteSessionEntityTypeRequest.php +++ b/Dialogflow/src/V2/DeleteSessionEntityTypeRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType]. + * The request message for + * [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest */ diff --git a/Dialogflow/src/V2/DeleteVersionRequest.php b/Dialogflow/src/V2/DeleteVersionRequest.php index ac2d4bea0c1d..ea22a527db75 100644 --- a/Dialogflow/src/V2/DeleteVersionRequest.php +++ b/Dialogflow/src/V2/DeleteVersionRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Versions.DeleteVersion][google.cloud.dialogflow.v2.Versions.DeleteVersion]. + * The request message for + * [Versions.DeleteVersion][google.cloud.dialogflow.v2.Versions.DeleteVersion]. * * Generated from protobuf message google.cloud.dialogflow.v2.DeleteVersionRequest */ diff --git a/Dialogflow/src/V2/DeployConversationModelOperationMetadata.php b/Dialogflow/src/V2/DeployConversationModelOperationMetadata.php index c8a8db7b86b5..ac1caeac3234 100644 --- a/Dialogflow/src/V2/DeployConversationModelOperationMetadata.php +++ b/Dialogflow/src/V2/DeployConversationModelOperationMetadata.php @@ -9,7 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Metadata for a [ConversationModels.DeployConversationModel][google.cloud.dialogflow.v2.ConversationModels.DeployConversationModel] operation. + * Metadata for a + * [ConversationModels.DeployConversationModel][google.cloud.dialogflow.v2.ConversationModels.DeployConversationModel] + * operation. * * Generated from protobuf message google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata */ diff --git a/Dialogflow/src/V2/DetectIntentRequest.php b/Dialogflow/src/V2/DetectIntentRequest.php index d396f3f8ebb1..9aa2827986e8 100644 --- a/Dialogflow/src/V2/DetectIntentRequest.php +++ b/Dialogflow/src/V2/DetectIntentRequest.php @@ -60,11 +60,13 @@ class DetectIntentRequest extends \Google\Protobuf\Internal\Message */ private $output_audio_config = null; /** - * Mask for [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] indicating which settings in this - * request-level config should override speech synthesizer settings defined at - * agent-level. - * If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] replaces the agent-level - * config in its entirety. + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. * * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; */ @@ -113,11 +115,13 @@ class DetectIntentRequest extends \Google\Protobuf\Internal\Message * audio. If this field is not set and agent-level speech synthesizer is not * configured, no output audio is generated. * @type \Google\Protobuf\FieldMask $output_audio_config_mask - * Mask for [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] indicating which settings in this - * request-level config should override speech synthesizer settings defined at - * agent-level. - * If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] replaces the agent-level - * config in its entirety. + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. * @type string $input_audio * The natural language speech audio to be processed. This field * should be populated iff `query_input` is set to an input audio config. @@ -304,11 +308,13 @@ public function setOutputAudioConfig($var) } /** - * Mask for [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] indicating which settings in this - * request-level config should override speech synthesizer settings defined at - * agent-level. - * If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] replaces the agent-level - * config in its entirety. + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. * * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; * @return \Google\Protobuf\FieldMask|null @@ -329,11 +335,13 @@ public function clearOutputAudioConfigMask() } /** - * Mask for [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] indicating which settings in this - * request-level config should override speech synthesizer settings defined at - * agent-level. - * If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] replaces the agent-level - * config in its entirety. + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. * * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; * @param \Google\Protobuf\FieldMask $var diff --git a/Dialogflow/src/V2/Document.php b/Dialogflow/src/V2/Document.php index bb0aa8a7d75e..1dc866aa8207 100644 --- a/Dialogflow/src/V2/Document.php +++ b/Dialogflow/src/V2/Document.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase]. + * A knowledge document to be used by a + * [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase]. * For more information, see the [knowledge base * guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; diff --git a/Dialogflow/src/V2/EntityType.php b/Dialogflow/src/V2/EntityType.php index 6fdba4862819..d402aca476ae 100644 --- a/Dialogflow/src/V2/EntityType.php +++ b/Dialogflow/src/V2/EntityType.php @@ -26,9 +26,12 @@ class EntityType extends \Google\Protobuf\Internal\Message { /** * The unique identifier of the entity type. - * Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and - * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods. - * Format: `projects//agent/entityTypes/`. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] + * and + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] + * methods. Format: `projects//agent/entityTypes/`. * * Generated from protobuf field string name = 1; */ @@ -73,9 +76,12 @@ class EntityType extends \Google\Protobuf\Internal\Message * * @type string $name * The unique identifier of the entity type. - * Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and - * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods. - * Format: `projects//agent/entityTypes/`. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] + * and + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] + * methods. Format: `projects//agent/entityTypes/`. * @type string $display_name * Required. The name of the entity type. * @type int $kind @@ -96,9 +102,12 @@ public function __construct($data = NULL) { /** * The unique identifier of the entity type. - * Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and - * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods. - * Format: `projects//agent/entityTypes/`. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] + * and + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] + * methods. Format: `projects//agent/entityTypes/`. * * Generated from protobuf field string name = 1; * @return string @@ -110,9 +119,12 @@ public function getName() /** * The unique identifier of the entity type. - * Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and - * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods. - * Format: `projects//agent/entityTypes/`. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] + * and + * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] + * methods. Format: `projects//agent/entityTypes/`. * * Generated from protobuf field string name = 1; * @param string $var diff --git a/Dialogflow/src/V2/Environment.php b/Dialogflow/src/V2/Environment.php index 928751a71022..d8e54cf951ca 100644 --- a/Dialogflow/src/V2/Environment.php +++ b/Dialogflow/src/V2/Environment.php @@ -57,15 +57,15 @@ class Environment extends \Google\Protobuf\Internal\Message */ private $agent_version = ''; /** - * Output only. The state of this environment. This field is read-only, i.e., it cannot be - * set by create and update methods. + * Output only. The state of this environment. This field is read-only, i.e., + * it cannot be set by create and update methods. * * Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $state = 0; /** - * Output only. The last update time of this environment. This field is read-only, i.e., it - * cannot be set by create and update methods. + * Output only. The last update time of this environment. This field is + * read-only, i.e., it cannot be set by create and update methods. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -106,11 +106,11 @@ class Environment extends \Google\Protobuf\Internal\Message * - `projects//locations//agent/versions/` * @type int $state - * Output only. The state of this environment. This field is read-only, i.e., it cannot be - * set by create and update methods. + * Output only. The state of this environment. This field is read-only, i.e., + * it cannot be set by create and update methods. * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update time of this environment. This field is read-only, i.e., it - * cannot be set by create and update methods. + * Output only. The last update time of this environment. This field is + * read-only, i.e., it cannot be set by create and update methods. * @type \Google\Cloud\Dialogflow\V2\TextToSpeechSettings $text_to_speech_settings * Optional. Text to speech settings for this environment. * @type \Google\Cloud\Dialogflow\V2\Fulfillment $fulfillment @@ -221,8 +221,8 @@ public function setAgentVersion($var) } /** - * Output only. The state of this environment. This field is read-only, i.e., it cannot be - * set by create and update methods. + * Output only. The state of this environment. This field is read-only, i.e., + * it cannot be set by create and update methods. * * Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -233,8 +233,8 @@ public function getState() } /** - * Output only. The state of this environment. This field is read-only, i.e., it cannot be - * set by create and update methods. + * Output only. The state of this environment. This field is read-only, i.e., + * it cannot be set by create and update methods. * * Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var @@ -249,8 +249,8 @@ public function setState($var) } /** - * Output only. The last update time of this environment. This field is read-only, i.e., it - * cannot be set by create and update methods. + * Output only. The last update time of this environment. This field is + * read-only, i.e., it cannot be set by create and update methods. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null @@ -271,8 +271,8 @@ public function clearUpdateTime() } /** - * Output only. The last update time of this environment. This field is read-only, i.e., it - * cannot be set by create and update methods. + * Output only. The last update time of this environment. This field is + * read-only, i.e., it cannot be set by create and update methods. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var diff --git a/Dialogflow/src/V2/EnvironmentHistory.php b/Dialogflow/src/V2/EnvironmentHistory.php index 5a72475b5d14..55fc1ec8d5cb 100644 --- a/Dialogflow/src/V2/EnvironmentHistory.php +++ b/Dialogflow/src/V2/EnvironmentHistory.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory]. + * The response message for + * [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory]. * * Generated from protobuf message google.cloud.dialogflow.v2.EnvironmentHistory */ @@ -27,15 +28,15 @@ class EnvironmentHistory extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Output only. The list of agent environments. There will be a maximum number of items - * returned based on the page_size field in the request. + * Output only. The list of agent environments. There will be a maximum number + * of items returned based on the page_size field in the request. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $entries; /** - * Output only. Token to retrieve the next page of results, or empty if there are no - * more results in the list. + * Output only. Token to retrieve the next page of results, or empty if there + * are no more results in the list. * * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -55,11 +56,11 @@ class EnvironmentHistory extends \Google\Protobuf\Internal\Message * ID>/agent/environments/` * The environment ID for the default environment is `-`. * @type array<\Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry>|\Google\Protobuf\Internal\RepeatedField $entries - * Output only. The list of agent environments. There will be a maximum number of items - * returned based on the page_size field in the request. + * Output only. The list of agent environments. There will be a maximum number + * of items returned based on the page_size field in the request. * @type string $next_page_token - * Output only. Token to retrieve the next page of results, or empty if there are no - * more results in the list. + * Output only. Token to retrieve the next page of results, or empty if there + * are no more results in the list. * } */ public function __construct($data = NULL) { @@ -104,8 +105,8 @@ public function setParent($var) } /** - * Output only. The list of agent environments. There will be a maximum number of items - * returned based on the page_size field in the request. + * Output only. The list of agent environments. There will be a maximum number + * of items returned based on the page_size field in the request. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Internal\RepeatedField @@ -116,8 +117,8 @@ public function getEntries() } /** - * Output only. The list of agent environments. There will be a maximum number of items - * returned based on the page_size field in the request. + * Output only. The list of agent environments. There will be a maximum number + * of items returned based on the page_size field in the request. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param array<\Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry>|\Google\Protobuf\Internal\RepeatedField $var @@ -132,8 +133,8 @@ public function setEntries($var) } /** - * Output only. Token to retrieve the next page of results, or empty if there are no - * more results in the list. + * Output only. Token to retrieve the next page of results, or empty if there + * are no more results in the list. * * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -144,8 +145,8 @@ public function getNextPageToken() } /** - * Output only. Token to retrieve the next page of results, or empty if there are no - * more results in the list. + * Output only. Token to retrieve the next page of results, or empty if there + * are no more results in the list. * * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/Dialogflow/src/V2/EvaluationConfig/SmartComposeConfig.php b/Dialogflow/src/V2/EvaluationConfig/SmartComposeConfig.php index 4c1037cddacb..d17212302f98 100644 --- a/Dialogflow/src/V2/EvaluationConfig/SmartComposeConfig.php +++ b/Dialogflow/src/V2/EvaluationConfig/SmartComposeConfig.php @@ -24,10 +24,10 @@ class SmartComposeConfig extends \Google\Protobuf\Internal\Message */ private $allowlist_document = ''; /** - * Required. The model to be evaluated can return multiple results with confidence - * score on each query. These results will be sorted by the descending order - * of the scores and we only keep the first max_result_count results as the - * final results to evaluate. + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. * * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -44,10 +44,10 @@ class SmartComposeConfig extends \Google\Protobuf\Internal\Message * Format: `projects//knowledgeBases//documents/`. Only used for smart compose model. * @type int $max_result_count - * Required. The model to be evaluated can return multiple results with confidence - * score on each query. These results will be sorted by the descending order - * of the scores and we only keep the first max_result_count results as the - * final results to evaluate. + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. * } */ public function __construct($data = NULL) { @@ -86,10 +86,10 @@ public function setAllowlistDocument($var) } /** - * Required. The model to be evaluated can return multiple results with confidence - * score on each query. These results will be sorted by the descending order - * of the scores and we only keep the first max_result_count results as the - * final results to evaluate. + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. * * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; * @return int @@ -100,10 +100,10 @@ public function getMaxResultCount() } /** - * Required. The model to be evaluated can return multiple results with confidence - * score on each query. These results will be sorted by the descending order - * of the scores and we only keep the first max_result_count results as the - * final results to evaluate. + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. * * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; * @param int $var diff --git a/Dialogflow/src/V2/EvaluationConfig/SmartReplyConfig.php b/Dialogflow/src/V2/EvaluationConfig/SmartReplyConfig.php index f975d2cd46ad..56facf9d48db 100644 --- a/Dialogflow/src/V2/EvaluationConfig/SmartReplyConfig.php +++ b/Dialogflow/src/V2/EvaluationConfig/SmartReplyConfig.php @@ -24,10 +24,10 @@ class SmartReplyConfig extends \Google\Protobuf\Internal\Message */ private $allowlist_document = ''; /** - * Required. The model to be evaluated can return multiple results with confidence - * score on each query. These results will be sorted by the descending order - * of the scores and we only keep the first max_result_count results as the - * final results to evaluate. + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. * * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -44,10 +44,10 @@ class SmartReplyConfig extends \Google\Protobuf\Internal\Message * Format: `projects//knowledgeBases//documents/`. Only used for smart reply model. * @type int $max_result_count - * Required. The model to be evaluated can return multiple results with confidence - * score on each query. These results will be sorted by the descending order - * of the scores and we only keep the first max_result_count results as the - * final results to evaluate. + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. * } */ public function __construct($data = NULL) { @@ -86,10 +86,10 @@ public function setAllowlistDocument($var) } /** - * Required. The model to be evaluated can return multiple results with confidence - * score on each query. These results will be sorted by the descending order - * of the scores and we only keep the first max_result_count results as the - * final results to evaluate. + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. * * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; * @return int @@ -100,10 +100,10 @@ public function getMaxResultCount() } /** - * Required. The model to be evaluated can return multiple results with confidence - * score on each query. These results will be sorted by the descending order - * of the scores and we only keep the first max_result_count results as the - * final results to evaluate. + * Required. The model to be evaluated can return multiple results with + * confidence score on each query. These results will be sorted by the + * descending order of the scores and we only keep the first + * max_result_count results as the final results to evaluate. * * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; * @param int $var diff --git a/Dialogflow/src/V2/EventInput.php b/Dialogflow/src/V2/EventInput.php index 8a61479d48da..28c1baeec766 100644 --- a/Dialogflow/src/V2/EventInput.php +++ b/Dialogflow/src/V2/EventInput.php @@ -50,8 +50,8 @@ class EventInput extends \Google\Protobuf\Internal\Message * for a list of the currently supported language codes. Note that queries in * the same session do not necessarily need to specify the same language. * This field is ignored when used in the context of a - * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, - * because the language was already defined in the originating detect + * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] + * field, because the language was already defined in the originating detect * intent request. * * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -87,8 +87,8 @@ class EventInput extends \Google\Protobuf\Internal\Message * for a list of the currently supported language codes. Note that queries in * the same session do not necessarily need to specify the same language. * This field is ignored when used in the context of a - * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, - * because the language was already defined in the originating detect + * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] + * field, because the language was already defined in the originating detect * intent request. * } */ @@ -191,8 +191,8 @@ public function setParameters($var) * for a list of the currently supported language codes. Note that queries in * the same session do not necessarily need to specify the same language. * This field is ignored when used in the context of a - * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, - * because the language was already defined in the originating detect + * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] + * field, because the language was already defined in the originating detect * intent request. * * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -209,8 +209,8 @@ public function getLanguageCode() * for a list of the currently supported language codes. Note that queries in * the same session do not necessarily need to specify the same language. * This field is ignored when used in the context of a - * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, - * because the language was already defined in the originating detect + * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] + * field, because the language was already defined in the originating detect * intent request. * * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/Dialogflow/src/V2/ExportAgentRequest.php b/Dialogflow/src/V2/ExportAgentRequest.php index 159693af6707..a8576be1ad8d 100644 --- a/Dialogflow/src/V2/ExportAgentRequest.php +++ b/Dialogflow/src/V2/ExportAgentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. + * The request message for + * [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. * * Generated from protobuf message google.cloud.dialogflow.v2.ExportAgentRequest */ @@ -23,10 +24,10 @@ class ExportAgentRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) - * URI to export the agent to. - * The format of this URI must be `gs:///`. - * If left unspecified, the serialized agent is returned inline. + * Required. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. * Dialogflow performs a write operation for the Cloud Storage object * on the caller's behalf, so your request authentication must * have write permissions for the object. For more information, see @@ -47,10 +48,10 @@ class ExportAgentRequest extends \Google\Protobuf\Internal\Message * Required. The project that the agent to export is associated with. * Format: `projects/`. * @type string $agent_uri - * Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) - * URI to export the agent to. - * The format of this URI must be `gs:///`. - * If left unspecified, the serialized agent is returned inline. + * Required. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. * Dialogflow performs a write operation for the Cloud Storage object * on the caller's behalf, so your request authentication must * have write permissions for the object. For more information, see @@ -92,10 +93,10 @@ public function setParent($var) } /** - * Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) - * URI to export the agent to. - * The format of this URI must be `gs:///`. - * If left unspecified, the serialized agent is returned inline. + * Required. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. * Dialogflow performs a write operation for the Cloud Storage object * on the caller's behalf, so your request authentication must * have write permissions for the object. For more information, see @@ -111,10 +112,10 @@ public function getAgentUri() } /** - * Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) - * URI to export the agent to. - * The format of this URI must be `gs:///`. - * If left unspecified, the serialized agent is returned inline. + * Required. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. * Dialogflow performs a write operation for the Cloud Storage object * on the caller's behalf, so your request authentication must * have write permissions for the object. For more information, see diff --git a/Dialogflow/src/V2/ExportAgentResponse.php b/Dialogflow/src/V2/ExportAgentResponse.php index 9b07269bd596..0568ef0c383c 100644 --- a/Dialogflow/src/V2/ExportAgentResponse.php +++ b/Dialogflow/src/V2/ExportAgentResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. + * The response message for + * [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. * * Generated from protobuf message google.cloud.dialogflow.v2.ExportAgentResponse */ diff --git a/Dialogflow/src/V2/ExportDocumentRequest.php b/Dialogflow/src/V2/ExportDocumentRequest.php index e0c7abc11235..76fda492e9a0 100644 --- a/Dialogflow/src/V2/ExportDocumentRequest.php +++ b/Dialogflow/src/V2/ExportDocumentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument]. + * Request message for + * [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument]. * * Generated from protobuf message google.cloud.dialogflow.v2.ExportDocumentRequest */ diff --git a/Dialogflow/src/V2/Fulfillment.php b/Dialogflow/src/V2/Fulfillment.php index 7e0ed6ed6b3f..d3e3f85846a3 100644 --- a/Dialogflow/src/V2/Fulfillment.php +++ b/Dialogflow/src/V2/Fulfillment.php @@ -34,7 +34,8 @@ class Fulfillment extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Optional. The human-readable name of the fulfillment, unique within the agent. + * Optional. The human-readable name of the fulfillment, unique within the + * agent. * This field is not used for Fulfillment in an Environment. * * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -47,7 +48,8 @@ class Fulfillment extends \Google\Protobuf\Internal\Message */ private $enabled = false; /** - * Optional. The field defines whether the fulfillment is enabled for certain features. + * Optional. The field defines whether the fulfillment is enabled for certain + * features. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -67,14 +69,16 @@ class Fulfillment extends \Google\Protobuf\Internal\Message * - `projects//locations//agent/fulfillment` * This field is not used for Fulfillment in an Environment. * @type string $display_name - * Optional. The human-readable name of the fulfillment, unique within the agent. + * Optional. The human-readable name of the fulfillment, unique within the + * agent. * This field is not used for Fulfillment in an Environment. * @type \Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService $generic_web_service * Configuration for a generic web service. * @type bool $enabled * Optional. Whether fulfillment is enabled. * @type array<\Google\Cloud\Dialogflow\V2\Fulfillment\Feature>|\Google\Protobuf\Internal\RepeatedField $features - * Optional. The field defines whether the fulfillment is enabled for certain features. + * Optional. The field defines whether the fulfillment is enabled for certain + * features. * } */ public function __construct($data = NULL) { @@ -117,7 +121,8 @@ public function setName($var) } /** - * Optional. The human-readable name of the fulfillment, unique within the agent. + * Optional. The human-readable name of the fulfillment, unique within the + * agent. * This field is not used for Fulfillment in an Environment. * * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -129,7 +134,8 @@ public function getDisplayName() } /** - * Optional. The human-readable name of the fulfillment, unique within the agent. + * Optional. The human-readable name of the fulfillment, unique within the + * agent. * This field is not used for Fulfillment in an Environment. * * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -202,7 +208,8 @@ public function setEnabled($var) } /** - * Optional. The field defines whether the fulfillment is enabled for certain features. + * Optional. The field defines whether the fulfillment is enabled for certain + * features. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField @@ -213,7 +220,8 @@ public function getFeatures() } /** - * Optional. The field defines whether the fulfillment is enabled for certain features. + * Optional. The field defines whether the fulfillment is enabled for certain + * features. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\Dialogflow\V2\Fulfillment\Feature>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/Dialogflow/src/V2/Fulfillment/GenericWebService.php b/Dialogflow/src/V2/Fulfillment/GenericWebService.php index a4893b47e7ed..1a8a455ca692 100644 --- a/Dialogflow/src/V2/Fulfillment/GenericWebService.php +++ b/Dialogflow/src/V2/Fulfillment/GenericWebService.php @@ -40,14 +40,15 @@ class GenericWebService extends \Google\Protobuf\Internal\Message */ private $password = ''; /** - * Optional. The HTTP request headers to send together with fulfillment requests. + * Optional. The HTTP request headers to send together with fulfillment + * requests. * * Generated from protobuf field map request_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $request_headers; /** - * Optional. Indicates if generic web service is created through Cloud Functions - * integration. Defaults to false. + * Optional. Indicates if generic web service is created through Cloud + * Functions integration. Defaults to false. * is_cloud_function is deprecated. Cloud functions can be configured by * its uri as a regular web service now. * @@ -70,10 +71,11 @@ class GenericWebService extends \Google\Protobuf\Internal\Message * @type string $password * Optional. The password for HTTP Basic authentication. * @type array|\Google\Protobuf\Internal\MapField $request_headers - * Optional. The HTTP request headers to send together with fulfillment requests. + * Optional. The HTTP request headers to send together with fulfillment + * requests. * @type bool $is_cloud_function - * Optional. Indicates if generic web service is created through Cloud Functions - * integration. Defaults to false. + * Optional. Indicates if generic web service is created through Cloud + * Functions integration. Defaults to false. * is_cloud_function is deprecated. Cloud functions can be configured by * its uri as a regular web service now. * } @@ -164,7 +166,8 @@ public function setPassword($var) } /** - * Optional. The HTTP request headers to send together with fulfillment requests. + * Optional. The HTTP request headers to send together with fulfillment + * requests. * * Generated from protobuf field map request_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField @@ -175,7 +178,8 @@ public function getRequestHeaders() } /** - * Optional. The HTTP request headers to send together with fulfillment requests. + * Optional. The HTTP request headers to send together with fulfillment + * requests. * * Generated from protobuf field map request_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var @@ -190,8 +194,8 @@ public function setRequestHeaders($var) } /** - * Optional. Indicates if generic web service is created through Cloud Functions - * integration. Defaults to false. + * Optional. Indicates if generic web service is created through Cloud + * Functions integration. Defaults to false. * is_cloud_function is deprecated. Cloud functions can be configured by * its uri as a regular web service now. * @@ -206,8 +210,8 @@ public function getIsCloudFunction() } /** - * Optional. Indicates if generic web service is created through Cloud Functions - * integration. Defaults to false. + * Optional. Indicates if generic web service is created through Cloud + * Functions integration. Defaults to false. * is_cloud_function is deprecated. Cloud functions can be configured by * its uri as a regular web service now. * diff --git a/Dialogflow/src/V2/Gapic/AgentsGapicClient.php b/Dialogflow/src/V2/Gapic/AgentsGapicClient.php index 252252104b4c..1768c3fdf119 100644 --- a/Dialogflow/src/V2/Gapic/AgentsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/AgentsGapicClient.php @@ -455,7 +455,8 @@ public function deleteAgent($parent, array $optionalArgs = []) * * - `metadata`: An empty [Struct * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse] + * - `response`: + * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse] * * Sample code: * ``` @@ -496,10 +497,10 @@ public function deleteAgent($parent, array $optionalArgs = []) * * @param string $parent Required. The project that the agent to export is associated with. * Format: `projects/`. - * @param string $agentUri Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) - * URI to export the agent to. - * The format of this URI must be `gs:///`. - * If left unspecified, the serialized agent is returned inline. + * @param string $agentUri Required. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. * * Dialogflow performs a write operation for the Cloud Storage object * on the caller's behalf, so your request authentication must @@ -627,11 +628,13 @@ public function getValidationResult($parent, array $optionalArgs = []) * * Uploads new intents and entity types without deleting the existing ones. * Intents and entity types with the same name are replaced with the new - * versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft - * agent will be trained automatically (unless disabled in agent settings). - * However, once the import is done, training may not be completed yet. Please - * call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train - * explicitly. + * versions from + * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After + * the import, the imported draft agent will be trained automatically (unless + * disabled in agent settings). However, once the import is done, training may + * not be completed yet. Please call + * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the + * operation it returns in order to train explicitly. * * This method is a [long-running * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). @@ -735,8 +738,9 @@ public function importAgent($parent, array $optionalArgs = []) * entity types in the older version are deleted. After the restore, the * restored draft agent will be trained automatically (unless disabled in * agent settings). However, once the restore is done, training may not be - * completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it - * returns in order to train explicitly. + * completed yet. Please call + * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the + * operation it returns in order to train explicitly. * * This method is a [long-running * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). diff --git a/Dialogflow/src/V2/Gapic/AnswerRecordsGapicClient.php b/Dialogflow/src/V2/Gapic/AnswerRecordsGapicClient.php index d7584ae08567..9b73f1196364 100644 --- a/Dialogflow/src/V2/Gapic/AnswerRecordsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/AnswerRecordsGapicClient.php @@ -45,7 +45,8 @@ use Google\Protobuf\FieldMask; /** - * Service Description: Service for managing [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord]. + * Service Description: Service for managing + * [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord]. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: diff --git a/Dialogflow/src/V2/Gapic/ConversationDatasetsGapicClient.php b/Dialogflow/src/V2/Gapic/ConversationDatasetsGapicClient.php index 90090e4db64e..d0e422d6979e 100644 --- a/Dialogflow/src/V2/Gapic/ConversationDatasetsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/ConversationDatasetsGapicClient.php @@ -358,8 +358,10 @@ public function __construct(array $options = []) * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata] - * - `response`: [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset] + * - `metadata`: + * [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata] + * - `response`: + * [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset] * * Sample code: * ``` @@ -433,7 +435,8 @@ public function createConversationDataset($parent, $conversationDataset, array $ * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata] + * - `metadata`: + * [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * @@ -548,8 +551,10 @@ public function getConversationDataset($name, array $optionalArgs = []) * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata] - * - `response`: [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse] + * - `metadata`: + * [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata] + * - `response`: + * [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse] * * Sample code: * ``` @@ -644,8 +649,8 @@ public function importConversationData($name, $inputConfig, array $optionalArgs * } * ``` * - * @param string $parent Required. The project and location name to list all conversation datasets for. - * Format: `projects//locations/` + * @param string $parent Required. The project and location name to list all conversation datasets + * for. Format: `projects//locations/` * @param array $optionalArgs { * Optional. * diff --git a/Dialogflow/src/V2/Gapic/ConversationModelsGapicClient.php b/Dialogflow/src/V2/Gapic/ConversationModelsGapicClient.php index 91f181ff549e..1eb712c9ec8c 100644 --- a/Dialogflow/src/V2/Gapic/ConversationModelsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/ConversationModelsGapicClient.php @@ -489,8 +489,10 @@ public function __construct(array $options = []) * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata] - * - `response`: [ConversationModel][google.cloud.dialogflow.v2.ConversationModel] + * - `metadata`: + * [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata] + * - `response`: + * [ConversationModel][google.cloud.dialogflow.v2.ConversationModel] * * Sample code: * ``` @@ -636,7 +638,8 @@ public function createConversationModelEvaluation($parent, $conversationModelEva * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata] + * - `metadata`: + * [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * @@ -710,7 +713,8 @@ public function deleteConversationModel($name, array $optionalArgs = []) * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata] + * - `metadata`: + * [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * @@ -1003,7 +1007,8 @@ public function listConversationModels($parent, array $optionalArgs = []) * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata] + * - `metadata`: + * [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * diff --git a/Dialogflow/src/V2/Gapic/ConversationProfilesGapicClient.php b/Dialogflow/src/V2/Gapic/ConversationProfilesGapicClient.php index 41bd6f332b28..45f0111c730e 100644 --- a/Dialogflow/src/V2/Gapic/ConversationProfilesGapicClient.php +++ b/Dialogflow/src/V2/Gapic/ConversationProfilesGapicClient.php @@ -59,7 +59,8 @@ use Google\Protobuf\GPBEmpty; /** - * Service Description: Service for managing [ConversationProfiles][google.cloud.dialogflow.v2.ConversationProfile]. + * Service Description: Service for managing + * [ConversationProfiles][google.cloud.dialogflow.v2.ConversationProfile]. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: @@ -481,8 +482,10 @@ public function __construct(array $options = []) * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata] - * - `response`: [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] + * - `metadata`: + * [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata] + * - `response`: + * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] * * Sample code: * ``` @@ -561,7 +564,8 @@ public function clearSuggestionFeatureConfig($conversationProfile, $participantR * * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] * aren't populated in the response. You can retrieve them via - * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] API. + * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] + * API. * * Sample code: * ``` @@ -762,8 +766,10 @@ public function listConversationProfiles($parent, array $optionalArgs = []) * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata] - * - `response`: [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] + * - `metadata`: + * [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata] + * - `response`: + * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] * * If a long running operation to add or update suggestion feature * config for the same conversation profile, participant role and suggestion @@ -846,7 +852,8 @@ public function setSuggestionFeatureConfig($conversationProfile, $participantRol * * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] * aren't populated in the response. You can retrieve them via - * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] API. + * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] + * API. * * Sample code: * ``` diff --git a/Dialogflow/src/V2/Gapic/ConversationsGapicClient.php b/Dialogflow/src/V2/Gapic/ConversationsGapicClient.php index 577eec6a92cb..3e4742bbd0d0 100644 --- a/Dialogflow/src/V2/Gapic/ConversationsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/ConversationsGapicClient.php @@ -42,13 +42,16 @@ use Google\Cloud\Dialogflow\V2\ListConversationsResponse; use Google\Cloud\Dialogflow\V2\ListMessagesRequest; use Google\Cloud\Dialogflow\V2\ListMessagesResponse; +use Google\Cloud\Dialogflow\V2\SuggestConversationSummaryRequest; +use Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse; use Google\Cloud\Location\GetLocationRequest; use Google\Cloud\Location\ListLocationsRequest; use Google\Cloud\Location\ListLocationsResponse; use Google\Cloud\Location\Location; /** - * Service Description: Service for managing [Conversations][google.cloud.dialogflow.v2.Conversation]. + * Service Description: Service for managing + * [Conversations][google.cloud.dialogflow.v2.Conversation]. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: @@ -96,14 +99,20 @@ class ConversationsGapicClient private static $locationNameTemplate; + private static $messageNameTemplate; + private static $projectNameTemplate; private static $projectConversationNameTemplate; + private static $projectConversationMessageNameTemplate; + private static $projectConversationProfileNameTemplate; private static $projectLocationConversationNameTemplate; + private static $projectLocationConversationMessageNameTemplate; + private static $projectLocationConversationProfileNameTemplate; private static $pathTemplateMap; @@ -154,6 +163,15 @@ private static function getLocationNameTemplate() return self::$locationNameTemplate; } + private static function getMessageNameTemplate() + { + if (self::$messageNameTemplate == null) { + self::$messageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); + } + + return self::$messageNameTemplate; + } + private static function getProjectNameTemplate() { if (self::$projectNameTemplate == null) { @@ -172,6 +190,15 @@ private static function getProjectConversationNameTemplate() return self::$projectConversationNameTemplate; } + private static function getProjectConversationMessageNameTemplate() + { + if (self::$projectConversationMessageNameTemplate == null) { + self::$projectConversationMessageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); + } + + return self::$projectConversationMessageNameTemplate; + } + private static function getProjectConversationProfileNameTemplate() { if (self::$projectConversationProfileNameTemplate == null) { @@ -190,6 +217,15 @@ private static function getProjectLocationConversationNameTemplate() return self::$projectLocationConversationNameTemplate; } + private static function getProjectLocationConversationMessageNameTemplate() + { + if (self::$projectLocationConversationMessageNameTemplate == null) { + self::$projectLocationConversationMessageNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}'); + } + + return self::$projectLocationConversationMessageNameTemplate; + } + private static function getProjectLocationConversationProfileNameTemplate() { if (self::$projectLocationConversationProfileNameTemplate == null) { @@ -206,10 +242,13 @@ private static function getPathTemplateMap() 'conversation' => self::getConversationNameTemplate(), 'conversationProfile' => self::getConversationProfileNameTemplate(), 'location' => self::getLocationNameTemplate(), + 'message' => self::getMessageNameTemplate(), 'project' => self::getProjectNameTemplate(), 'projectConversation' => self::getProjectConversationNameTemplate(), + 'projectConversationMessage' => self::getProjectConversationMessageNameTemplate(), 'projectConversationProfile' => self::getProjectConversationProfileNameTemplate(), 'projectLocationConversation' => self::getProjectLocationConversationNameTemplate(), + 'projectLocationConversationMessage' => self::getProjectLocationConversationMessageNameTemplate(), 'projectLocationConversationProfile' => self::getProjectLocationConversationProfileNameTemplate(), ]; } @@ -268,6 +307,25 @@ public static function locationName($project, $location) ]); } + /** + * Formats a string containing the fully-qualified path to represent a message + * resource. + * + * @param string $project + * @param string $conversation + * @param string $message + * + * @return string The formatted message resource. + */ + public static function messageName($project, $conversation, $message) + { + return self::getMessageNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + 'message' => $message, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -300,6 +358,25 @@ public static function projectConversationName($project, $conversation) ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_conversation_message resource. + * + * @param string $project + * @param string $conversation + * @param string $message + * + * @return string The formatted project_conversation_message resource. + */ + public static function projectConversationMessageName($project, $conversation, $message) + { + return self::getProjectConversationMessageNameTemplate()->render([ + 'project' => $project, + 'conversation' => $conversation, + 'message' => $message, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_conversation_profile resource. @@ -336,6 +413,27 @@ public static function projectLocationConversationName($project, $location, $con ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_conversation_message resource. + * + * @param string $project + * @param string $location + * @param string $conversation + * @param string $message + * + * @return string The formatted project_location_conversation_message resource. + */ + public static function projectLocationConversationMessageName($project, $location, $conversation, $message) + { + return self::getProjectLocationConversationMessageNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'conversation' => $conversation, + 'message' => $message, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_conversation_profile resource. @@ -362,10 +460,13 @@ public static function projectLocationConversationProfileName($project, $locatio * - conversation: projects/{project}/conversations/{conversation} * - conversationProfile: projects/{project}/conversationProfiles/{conversation_profile} * - location: projects/{project}/locations/{location} + * - message: projects/{project}/conversations/{conversation}/messages/{message} * - project: projects/{project} * - projectConversation: projects/{project}/conversations/{conversation} + * - projectConversationMessage: projects/{project}/conversations/{conversation}/messages/{message} * - projectConversationProfile: projects/{project}/conversationProfiles/{conversation_profile} * - projectLocationConversation: projects/{project}/locations/{location}/conversations/{conversation} + * - projectLocationConversationMessage: projects/{project}/locations/{location}/conversations/{conversation}/messages/{message} * - projectLocationConversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} * * The optional $template argument can be supplied to specify a particular pattern, @@ -519,11 +620,14 @@ public function completeConversation($name, array $optionalArgs = []) * For Assist Stage, there's no dialogflow agent responding to user queries. * But we will provide suggestions which are generated from conversation. * - * If [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] is configured for a dialogflow - * agent, conversation will start from `Automated Agent Stage`, otherwise, it - * will start from `Assist Stage`. And during `Automated Agent Stage`, once an - * [Intent][google.cloud.dialogflow.v2.Intent] with [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] is triggered, conversation - * will transfer to Assist Stage. + * If + * [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] + * is configured for a dialogflow agent, conversation will start from + * `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And + * during `Automated Agent Stage`, once an + * [Intent][google.cloud.dialogflow.v2.Intent] with + * [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] + * is triggered, conversation will transfer to Assist Stage. * * Sample code: * ``` @@ -544,8 +648,8 @@ public function completeConversation($name, array $optionalArgs = []) * Optional. * * @type string $conversationId - * Optional. Identifier of the conversation. Generally it's auto generated by Google. - * Only set it if you cannot wait for the response to return a + * Optional. Identifier of the conversation. Generally it's auto generated by + * Google. Only set it if you cannot wait for the response to return a * auto-generated one to you. * * The conversation ID must be compliant with the regression fomula @@ -799,6 +903,68 @@ public function listMessages($parent, array $optionalArgs = []) return $this->getPagedListResponse('ListMessages', $optionalArgs, ListMessagesResponse::class, $request); } + /** + * Suggests summary for a conversation based on specific historical messages. + * The range of the messages to be used for summary can be specified in the + * request. + * + * Sample code: + * ``` + * $conversationsClient = new ConversationsClient(); + * try { + * $formattedConversation = $conversationsClient->conversationName('[PROJECT]', '[CONVERSATION]'); + * $response = $conversationsClient->suggestConversationSummary($formattedConversation); + * } finally { + * $conversationsClient->close(); + * } + * ``` + * + * @param string $conversation Required. The conversation to fetch suggestion for. + * Format: `projects//locations//conversations/`. + * @param array $optionalArgs { + * Optional. + * + * @type string $latestMessage + * The name of the latest conversation message used as context for + * compiling suggestion. If empty, the latest message of the conversation will + * be used. + * + * Format: `projects//locations//conversations//messages/`. + * @type int $contextSize + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 500 and at most 1000. + * @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\Dialogflow\V2\SuggestConversationSummaryResponse + * + * @throws ApiException if the remote call fails + */ + public function suggestConversationSummary($conversation, array $optionalArgs = []) + { + $request = new SuggestConversationSummaryRequest(); + $requestParamHeaders = []; + $request->setConversation($conversation); + $requestParamHeaders['conversation'] = $conversation; + if (isset($optionalArgs['latestMessage'])) { + $request->setLatestMessage($optionalArgs['latestMessage']); + } + + if (isset($optionalArgs['contextSize'])) { + $request->setContextSize($optionalArgs['contextSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SuggestConversationSummary', SuggestConversationSummaryResponse::class, $optionalArgs, $request)->wait(); + } + /** * Gets information about a location. * diff --git a/Dialogflow/src/V2/Gapic/DocumentsGapicClient.php b/Dialogflow/src/V2/Gapic/DocumentsGapicClient.php index c2c3670f9c04..4a443bb76d0a 100644 --- a/Dialogflow/src/V2/Gapic/DocumentsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/DocumentsGapicClient.php @@ -59,7 +59,8 @@ use Google\Protobuf\FieldMask; /** - * Service Description: Service for managing knowledge [Documents][google.cloud.dialogflow.v2.Document]. + * Service Description: Service for managing knowledge + * [Documents][google.cloud.dialogflow.v2.Document]. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: @@ -487,7 +488,8 @@ public function __construct(array $options = []) * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] * - `response`: [Document][google.cloud.dialogflow.v2.Document] * * Sample code: @@ -563,7 +565,8 @@ public function createDocument($parent, $document, array $optionalArgs = []) * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] * - `response`: An [Empty * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * @@ -636,7 +639,8 @@ public function deleteDocument($name, array $optionalArgs = []) * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] * - `response`: [Document][google.cloud.dialogflow.v2.Document] * * Sample code: @@ -772,8 +776,10 @@ public function getDocument($name, array $optionalArgs = []) * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `response`: + * [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse] * * Sample code: * ``` @@ -965,7 +971,8 @@ public function listDocuments($parent, array $optionalArgs = []) * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] * - `response`: [Document][google.cloud.dialogflow.v2.Document] * * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; @@ -1014,8 +1021,8 @@ public function listDocuments($parent, array $optionalArgs = []) * Optional. * * @type string $contentUri - * Optional. The path of gcs source file for reloading document content. For now, - * only gcs uri is supported. + * Optional. The path of gcs source file for reloading document content. For + * now, only gcs uri is supported. * * For documents stored in Google Cloud Storage, these URIs must have * the form `gs:///`. @@ -1023,8 +1030,8 @@ public function listDocuments($parent, array $optionalArgs = []) * Optional. Whether to import custom metadata from Google Cloud Storage. * Only valid when the document source is Google Cloud Storage URI. * @type bool $smartMessagingPartialUpdate - * Optional. When enabled, the reload request is to apply partial update to the smart - * messaging allowlist. + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. * @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 @@ -1065,7 +1072,8 @@ public function reloadDocument($name, array $optionalArgs = []) * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). * The returned `Operation` type has the following method-specific fields: * - * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + * - `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] * - `response`: [Document][google.cloud.dialogflow.v2.Document] * * Sample code: diff --git a/Dialogflow/src/V2/Gapic/EntityTypesGapicClient.php b/Dialogflow/src/V2/Gapic/EntityTypesGapicClient.php index ebcab7f67893..5575fe7ab98d 100644 --- a/Dialogflow/src/V2/Gapic/EntityTypesGapicClient.php +++ b/Dialogflow/src/V2/Gapic/EntityTypesGapicClient.php @@ -835,7 +835,8 @@ public function batchUpdateEntities($parent, $entities, array $optionalArgs = [] * * - `metadata`: An empty [Struct * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse] + * - `response`: + * [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse] * * Note: You should always train an agent prior to sending it queries. See the * [training diff --git a/Dialogflow/src/V2/Gapic/IntentsGapicClient.php b/Dialogflow/src/V2/Gapic/IntentsGapicClient.php index 7c2a03093120..b719effcecea 100644 --- a/Dialogflow/src/V2/Gapic/IntentsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/IntentsGapicClient.php @@ -553,7 +553,8 @@ public function batchDeleteIntents($parent, $intents, array $optionalArgs = []) * * - `metadata`: An empty [Struct * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse] + * - `response`: + * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse] * * Note: You should always train an agent prior to sending it queries. See the * [training diff --git a/Dialogflow/src/V2/Gapic/KnowledgeBasesGapicClient.php b/Dialogflow/src/V2/Gapic/KnowledgeBasesGapicClient.php index 1e22d093d770..aa9b85657047 100644 --- a/Dialogflow/src/V2/Gapic/KnowledgeBasesGapicClient.php +++ b/Dialogflow/src/V2/Gapic/KnowledgeBasesGapicClient.php @@ -49,7 +49,8 @@ use Google\Protobuf\GPBEmpty; /** - * Service Description: Service for managing [KnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBase]. + * Service Description: Service for managing + * [KnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBase]. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: diff --git a/Dialogflow/src/V2/Gapic/ParticipantsGapicClient.php b/Dialogflow/src/V2/Gapic/ParticipantsGapicClient.php index ab17926454ba..1bf43775cd1e 100644 --- a/Dialogflow/src/V2/Gapic/ParticipantsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/ParticipantsGapicClient.php @@ -882,8 +882,9 @@ public function streamingAnalyzeContent(array $optionalArgs = []) * ID>/conversations//messages/`. * @type int $contextSize * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] to use as context - * when compiling the suggestion. By default 20 and at most 50. + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. * @type AssistQueryParameters $assistQueryParams * Parameters for a human assist query. * @type RetrySettings|array $retrySettings diff --git a/Dialogflow/src/V2/Gapic/SessionEntityTypesGapicClient.php b/Dialogflow/src/V2/Gapic/SessionEntityTypesGapicClient.php index cb56da168986..5f0f47cd11f9 100644 --- a/Dialogflow/src/V2/Gapic/SessionEntityTypesGapicClient.php +++ b/Dialogflow/src/V2/Gapic/SessionEntityTypesGapicClient.php @@ -49,7 +49,8 @@ use Google\Protobuf\GPBEmpty; /** - * Service Description: Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType]. + * Service Description: Service for managing + * [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType]. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: diff --git a/Dialogflow/src/V2/Gapic/SessionsGapicClient.php b/Dialogflow/src/V2/Gapic/SessionsGapicClient.php index 12c80b25580c..136a7b209c31 100644 --- a/Dialogflow/src/V2/Gapic/SessionsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/SessionsGapicClient.php @@ -451,12 +451,14 @@ public function __construct(array $options = []) * audio. If this field is not set and agent-level speech synthesizer is not * configured, no output audio is generated. * @type FieldMask $outputAudioConfigMask - * Mask for [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] indicating which settings in this - * request-level config should override speech synthesizer settings defined at - * agent-level. - * - * If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] replaces the agent-level - * config in its entirety. + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. * @type string $inputAudio * The natural language speech audio to be processed. This field * should be populated iff `query_input` is set to an input audio config. diff --git a/Dialogflow/src/V2/GetAgentRequest.php b/Dialogflow/src/V2/GetAgentRequest.php index bb92157118e4..ea70cc2d91cf 100644 --- a/Dialogflow/src/V2/GetAgentRequest.php +++ b/Dialogflow/src/V2/GetAgentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent]. + * The request message for + * [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetAgentRequest */ diff --git a/Dialogflow/src/V2/GetContextRequest.php b/Dialogflow/src/V2/GetContextRequest.php index 8e34a4618df4..01c6bfc71bb5 100644 --- a/Dialogflow/src/V2/GetContextRequest.php +++ b/Dialogflow/src/V2/GetContextRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext]. + * The request message for + * [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetContextRequest */ diff --git a/Dialogflow/src/V2/GetConversationProfileRequest.php b/Dialogflow/src/V2/GetConversationProfileRequest.php index cce3ae2e20e2..4f8e80ce5565 100644 --- a/Dialogflow/src/V2/GetConversationProfileRequest.php +++ b/Dialogflow/src/V2/GetConversationProfileRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile]. + * The request message for + * [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetConversationProfileRequest */ diff --git a/Dialogflow/src/V2/GetConversationRequest.php b/Dialogflow/src/V2/GetConversationRequest.php index c35dae3a82ac..c651cd9c64fa 100644 --- a/Dialogflow/src/V2/GetConversationRequest.php +++ b/Dialogflow/src/V2/GetConversationRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Conversations.GetConversation][google.cloud.dialogflow.v2.Conversations.GetConversation]. + * The request message for + * [Conversations.GetConversation][google.cloud.dialogflow.v2.Conversations.GetConversation]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetConversationRequest */ diff --git a/Dialogflow/src/V2/GetDocumentRequest.php b/Dialogflow/src/V2/GetDocumentRequest.php index 00f71cc13a19..041da4771048 100644 --- a/Dialogflow/src/V2/GetDocumentRequest.php +++ b/Dialogflow/src/V2/GetDocumentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [Documents.GetDocument][google.cloud.dialogflow.v2.Documents.GetDocument]. + * Request message for + * [Documents.GetDocument][google.cloud.dialogflow.v2.Documents.GetDocument]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetDocumentRequest */ diff --git a/Dialogflow/src/V2/GetEntityTypeRequest.php b/Dialogflow/src/V2/GetEntityTypeRequest.php index 59b3386509ca..57cb7d96d2cc 100644 --- a/Dialogflow/src/V2/GetEntityTypeRequest.php +++ b/Dialogflow/src/V2/GetEntityTypeRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType]. + * The request message for + * [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetEntityTypeRequest */ diff --git a/Dialogflow/src/V2/GetEnvironmentHistoryRequest.php b/Dialogflow/src/V2/GetEnvironmentHistoryRequest.php index 096fea74ba0c..13f701a706ea 100644 --- a/Dialogflow/src/V2/GetEnvironmentHistoryRequest.php +++ b/Dialogflow/src/V2/GetEnvironmentHistoryRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory]. + * The request message for + * [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest */ @@ -27,8 +28,8 @@ class GetEnvironmentHistoryRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -54,8 +55,8 @@ class GetEnvironmentHistoryRequest extends \Google\Protobuf\Internal\Message * ID>/agent/environments/` * The environment ID for the default environment is `-`. * @type int $page_size - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * @type string $page_token * Optional. The next_page_token value returned from a previous list request. * } @@ -102,8 +103,8 @@ public function setParent($var) } /** - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -114,8 +115,8 @@ public function getPageSize() } /** - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/Dialogflow/src/V2/GetEnvironmentRequest.php b/Dialogflow/src/V2/GetEnvironmentRequest.php index 5d7fa8265bdf..049a92422747 100644 --- a/Dialogflow/src/V2/GetEnvironmentRequest.php +++ b/Dialogflow/src/V2/GetEnvironmentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Environments.GetEnvironment][google.cloud.dialogflow.v2.Environments.GetEnvironment]. + * The request message for + * [Environments.GetEnvironment][google.cloud.dialogflow.v2.Environments.GetEnvironment]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetEnvironmentRequest */ diff --git a/Dialogflow/src/V2/GetFulfillmentRequest.php b/Dialogflow/src/V2/GetFulfillmentRequest.php index f6f030f132ab..9b3ebf3cca18 100644 --- a/Dialogflow/src/V2/GetFulfillmentRequest.php +++ b/Dialogflow/src/V2/GetFulfillmentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Fulfillments.GetFulfillment][google.cloud.dialogflow.v2.Fulfillments.GetFulfillment]. + * The request message for + * [Fulfillments.GetFulfillment][google.cloud.dialogflow.v2.Fulfillments.GetFulfillment]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetFulfillmentRequest */ diff --git a/Dialogflow/src/V2/GetIntentRequest.php b/Dialogflow/src/V2/GetIntentRequest.php index 4e17a94a16a9..616c6c7eb1f6 100644 --- a/Dialogflow/src/V2/GetIntentRequest.php +++ b/Dialogflow/src/V2/GetIntentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent]. + * The request message for + * [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetIntentRequest */ diff --git a/Dialogflow/src/V2/GetKnowledgeBaseRequest.php b/Dialogflow/src/V2/GetKnowledgeBaseRequest.php index b0e609f42800..34a0d5503049 100644 --- a/Dialogflow/src/V2/GetKnowledgeBaseRequest.php +++ b/Dialogflow/src/V2/GetKnowledgeBaseRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.GetKnowledgeBase]. + * Request message for + * [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.GetKnowledgeBase]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetKnowledgeBaseRequest */ diff --git a/Dialogflow/src/V2/GetParticipantRequest.php b/Dialogflow/src/V2/GetParticipantRequest.php index e7bc97cdc4a3..acf36d704ea1 100644 --- a/Dialogflow/src/V2/GetParticipantRequest.php +++ b/Dialogflow/src/V2/GetParticipantRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Participants.GetParticipant][google.cloud.dialogflow.v2.Participants.GetParticipant]. + * The request message for + * [Participants.GetParticipant][google.cloud.dialogflow.v2.Participants.GetParticipant]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetParticipantRequest */ diff --git a/Dialogflow/src/V2/GetSessionEntityTypeRequest.php b/Dialogflow/src/V2/GetSessionEntityTypeRequest.php index f43f79fa18d1..7d3f773e2866 100644 --- a/Dialogflow/src/V2/GetSessionEntityTypeRequest.php +++ b/Dialogflow/src/V2/GetSessionEntityTypeRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType]. + * The request message for + * [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetSessionEntityTypeRequest */ diff --git a/Dialogflow/src/V2/GetValidationResultRequest.php b/Dialogflow/src/V2/GetValidationResultRequest.php index 782db1ad3102..a07cf78760d0 100644 --- a/Dialogflow/src/V2/GetValidationResultRequest.php +++ b/Dialogflow/src/V2/GetValidationResultRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult]. + * The request message for + * [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetValidationResultRequest */ diff --git a/Dialogflow/src/V2/GetVersionRequest.php b/Dialogflow/src/V2/GetVersionRequest.php index cf1b8ee3cb1f..e05ed327a235 100644 --- a/Dialogflow/src/V2/GetVersionRequest.php +++ b/Dialogflow/src/V2/GetVersionRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Versions.GetVersion][google.cloud.dialogflow.v2.Versions.GetVersion]. + * The request message for + * [Versions.GetVersion][google.cloud.dialogflow.v2.Versions.GetVersion]. * * Generated from protobuf message google.cloud.dialogflow.v2.GetVersionRequest */ diff --git a/Dialogflow/src/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php b/Dialogflow/src/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php index 02e77ad813c3..f9a20291a89d 100644 --- a/Dialogflow/src/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php +++ b/Dialogflow/src/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php @@ -32,11 +32,17 @@ class MessageAnalysisConfig extends \Google\Protobuf\Internal\Message * and identifies the prevailing subjective opinion, especially to determine * a user's attitude as positive, negative, or neutral: * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - * For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in + * For + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * method, result will be in * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. - * For [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] method, result will be in + * For + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * method, result will be in * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] - * For [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] method, result will be in + * For + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] + * method, result will be in * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] * If Pub/Sub notification is configured, result will be in * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. @@ -64,11 +70,17 @@ class MessageAnalysisConfig extends \Google\Protobuf\Internal\Message * and identifies the prevailing subjective opinion, especially to determine * a user's attitude as positive, negative, or neutral: * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - * For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in + * For + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * method, result will be in * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. - * For [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] method, result will be in + * For + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * method, result will be in * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] - * For [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] method, result will be in + * For + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] + * method, result will be in * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] * If Pub/Sub notification is configured, result will be in * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. @@ -120,11 +132,17 @@ public function setEnableEntityExtraction($var) * and identifies the prevailing subjective opinion, especially to determine * a user's attitude as positive, negative, or neutral: * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - * For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in + * For + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * method, result will be in * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. - * For [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] method, result will be in + * For + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * method, result will be in * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] - * For [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] method, result will be in + * For + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] + * method, result will be in * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] * If Pub/Sub notification is configured, result will be in * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. @@ -144,11 +162,17 @@ public function getEnableSentimentAnalysis() * and identifies the prevailing subjective opinion, especially to determine * a user's attitude as positive, negative, or neutral: * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - * For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in + * For + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * method, result will be in * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. - * For [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] method, result will be in + * For + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * method, result will be in * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] - * For [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] method, result will be in + * For + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] + * method, result will be in * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] * If Pub/Sub notification is configured, result will be in * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. diff --git a/Dialogflow/src/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php b/Dialogflow/src/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php index 45165ad2284a..6ef6ed220a96 100644 --- a/Dialogflow/src/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php +++ b/Dialogflow/src/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php @@ -17,8 +17,8 @@ class DialogflowQuerySource extends \Google\Protobuf\Internal\Message { /** - * Required. The name of a Dialogflow virtual agent used for end user side intent - * detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in * the same Dialogflow project. * @@ -33,8 +33,8 @@ class DialogflowQuerySource extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $agent - * Required. The name of a Dialogflow virtual agent used for end user side intent - * detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in * the same Dialogflow project. * } @@ -45,8 +45,8 @@ public function __construct($data = NULL) { } /** - * Required. The name of a Dialogflow virtual agent used for end user side intent - * detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in * the same Dialogflow project. * @@ -59,8 +59,8 @@ public function getAgent() } /** - * Required. The name of a Dialogflow virtual agent used for end user side intent - * detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in * the same Dialogflow project. * diff --git a/Dialogflow/src/V2/ImportAgentRequest.php b/Dialogflow/src/V2/ImportAgentRequest.php index dbc2e21eb844..dfc23baee4e8 100644 --- a/Dialogflow/src/V2/ImportAgentRequest.php +++ b/Dialogflow/src/V2/ImportAgentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent]. + * The request message for + * [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent]. * * Generated from protobuf message google.cloud.dialogflow.v2.ImportAgentRequest */ diff --git a/Dialogflow/src/V2/ImportConversationDataOperationMetadata.php b/Dialogflow/src/V2/ImportConversationDataOperationMetadata.php index 71acc18ea828..7960bfe291ba 100644 --- a/Dialogflow/src/V2/ImportConversationDataOperationMetadata.php +++ b/Dialogflow/src/V2/ImportConversationDataOperationMetadata.php @@ -9,7 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Metadata for a [ConversationDatasets.ImportConversationData][google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationData] operation. + * Metadata for a + * [ConversationDatasets.ImportConversationData][google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationData] + * operation. * * Generated from protobuf message google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata */ diff --git a/Dialogflow/src/V2/ImportConversationDataOperationResponse.php b/Dialogflow/src/V2/ImportConversationDataOperationResponse.php index f30d618bad8e..d439ad5f4b52 100644 --- a/Dialogflow/src/V2/ImportConversationDataOperationResponse.php +++ b/Dialogflow/src/V2/ImportConversationDataOperationResponse.php @@ -9,8 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response used for [ConversationDatasets.ImportConversationData][google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationData] long - * running operation. + * Response used for + * [ConversationDatasets.ImportConversationData][google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationData] + * long running operation. * * Generated from protobuf message google.cloud.dialogflow.v2.ImportConversationDataOperationResponse */ diff --git a/Dialogflow/src/V2/ImportConversationDataRequest.php b/Dialogflow/src/V2/ImportConversationDataRequest.php index 6f087719f715..7028d15132fc 100644 --- a/Dialogflow/src/V2/ImportConversationDataRequest.php +++ b/Dialogflow/src/V2/ImportConversationDataRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [ConversationDatasets.ImportConversationData][google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationData]. + * The request message for + * [ConversationDatasets.ImportConversationData][google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationData]. * * Generated from protobuf message google.cloud.dialogflow.v2.ImportConversationDataRequest */ diff --git a/Dialogflow/src/V2/ImportDocumentsRequest.php b/Dialogflow/src/V2/ImportDocumentsRequest.php index 978638864226..f675acdde64a 100644 --- a/Dialogflow/src/V2/ImportDocumentsRequest.php +++ b/Dialogflow/src/V2/ImportDocumentsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [Documents.ImportDocuments][google.cloud.dialogflow.v2.Documents.ImportDocuments]. + * Request message for + * [Documents.ImportDocuments][google.cloud.dialogflow.v2.Documents.ImportDocuments]. * * Generated from protobuf message google.cloud.dialogflow.v2.ImportDocumentsRequest */ diff --git a/Dialogflow/src/V2/ImportDocumentsResponse.php b/Dialogflow/src/V2/ImportDocumentsResponse.php index 1de5e647f04d..98f7b7ae4fa6 100644 --- a/Dialogflow/src/V2/ImportDocumentsResponse.php +++ b/Dialogflow/src/V2/ImportDocumentsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response message for [Documents.ImportDocuments][google.cloud.dialogflow.v2.Documents.ImportDocuments]. + * Response message for + * [Documents.ImportDocuments][google.cloud.dialogflow.v2.Documents.ImportDocuments]. * * Generated from protobuf message google.cloud.dialogflow.v2.ImportDocumentsResponse */ diff --git a/Dialogflow/src/V2/InputAudioConfig.php b/Dialogflow/src/V2/InputAudioConfig.php index a6ec31a7c4be..b7e34b11675b 100644 --- a/Dialogflow/src/V2/InputAudioConfig.php +++ b/Dialogflow/src/V2/InputAudioConfig.php @@ -42,10 +42,12 @@ class InputAudioConfig extends \Google\Protobuf\Internal\Message */ private $language_code = ''; /** - * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech - * words, e.g. start and end time offsets. If false or unspecified, Speech - * doesn't return any word-level information. + * If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] + * with information about the recognized speech words, e.g. start and end time + * offsets. If false or unspecified, Speech doesn't return any word-level + * information. * * Generated from protobuf field bool enable_word_info = 13; */ @@ -90,7 +92,8 @@ class InputAudioConfig extends \Google\Protobuf\Internal\Message */ private $model = ''; /** - * Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + * Which variant of the [Speech + * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. * * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10; */ @@ -111,7 +114,9 @@ class InputAudioConfig extends \Google\Protobuf\Internal\Message */ private $single_utterance = false; /** - * Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and + * Only used in + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. * If `false` and recognition doesn't return any result, trigger * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. @@ -141,10 +146,12 @@ class InputAudioConfig extends \Google\Protobuf\Internal\Message * for a list of the currently supported language codes. Note that queries in * the same session do not necessarily need to specify the same language. * @type bool $enable_word_info - * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech - * words, e.g. start and end time offsets. If false or unspecified, Speech - * doesn't return any word-level information. + * If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] + * with information about the recognized speech words, e.g. start and end time + * offsets. If false or unspecified, Speech doesn't return any word-level + * information. * @type array|\Google\Protobuf\Internal\RepeatedField $phrase_hints * A list of strings containing words and phrases that the speech * recognizer should recognize with higher likelihood. @@ -172,7 +179,8 @@ class InputAudioConfig extends \Google\Protobuf\Internal\Message * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) * for more details. * @type int $model_variant - * Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + * Which variant of the [Speech + * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. * @type bool $single_utterance * If `false` (default), recognition does not cease until the * client closes the stream. @@ -185,7 +193,9 @@ class InputAudioConfig extends \Google\Protobuf\Internal\Message * Note: When specified, InputAudioConfig.single_utterance takes precedence * over StreamingDetectIntentRequest.single_utterance. * @type bool $disable_no_speech_recognized_event - * Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and + * Only used in + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. * If `false` and recognition doesn't return any result, trigger * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. @@ -291,10 +301,12 @@ public function setLanguageCode($var) } /** - * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech - * words, e.g. start and end time offsets. If false or unspecified, Speech - * doesn't return any word-level information. + * If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] + * with information about the recognized speech words, e.g. start and end time + * offsets. If false or unspecified, Speech doesn't return any word-level + * information. * * Generated from protobuf field bool enable_word_info = 13; * @return bool @@ -305,10 +317,12 @@ public function getEnableWordInfo() } /** - * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech - * words, e.g. start and end time offsets. If false or unspecified, Speech - * doesn't return any word-level information. + * If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] + * with information about the recognized speech words, e.g. start and end time + * offsets. If false or unspecified, Speech doesn't return any word-level + * information. * * Generated from protobuf field bool enable_word_info = 13; * @param bool $var @@ -445,7 +459,8 @@ public function setModel($var) } /** - * Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + * Which variant of the [Speech + * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. * * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10; * @return int @@ -456,7 +471,8 @@ public function getModelVariant() } /** - * Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + * Which variant of the [Speech + * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. * * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10; * @param int $var @@ -515,7 +531,9 @@ public function setSingleUtterance($var) } /** - * Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and + * Only used in + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. * If `false` and recognition doesn't return any result, trigger * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. @@ -529,7 +547,9 @@ public function getDisableNoSpeechRecognizedEvent() } /** - * Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and + * Only used in + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. * If `false` and recognition doesn't return any result, trigger * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. diff --git a/Dialogflow/src/V2/Intent.php b/Dialogflow/src/V2/Intent.php index fe3927fd1f84..4b876e921119 100644 --- a/Dialogflow/src/V2/Intent.php +++ b/Dialogflow/src/V2/Intent.php @@ -24,7 +24,9 @@ class Intent extends \Google\Protobuf\Internal\Message { /** * Optional. The unique identifier of this intent. - * Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] + * Required for + * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and + * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] * methods. * Format: `projects//agent/intents/`. * @@ -168,9 +170,10 @@ class Intent extends \Google\Protobuf\Internal\Message /** * Read-only after creation. The unique identifier of the parent intent in the * chain of followup intents. You can set this field when creating an intent, - * for example with [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or - * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], in order to make this - * intent a followup intent. + * for example with + * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], + * in order to make this intent a followup intent. * It identifies the parent followup intent. * Format: `projects//agent/intents/`. * @@ -178,8 +181,9 @@ class Intent extends \Google\Protobuf\Internal\Message */ private $parent_followup_intent_name = ''; /** - * Output only. Read-only. Information about all followup intents that have this intent as - * a direct or indirect parent. We populate this field only in the output. + * Output only. Read-only. Information about all followup intents that have + * this intent as a direct or indirect parent. We populate this field only in + * the output. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -193,7 +197,9 @@ class Intent extends \Google\Protobuf\Internal\Message * * @type string $name * Optional. The unique identifier of this intent. - * Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] + * Required for + * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and + * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] * methods. * Format: `projects//agent/intents/`. * @type string $display_name @@ -265,14 +271,16 @@ class Intent extends \Google\Protobuf\Internal\Message * @type string $parent_followup_intent_name * Read-only after creation. The unique identifier of the parent intent in the * chain of followup intents. You can set this field when creating an intent, - * for example with [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or - * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], in order to make this - * intent a followup intent. + * for example with + * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], + * in order to make this intent a followup intent. * It identifies the parent followup intent. * Format: `projects//agent/intents/`. * @type array<\Google\Cloud\Dialogflow\V2\Intent\FollowupIntentInfo>|\Google\Protobuf\Internal\RepeatedField $followup_intent_info - * Output only. Read-only. Information about all followup intents that have this intent as - * a direct or indirect parent. We populate this field only in the output. + * Output only. Read-only. Information about all followup intents that have + * this intent as a direct or indirect parent. We populate this field only in + * the output. * } */ public function __construct($data = NULL) { @@ -282,7 +290,9 @@ public function __construct($data = NULL) { /** * Optional. The unique identifier of this intent. - * Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] + * Required for + * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and + * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] * methods. * Format: `projects//agent/intents/`. * @@ -296,7 +306,9 @@ public function getName() /** * Optional. The unique identifier of this intent. - * Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] + * Required for + * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and + * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] * methods. * Format: `projects//agent/intents/`. * @@ -821,9 +833,10 @@ public function setRootFollowupIntentName($var) /** * Read-only after creation. The unique identifier of the parent intent in the * chain of followup intents. You can set this field when creating an intent, - * for example with [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or - * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], in order to make this - * intent a followup intent. + * for example with + * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], + * in order to make this intent a followup intent. * It identifies the parent followup intent. * Format: `projects//agent/intents/`. * @@ -838,9 +851,10 @@ public function getParentFollowupIntentName() /** * Read-only after creation. The unique identifier of the parent intent in the * chain of followup intents. You can set this field when creating an intent, - * for example with [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or - * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], in order to make this - * intent a followup intent. + * for example with + * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], + * in order to make this intent a followup intent. * It identifies the parent followup intent. * Format: `projects//agent/intents/`. * @@ -857,8 +871,9 @@ public function setParentFollowupIntentName($var) } /** - * Output only. Read-only. Information about all followup intents that have this intent as - * a direct or indirect parent. We populate this field only in the output. + * Output only. Read-only. Information about all followup intents that have + * this intent as a direct or indirect parent. We populate this field only in + * the output. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Internal\RepeatedField @@ -869,8 +884,9 @@ public function getFollowupIntentInfo() } /** - * Output only. Read-only. Information about all followup intents that have this intent as - * a direct or indirect parent. We populate this field only in the output. + * Output only. Read-only. Information about all followup intents that have + * this intent as a direct or indirect parent. We populate this field only in + * the output. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param array<\Google\Cloud\Dialogflow\V2\Intent\FollowupIntentInfo>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/Dialogflow/src/V2/Intent/Message/ColumnProperties.php b/Dialogflow/src/V2/Intent/Message/ColumnProperties.php index b9159c880525..7c3bb4881ffb 100644 --- a/Dialogflow/src/V2/Intent/Message/ColumnProperties.php +++ b/Dialogflow/src/V2/Intent/Message/ColumnProperties.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Column properties for [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. + * Column properties for + * [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. * * Generated from protobuf message google.cloud.dialogflow.v2.Intent.Message.ColumnProperties */ diff --git a/Dialogflow/src/V2/Intent/Message/TableCardCell.php b/Dialogflow/src/V2/Intent/Message/TableCardCell.php index 1d428627794a..84a4747ed711 100644 --- a/Dialogflow/src/V2/Intent/Message/TableCardCell.php +++ b/Dialogflow/src/V2/Intent/Message/TableCardCell.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Cell of [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.TableCardRow]. + * Cell of + * [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.TableCardRow]. * * Generated from protobuf message google.cloud.dialogflow.v2.Intent.Message.TableCardCell */ diff --git a/Dialogflow/src/V2/Intent/TrainingPhrase.php b/Dialogflow/src/V2/Intent/TrainingPhrase.php index 10ce3bfef8ea..f2a0dcefcefc 100644 --- a/Dialogflow/src/V2/Intent/TrainingPhrase.php +++ b/Dialogflow/src/V2/Intent/TrainingPhrase.php @@ -35,7 +35,9 @@ class TrainingPhrase extends \Google\Protobuf\Internal\Message * Note: Do not forget to include whitespace at part boundaries, * so the training phrase is well formatted when the parts are concatenated. * If the training phrase does not need to be annotated with parameters, - * you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set. + * you just need a single part with only the + * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] + * field set. * If you want to annotate the training phrase, you must create multiple * parts, where the fields of each part are populated in one of two ways: * - `Part.text` is set to a part of the phrase that has no parameters. @@ -73,7 +75,9 @@ class TrainingPhrase extends \Google\Protobuf\Internal\Message * Note: Do not forget to include whitespace at part boundaries, * so the training phrase is well formatted when the parts are concatenated. * If the training phrase does not need to be annotated with parameters, - * you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set. + * you just need a single part with only the + * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] + * field set. * If you want to annotate the training phrase, you must create multiple * parts, where the fields of each part are populated in one of two ways: * - `Part.text` is set to a part of the phrase that has no parameters. @@ -151,7 +155,9 @@ public function setType($var) * Note: Do not forget to include whitespace at part boundaries, * so the training phrase is well formatted when the parts are concatenated. * If the training phrase does not need to be annotated with parameters, - * you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set. + * you just need a single part with only the + * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] + * field set. * If you want to annotate the training phrase, you must create multiple * parts, where the fields of each part are populated in one of two ways: * - `Part.text` is set to a part of the phrase that has no parameters. @@ -175,7 +181,9 @@ public function getParts() * Note: Do not forget to include whitespace at part boundaries, * so the training phrase is well formatted when the parts are concatenated. * If the training phrase does not need to be annotated with parameters, - * you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set. + * you just need a single part with only the + * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] + * field set. * If you want to annotate the training phrase, you must create multiple * parts, where the fields of each part are populated in one of two ways: * - `Part.text` is set to a part of the phrase that has no parameters. diff --git a/Dialogflow/src/V2/ListAnswerRecordsRequest.php b/Dialogflow/src/V2/ListAnswerRecordsRequest.php index 8fc7987a8394..51c3d31c96f5 100644 --- a/Dialogflow/src/V2/ListAnswerRecordsRequest.php +++ b/Dialogflow/src/V2/ListAnswerRecordsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords]. + * Request message for + * [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListAnswerRecordsRequest */ diff --git a/Dialogflow/src/V2/ListAnswerRecordsResponse.php b/Dialogflow/src/V2/ListAnswerRecordsResponse.php index 5efa86b815f0..2ab6844dcaaf 100644 --- a/Dialogflow/src/V2/ListAnswerRecordsResponse.php +++ b/Dialogflow/src/V2/ListAnswerRecordsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords]. + * Response message for + * [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListAnswerRecordsResponse */ diff --git a/Dialogflow/src/V2/ListContextsRequest.php b/Dialogflow/src/V2/ListContextsRequest.php index ed53b8779bb6..4774c0b4d7c0 100644 --- a/Dialogflow/src/V2/ListContextsRequest.php +++ b/Dialogflow/src/V2/ListContextsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. + * The request message for + * [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListContextsRequest */ diff --git a/Dialogflow/src/V2/ListContextsResponse.php b/Dialogflow/src/V2/ListContextsResponse.php index 6552f641f3de..8c8daccf8c98 100644 --- a/Dialogflow/src/V2/ListContextsResponse.php +++ b/Dialogflow/src/V2/ListContextsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. + * The response message for + * [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListContextsResponse */ diff --git a/Dialogflow/src/V2/ListConversationDatasetsRequest.php b/Dialogflow/src/V2/ListConversationDatasetsRequest.php index 7d1d639b0c7f..a3875ef051d4 100644 --- a/Dialogflow/src/V2/ListConversationDatasetsRequest.php +++ b/Dialogflow/src/V2/ListConversationDatasetsRequest.php @@ -17,8 +17,8 @@ class ListConversationDatasetsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The project and location name to list all conversation datasets for. - * Format: `projects//locations/` + * Required. The project and location name to list all conversation datasets + * for. Format: `projects//locations/` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -44,8 +44,8 @@ class ListConversationDatasetsRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $parent - * Required. The project and location name to list all conversation datasets for. - * Format: `projects//locations/` + * Required. The project and location name to list all conversation datasets + * for. Format: `projects//locations/` * @type int $page_size * Optional. Maximum number of conversation datasets to return in a single * page. By default 100 and at most 1000. @@ -59,8 +59,8 @@ public function __construct($data = NULL) { } /** - * Required. The project and location name to list all conversation datasets for. - * Format: `projects//locations/` + * Required. The project and location name to list all conversation datasets + * for. Format: `projects//locations/` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -71,8 +71,8 @@ public function getParent() } /** - * Required. The project and location name to list all conversation datasets for. - * Format: `projects//locations/` + * Required. The project and location name to list all conversation datasets + * for. Format: `projects//locations/` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/Dialogflow/src/V2/ListConversationProfilesRequest.php b/Dialogflow/src/V2/ListConversationProfilesRequest.php index dba2a0fb9368..b7c905483376 100644 --- a/Dialogflow/src/V2/ListConversationProfilesRequest.php +++ b/Dialogflow/src/V2/ListConversationProfilesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles]. + * The request message for + * [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListConversationProfilesRequest */ diff --git a/Dialogflow/src/V2/ListConversationProfilesResponse.php b/Dialogflow/src/V2/ListConversationProfilesResponse.php index 2b5cf6ea49f3..542726b9b862 100644 --- a/Dialogflow/src/V2/ListConversationProfilesResponse.php +++ b/Dialogflow/src/V2/ListConversationProfilesResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles]. + * The response message for + * [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListConversationProfilesResponse */ diff --git a/Dialogflow/src/V2/ListConversationsRequest.php b/Dialogflow/src/V2/ListConversationsRequest.php index d86372eb385a..ce14ba88b577 100644 --- a/Dialogflow/src/V2/ListConversationsRequest.php +++ b/Dialogflow/src/V2/ListConversationsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Conversations.ListConversations][google.cloud.dialogflow.v2.Conversations.ListConversations]. + * The request message for + * [Conversations.ListConversations][google.cloud.dialogflow.v2.Conversations.ListConversations]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListConversationsRequest */ diff --git a/Dialogflow/src/V2/ListConversationsResponse.php b/Dialogflow/src/V2/ListConversationsResponse.php index bb0e4b7f364e..decf862312a7 100644 --- a/Dialogflow/src/V2/ListConversationsResponse.php +++ b/Dialogflow/src/V2/ListConversationsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Conversations.ListConversations][google.cloud.dialogflow.v2.Conversations.ListConversations]. + * The response message for + * [Conversations.ListConversations][google.cloud.dialogflow.v2.Conversations.ListConversations]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListConversationsResponse */ diff --git a/Dialogflow/src/V2/ListDocumentsRequest.php b/Dialogflow/src/V2/ListDocumentsRequest.php index 5b50bbca260d..ffc58516878e 100644 --- a/Dialogflow/src/V2/ListDocumentsRequest.php +++ b/Dialogflow/src/V2/ListDocumentsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments]. + * Request message for + * [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListDocumentsRequest */ diff --git a/Dialogflow/src/V2/ListDocumentsResponse.php b/Dialogflow/src/V2/ListDocumentsResponse.php index d2e7288beccc..d918df6193b1 100644 --- a/Dialogflow/src/V2/ListDocumentsResponse.php +++ b/Dialogflow/src/V2/ListDocumentsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments]. + * Response message for + * [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListDocumentsResponse */ diff --git a/Dialogflow/src/V2/ListEntityTypesRequest.php b/Dialogflow/src/V2/ListEntityTypesRequest.php index f63305ec5d4c..3de4173406a1 100644 --- a/Dialogflow/src/V2/ListEntityTypesRequest.php +++ b/Dialogflow/src/V2/ListEntityTypesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. + * The request message for + * [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListEntityTypesRequest */ diff --git a/Dialogflow/src/V2/ListEntityTypesResponse.php b/Dialogflow/src/V2/ListEntityTypesResponse.php index 4a16afccfcbf..382e4c12d30d 100644 --- a/Dialogflow/src/V2/ListEntityTypesResponse.php +++ b/Dialogflow/src/V2/ListEntityTypesResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. + * The response message for + * [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListEntityTypesResponse */ diff --git a/Dialogflow/src/V2/ListEnvironmentsRequest.php b/Dialogflow/src/V2/ListEnvironmentsRequest.php index ffaebccd231e..81ac020ad683 100644 --- a/Dialogflow/src/V2/ListEnvironmentsRequest.php +++ b/Dialogflow/src/V2/ListEnvironmentsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. + * The request message for + * [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListEnvironmentsRequest */ @@ -25,8 +26,8 @@ class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -50,8 +51,8 @@ class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message * - `projects//agent` * - `projects//locations//agent` * @type int $page_size - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * @type string $page_token * Optional. The next_page_token value returned from a previous list request. * } @@ -94,8 +95,8 @@ public function setParent($var) } /** - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -106,8 +107,8 @@ public function getPageSize() } /** - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/Dialogflow/src/V2/ListEnvironmentsResponse.php b/Dialogflow/src/V2/ListEnvironmentsResponse.php index 7f89f54054c6..2f8f893ffcec 100644 --- a/Dialogflow/src/V2/ListEnvironmentsResponse.php +++ b/Dialogflow/src/V2/ListEnvironmentsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. + * The response message for + * [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListEnvironmentsResponse */ diff --git a/Dialogflow/src/V2/ListIntentsRequest.php b/Dialogflow/src/V2/ListIntentsRequest.php index 55320d9338c8..bacd4dd6bb84 100644 --- a/Dialogflow/src/V2/ListIntentsRequest.php +++ b/Dialogflow/src/V2/ListIntentsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. + * The request message for + * [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListIntentsRequest */ diff --git a/Dialogflow/src/V2/ListIntentsResponse.php b/Dialogflow/src/V2/ListIntentsResponse.php index 585345ba61cc..df80a0acf944 100644 --- a/Dialogflow/src/V2/ListIntentsResponse.php +++ b/Dialogflow/src/V2/ListIntentsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. + * The response message for + * [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListIntentsResponse */ diff --git a/Dialogflow/src/V2/ListKnowledgeBasesRequest.php b/Dialogflow/src/V2/ListKnowledgeBasesRequest.php index fb86e1a3ca67..0f671bb98286 100644 --- a/Dialogflow/src/V2/ListKnowledgeBasesRequest.php +++ b/Dialogflow/src/V2/ListKnowledgeBasesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases]. + * Request message for + * [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListKnowledgeBasesRequest */ diff --git a/Dialogflow/src/V2/ListKnowledgeBasesResponse.php b/Dialogflow/src/V2/ListKnowledgeBasesResponse.php index 93cbe1e746de..a11f9029f6c6 100644 --- a/Dialogflow/src/V2/ListKnowledgeBasesResponse.php +++ b/Dialogflow/src/V2/ListKnowledgeBasesResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases]. + * Response message for + * [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListKnowledgeBasesResponse */ diff --git a/Dialogflow/src/V2/ListMessagesRequest.php b/Dialogflow/src/V2/ListMessagesRequest.php index c23898ce03e1..96884c2ba940 100644 --- a/Dialogflow/src/V2/ListMessagesRequest.php +++ b/Dialogflow/src/V2/ListMessagesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages]. + * The request message for + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListMessagesRequest */ diff --git a/Dialogflow/src/V2/ListMessagesResponse.php b/Dialogflow/src/V2/ListMessagesResponse.php index 8941be8ff885..f7e8129ad595 100644 --- a/Dialogflow/src/V2/ListMessagesResponse.php +++ b/Dialogflow/src/V2/ListMessagesResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages]. + * The response message for + * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListMessagesResponse */ diff --git a/Dialogflow/src/V2/ListParticipantsRequest.php b/Dialogflow/src/V2/ListParticipantsRequest.php index 4c888a812395..115f941adea5 100644 --- a/Dialogflow/src/V2/ListParticipantsRequest.php +++ b/Dialogflow/src/V2/ListParticipantsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants]. + * The request message for + * [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListParticipantsRequest */ diff --git a/Dialogflow/src/V2/ListParticipantsResponse.php b/Dialogflow/src/V2/ListParticipantsResponse.php index 0832fdd5d2cc..39760542cb14 100644 --- a/Dialogflow/src/V2/ListParticipantsResponse.php +++ b/Dialogflow/src/V2/ListParticipantsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants]. + * The response message for + * [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListParticipantsResponse */ diff --git a/Dialogflow/src/V2/ListSessionEntityTypesRequest.php b/Dialogflow/src/V2/ListSessionEntityTypesRequest.php index 020895634d82..b10c0caf46d2 100644 --- a/Dialogflow/src/V2/ListSessionEntityTypesRequest.php +++ b/Dialogflow/src/V2/ListSessionEntityTypesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. + * The request message for + * [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListSessionEntityTypesRequest */ diff --git a/Dialogflow/src/V2/ListSessionEntityTypesResponse.php b/Dialogflow/src/V2/ListSessionEntityTypesResponse.php index a1b81c49bf9b..549faeb9e2fe 100644 --- a/Dialogflow/src/V2/ListSessionEntityTypesResponse.php +++ b/Dialogflow/src/V2/ListSessionEntityTypesResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. + * The response message for + * [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListSessionEntityTypesResponse */ diff --git a/Dialogflow/src/V2/ListVersionsRequest.php b/Dialogflow/src/V2/ListVersionsRequest.php index cfba3293d04b..c4dce742af93 100644 --- a/Dialogflow/src/V2/ListVersionsRequest.php +++ b/Dialogflow/src/V2/ListVersionsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Versions.ListVersions][google.cloud.dialogflow.v2.Versions.ListVersions]. + * The request message for + * [Versions.ListVersions][google.cloud.dialogflow.v2.Versions.ListVersions]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListVersionsRequest */ @@ -25,8 +26,8 @@ class ListVersionsRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -50,8 +51,8 @@ class ListVersionsRequest extends \Google\Protobuf\Internal\Message * - `projects//agent` * - `projects//locations//agent` * @type int $page_size - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * @type string $page_token * Optional. The next_page_token value returned from a previous list request. * } @@ -94,8 +95,8 @@ public function setParent($var) } /** - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -106,8 +107,8 @@ public function getPageSize() } /** - * Optional. The maximum number of items to return in a single page. By default 100 and - * at most 1000. + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/Dialogflow/src/V2/ListVersionsResponse.php b/Dialogflow/src/V2/ListVersionsResponse.php index e67790756c59..38e366c023b4 100644 --- a/Dialogflow/src/V2/ListVersionsResponse.php +++ b/Dialogflow/src/V2/ListVersionsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Versions.ListVersions][google.cloud.dialogflow.v2.Versions.ListVersions]. + * The response message for + * [Versions.ListVersions][google.cloud.dialogflow.v2.Versions.ListVersions]. * * Generated from protobuf message google.cloud.dialogflow.v2.ListVersionsResponse */ diff --git a/Dialogflow/src/V2/LoggingConfig.php b/Dialogflow/src/V2/LoggingConfig.php index f894e979a19d..8d6a12676cc4 100644 --- a/Dialogflow/src/V2/LoggingConfig.php +++ b/Dialogflow/src/V2/LoggingConfig.php @@ -17,8 +17,8 @@ class LoggingConfig extends \Google\Protobuf\Internal\Message { /** * Whether to log conversation events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] to - * Stackdriver in the conversation project as JSON format + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * to Stackdriver in the conversation project as JSON format * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. * * Generated from protobuf field bool enable_stackdriver_logging = 3; @@ -33,8 +33,8 @@ class LoggingConfig extends \Google\Protobuf\Internal\Message * * @type bool $enable_stackdriver_logging * Whether to log conversation events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] to - * Stackdriver in the conversation project as JSON format + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * to Stackdriver in the conversation project as JSON format * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. * } */ @@ -45,8 +45,8 @@ public function __construct($data = NULL) { /** * Whether to log conversation events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] to - * Stackdriver in the conversation project as JSON format + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * to Stackdriver in the conversation project as JSON format * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. * * Generated from protobuf field bool enable_stackdriver_logging = 3; @@ -59,8 +59,8 @@ public function getEnableStackdriverLogging() /** * Whether to log conversation events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] to - * Stackdriver in the conversation project as JSON format + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * to Stackdriver in the conversation project as JSON format * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. * * Generated from protobuf field bool enable_stackdriver_logging = 3; diff --git a/Dialogflow/src/V2/NotificationConfig.php b/Dialogflow/src/V2/NotificationConfig.php index f4f3eb4dd81f..86890e81b346 100644 --- a/Dialogflow/src/V2/NotificationConfig.php +++ b/Dialogflow/src/V2/NotificationConfig.php @@ -18,8 +18,9 @@ class NotificationConfig extends \Google\Protobuf\Internal\Message /** * Name of the Pub/Sub topic to publish conversation * events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] as - * serialized [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. + * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] + * as serialized + * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. * For telephony integration to receive notification, make sure either this * topic is in the same project as the conversation or you grant * `service-.google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ @@ -39,18 +39,23 @@ class Participant extends \Google\Protobuf\Internal\Message */ private $sip_recording_media_label = ''; /** - * Optional. Obfuscated user id that should be associated with the created participant. + * Optional. Obfuscated user id that should be associated with the created + * participant. * You can specify a user id as follows: * 1. If you set this field in - * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] or + * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] + * or * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], * Dialogflow adds the obfuscated user id with the participant. * 2. If you set this field in - * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] or + * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] + * or * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], - * Dialogflow will update [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. + * Dialogflow will update + * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. * Dialogflow returns an error if you try to add a user id for a - * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] participant. + * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] + * participant. * Dialogflow uses this user id for billing and measurement purposes. For * example, Dialogflow determines whether a user in one conversation returned * in a later conversation. @@ -65,9 +70,10 @@ class Participant extends \Google\Protobuf\Internal\Message */ private $obfuscated_external_user_id = ''; /** - * Optional. Key-value filters on the metadata of documents returned by article - * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * Optional. Key-value filters on the metadata of documents returned by + * article suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple * values for a metadata key should be concatenated by comma. For example, * filters to match all documents that have 'US' or 'CA' in their market * metadata values and 'agent' in their user metadata values will be @@ -97,25 +103,30 @@ class Participant extends \Google\Protobuf\Internal\Message * Format: `projects//locations//conversations//participants/`. * @type int $role - * Immutable. The role this participant plays in the conversation. This field must be set - * during participant creation and is then immutable. + * Immutable. The role this participant plays in the conversation. This field + * must be set during participant creation and is then immutable. * @type string $sip_recording_media_label * Optional. Label applied to streams representing this participant in SIPREC * XML metadata and SDP. This is used to assign transcriptions from that * media stream to this participant. This field can be updated. * @type string $obfuscated_external_user_id - * Optional. Obfuscated user id that should be associated with the created participant. + * Optional. Obfuscated user id that should be associated with the created + * participant. * You can specify a user id as follows: * 1. If you set this field in - * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] or + * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] + * or * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], * Dialogflow adds the obfuscated user id with the participant. * 2. If you set this field in - * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] or + * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] + * or * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], - * Dialogflow will update [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. + * Dialogflow will update + * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. * Dialogflow returns an error if you try to add a user id for a - * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] participant. + * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] + * participant. * Dialogflow uses this user id for billing and measurement purposes. For * example, Dialogflow determines whether a user in one conversation returned * in a later conversation. @@ -126,9 +137,10 @@ class Participant extends \Google\Protobuf\Internal\Message * hash function like SHA-512. * * The length of the user id must be <= 256 characters. * @type array|\Google\Protobuf\Internal\MapField $documents_metadata_filters - * Optional. Key-value filters on the metadata of documents returned by article - * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * Optional. Key-value filters on the metadata of documents returned by + * article suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple * values for a metadata key should be concatenated by comma. For example, * filters to match all documents that have 'US' or 'CA' in their market * metadata values and 'agent' in their user metadata values will be @@ -180,8 +192,8 @@ public function setName($var) } /** - * Immutable. The role this participant plays in the conversation. This field must be set - * during participant creation and is then immutable. + * Immutable. The role this participant plays in the conversation. This field + * must be set during participant creation and is then immutable. * * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; * @return int @@ -192,8 +204,8 @@ public function getRole() } /** - * Immutable. The role this participant plays in the conversation. This field must be set - * during participant creation and is then immutable. + * Immutable. The role this participant plays in the conversation. This field + * must be set during participant creation and is then immutable. * * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; * @param int $var @@ -238,18 +250,23 @@ public function setSipRecordingMediaLabel($var) } /** - * Optional. Obfuscated user id that should be associated with the created participant. + * Optional. Obfuscated user id that should be associated with the created + * participant. * You can specify a user id as follows: * 1. If you set this field in - * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] or + * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] + * or * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], * Dialogflow adds the obfuscated user id with the participant. * 2. If you set this field in - * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] or + * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] + * or * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], - * Dialogflow will update [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. + * Dialogflow will update + * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. * Dialogflow returns an error if you try to add a user id for a - * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] participant. + * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] + * participant. * Dialogflow uses this user id for billing and measurement purposes. For * example, Dialogflow determines whether a user in one conversation returned * in a later conversation. @@ -269,18 +286,23 @@ public function getObfuscatedExternalUserId() } /** - * Optional. Obfuscated user id that should be associated with the created participant. + * Optional. Obfuscated user id that should be associated with the created + * participant. * You can specify a user id as follows: * 1. If you set this field in - * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] or + * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] + * or * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], * Dialogflow adds the obfuscated user id with the participant. * 2. If you set this field in - * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] or + * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] + * or * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], - * Dialogflow will update [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. + * Dialogflow will update + * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. * Dialogflow returns an error if you try to add a user id for a - * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] participant. + * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] + * participant. * Dialogflow uses this user id for billing and measurement purposes. For * example, Dialogflow determines whether a user in one conversation returned * in a later conversation. @@ -304,9 +326,10 @@ public function setObfuscatedExternalUserId($var) } /** - * Optional. Key-value filters on the metadata of documents returned by article - * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * Optional. Key-value filters on the metadata of documents returned by + * article suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple * values for a metadata key should be concatenated by comma. For example, * filters to match all documents that have 'US' or 'CA' in their market * metadata values and 'agent' in their user metadata values will be @@ -330,9 +353,10 @@ public function getDocumentsMetadataFilters() } /** - * Optional. Key-value filters on the metadata of documents returned by article - * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple + * Optional. Key-value filters on the metadata of documents returned by + * article suggestion. If specified, article suggestion only returns suggested + * documents that match all filters in their + * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple * values for a metadata key should be concatenated by comma. For example, * filters to match all documents that have 'US' or 'CA' in their market * metadata values and 'agent' in their user metadata values will be diff --git a/Dialogflow/src/V2/ReloadDocumentRequest.php b/Dialogflow/src/V2/ReloadDocumentRequest.php index 8035682d69fa..29a11b052cc2 100644 --- a/Dialogflow/src/V2/ReloadDocumentRequest.php +++ b/Dialogflow/src/V2/ReloadDocumentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2.Documents.ReloadDocument]. + * Request message for + * [Documents.ReloadDocument][google.cloud.dialogflow.v2.Documents.ReloadDocument]. * * Generated from protobuf message google.cloud.dialogflow.v2.ReloadDocumentRequest */ @@ -31,8 +32,8 @@ class ReloadDocumentRequest extends \Google\Protobuf\Internal\Message */ private $import_gcs_custom_metadata = false; /** - * Optional. When enabled, the reload request is to apply partial update to the smart - * messaging allowlist. + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. * * Generated from protobuf field bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -50,16 +51,16 @@ class ReloadDocumentRequest extends \Google\Protobuf\Internal\Message * Format: `projects//locations//knowledgeBases//documents/` * @type string $content_uri - * Optional. The path of gcs source file for reloading document content. For now, - * only gcs uri is supported. + * Optional. The path of gcs source file for reloading document content. For + * now, only gcs uri is supported. * For documents stored in Google Cloud Storage, these URIs must have * the form `gs:///`. * @type bool $import_gcs_custom_metadata * Optional. Whether to import custom metadata from Google Cloud Storage. * Only valid when the document source is Google Cloud Storage URI. * @type bool $smart_messaging_partial_update - * Optional. When enabled, the reload request is to apply partial update to the smart - * messaging allowlist. + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. * } */ public function __construct($data = NULL) { @@ -98,8 +99,8 @@ public function setName($var) } /** - * Optional. The path of gcs source file for reloading document content. For now, - * only gcs uri is supported. + * Optional. The path of gcs source file for reloading document content. For + * now, only gcs uri is supported. * For documents stored in Google Cloud Storage, these URIs must have * the form `gs:///`. * @@ -117,8 +118,8 @@ public function hasContentUri() } /** - * Optional. The path of gcs source file for reloading document content. For now, - * only gcs uri is supported. + * Optional. The path of gcs source file for reloading document content. For + * now, only gcs uri is supported. * For documents stored in Google Cloud Storage, these URIs must have * the form `gs:///`. * @@ -163,8 +164,8 @@ public function setImportGcsCustomMetadata($var) } /** - * Optional. When enabled, the reload request is to apply partial update to the smart - * messaging allowlist. + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. * * Generated from protobuf field bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return bool @@ -175,8 +176,8 @@ public function getSmartMessagingPartialUpdate() } /** - * Optional. When enabled, the reload request is to apply partial update to the smart - * messaging allowlist. + * Optional. When enabled, the reload request is to apply partial update to + * the smart messaging allowlist. * * Generated from protobuf field bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var diff --git a/Dialogflow/src/V2/RestoreAgentRequest.php b/Dialogflow/src/V2/RestoreAgentRequest.php index 00823e6559ad..62cb2efff027 100644 --- a/Dialogflow/src/V2/RestoreAgentRequest.php +++ b/Dialogflow/src/V2/RestoreAgentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent]. + * The request message for + * [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent]. * * Generated from protobuf message google.cloud.dialogflow.v2.RestoreAgentRequest */ diff --git a/Dialogflow/src/V2/SearchAgentsRequest.php b/Dialogflow/src/V2/SearchAgentsRequest.php index b299dc0d5065..e6008562788e 100644 --- a/Dialogflow/src/V2/SearchAgentsRequest.php +++ b/Dialogflow/src/V2/SearchAgentsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. + * The request message for + * [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. * * Generated from protobuf message google.cloud.dialogflow.v2.SearchAgentsRequest */ diff --git a/Dialogflow/src/V2/SearchAgentsResponse.php b/Dialogflow/src/V2/SearchAgentsResponse.php index 64a61d470bba..763a884a77c6 100644 --- a/Dialogflow/src/V2/SearchAgentsResponse.php +++ b/Dialogflow/src/V2/SearchAgentsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. + * The response message for + * [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. * * Generated from protobuf message google.cloud.dialogflow.v2.SearchAgentsResponse */ diff --git a/Dialogflow/src/V2/SentimentAnalysisResult.php b/Dialogflow/src/V2/SentimentAnalysisResult.php index caabf02d4888..9ba2618f2c27 100644 --- a/Dialogflow/src/V2/SentimentAnalysisResult.php +++ b/Dialogflow/src/V2/SentimentAnalysisResult.php @@ -13,11 +13,14 @@ * and identifies the prevailing subjective opinion, especially to determine a * user's attitude as positive, negative, or neutral. * For [Participants.DetectIntent][], it needs to be configured in - * [DetectIntentRequest.query_params][google.cloud.dialogflow.v2.DetectIntentRequest.query_params]. For - * [Participants.StreamingDetectIntent][], it needs to be configured in + * [DetectIntentRequest.query_params][google.cloud.dialogflow.v2.DetectIntentRequest.query_params]. + * For [Participants.StreamingDetectIntent][], it needs to be configured in * [StreamingDetectIntentRequest.query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. - * And for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent], it needs to be configured in + * And for + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent], + * it needs to be configured in * [ConversationProfile.human_agent_assistant_config][google.cloud.dialogflow.v2.ConversationProfile.human_agent_assistant_config] * * Generated from protobuf message google.cloud.dialogflow.v2.SentimentAnalysisResult diff --git a/Dialogflow/src/V2/SessionEntityType/EntityOverrideMode.php b/Dialogflow/src/V2/SessionEntityType/EntityOverrideMode.php index d4e97367040b..6c47ba21c5a0 100644 --- a/Dialogflow/src/V2/SessionEntityType/EntityOverrideMode.php +++ b/Dialogflow/src/V2/SessionEntityType/EntityOverrideMode.php @@ -33,8 +33,9 @@ class EntityOverrideMode * `GetSessionEntityType`, `CreateSessionEntityType` and * `UpdateSessionEntityType` only return the additional entities added in * this session entity type. If you want to get the supplemented list, - * please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] on the custom entity type - * and merge. + * please call + * [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] + * on the custom entity type and merge. * * Generated from protobuf enum ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; */ diff --git a/Dialogflow/src/V2/SetAgentRequest.php b/Dialogflow/src/V2/SetAgentRequest.php index 4fe12c4f75ef..2508506f3a1c 100644 --- a/Dialogflow/src/V2/SetAgentRequest.php +++ b/Dialogflow/src/V2/SetAgentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent]. + * The request message for + * [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent]. * * Generated from protobuf message google.cloud.dialogflow.v2.SetAgentRequest */ diff --git a/Dialogflow/src/V2/SmartReplyModelMetadata.php b/Dialogflow/src/V2/SmartReplyModelMetadata.php index 5e91a24a6780..5ce7ee4c713a 100644 --- a/Dialogflow/src/V2/SmartReplyModelMetadata.php +++ b/Dialogflow/src/V2/SmartReplyModelMetadata.php @@ -16,7 +16,8 @@ class SmartReplyModelMetadata extends \Google\Protobuf\Internal\Message { /** - * Optional. Type of the smart reply model. If not provided, model_type is used. + * Optional. Type of the smart reply model. If not provided, model_type is + * used. * * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -29,7 +30,8 @@ class SmartReplyModelMetadata extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $training_model_type - * Optional. Type of the smart reply model. If not provided, model_type is used. + * Optional. Type of the smart reply model. If not provided, model_type is + * used. * } */ public function __construct($data = NULL) { @@ -38,7 +40,8 @@ public function __construct($data = NULL) { } /** - * Optional. Type of the smart reply model. If not provided, model_type is used. + * Optional. Type of the smart reply model. If not provided, model_type is + * used. * * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -49,7 +52,8 @@ public function getTrainingModelType() } /** - * Optional. Type of the smart reply model. If not provided, model_type is used. + * Optional. Type of the smart reply model. If not provided, model_type is + * used. * * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/Dialogflow/src/V2/SpeechModelVariant.php b/Dialogflow/src/V2/SpeechModelVariant.php index 088a6b9b9912..ea10fcdb7041 100644 --- a/Dialogflow/src/V2/SpeechModelVariant.php +++ b/Dialogflow/src/V2/SpeechModelVariant.php @@ -7,7 +7,8 @@ use UnexpectedValueException; /** - * Variant of the specified [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + * Variant of the specified [Speech + * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. * See the [Cloud Speech * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) * for which models have different variants. For example, the "phone_call" model @@ -47,8 +48,8 @@ class SpeechModelVariant /** * Use an enhanced model variant: * * If an enhanced variant does not exist for the given - * [model][google.cloud.dialogflow.v2.InputAudioConfig.model] and request language, Dialogflow falls - * back to the standard variant. + * [model][google.cloud.dialogflow.v2.InputAudioConfig.model] and request + * language, Dialogflow falls back to the standard variant. * The [Cloud Speech * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) * describes which models have enhanced variants. diff --git a/Dialogflow/src/V2/SpeechToTextConfig.php b/Dialogflow/src/V2/SpeechToTextConfig.php index c0f55d67b466..3a97157cd7e1 100644 --- a/Dialogflow/src/V2/SpeechToTextConfig.php +++ b/Dialogflow/src/V2/SpeechToTextConfig.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Configures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile]. + * Configures speech transcription for + * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile]. * * Generated from protobuf message google.cloud.dialogflow.v2.SpeechToTextConfig */ @@ -18,11 +19,13 @@ class SpeechToTextConfig extends \Google\Protobuf\Internal\Message /** * The speech model used in speech to text. * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - * `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] and - * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request. - * If enhanced model variant is specified and an enhanced - * version of the specified model for the language does not exist, then it - * would emit an error. + * `USE_ENHANCED`. It can be overridden in + * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] + * and + * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] + * request. If enhanced model variant is specified and an enhanced version of + * the specified model for the language does not exist, then it would emit an + * error. * * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1; */ @@ -49,11 +52,13 @@ class SpeechToTextConfig extends \Google\Protobuf\Internal\Message * @type int $speech_model_variant * The speech model used in speech to text. * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - * `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] and - * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request. - * If enhanced model variant is specified and an enhanced - * version of the specified model for the language does not exist, then it - * would emit an error. + * `USE_ENHANCED`. It can be overridden in + * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] + * and + * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] + * request. If enhanced model variant is specified and an enhanced version of + * the specified model for the language does not exist, then it would emit an + * error. * @type string $model * Which Speech model to select. Select the model best suited to your domain * to get best results. If a model is not explicitly specified, then a default @@ -72,11 +77,13 @@ public function __construct($data = NULL) { /** * The speech model used in speech to text. * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - * `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] and - * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request. - * If enhanced model variant is specified and an enhanced - * version of the specified model for the language does not exist, then it - * would emit an error. + * `USE_ENHANCED`. It can be overridden in + * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] + * and + * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] + * request. If enhanced model variant is specified and an enhanced version of + * the specified model for the language does not exist, then it would emit an + * error. * * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1; * @return int @@ -89,11 +96,13 @@ public function getSpeechModelVariant() /** * The speech model used in speech to text. * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - * `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] and - * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request. - * If enhanced model variant is specified and an enhanced - * version of the specified model for the language does not exist, then it - * would emit an error. + * `USE_ENHANCED`. It can be overridden in + * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] + * and + * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] + * request. If enhanced model variant is specified and an enhanced version of + * the specified model for the language does not exist, then it would emit an + * error. * * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1; * @param int $var diff --git a/Dialogflow/src/V2/StreamingAnalyzeContentRequest.php b/Dialogflow/src/V2/StreamingAnalyzeContentRequest.php index 491e115b9095..f8a3666ad06b 100644 --- a/Dialogflow/src/V2/StreamingAnalyzeContentRequest.php +++ b/Dialogflow/src/V2/StreamingAnalyzeContentRequest.php @@ -10,28 +10,36 @@ /** * The top-level message sent by the client to the - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method. + * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] + * method. * Multiple request messages should be sent in order: * 1. The first message must contain * [participant][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.participant], - * [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] and optionally - * [query_params][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.query_params]. If you want - * to receive an audio response, it should also contain + * [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] + * and optionally + * [query_params][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.query_params]. + * If you want to receive an audio response, it should also contain * [reply_audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.reply_audio_config]. * The message must not contain * [input][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input]. - * 2. If [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in the first message - * was set to [audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.audio_config], + * 2. If + * [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in + * the first message + * was set to + * [audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.audio_config], * all subsequent messages must contain - * [input_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_audio] to continue - * with Speech recognition. - * However, note that: + * [input_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_audio] + * to continue with Speech recognition. However, note that: * * Dialogflow will bill you for the audio so far. * * Dialogflow discards all Speech recognition results in favor of the * text input. - * 3. If [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in the first message was set - * to [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.text_config], then the second message - * must contain only [input_text][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_text]. + * 3. If + * [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] + * in the first message was set + * to + * [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.text_config], + * then the second message must contain only + * [input_text][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_text]. * Moreover, you must not send more than two messages. * After you sent all input, you must half-close or abort the request stream. * diff --git a/Dialogflow/src/V2/StreamingAnalyzeContentResponse.php b/Dialogflow/src/V2/StreamingAnalyzeContentResponse.php index 9c2cdbf559dd..a25d3eed8edb 100644 --- a/Dialogflow/src/V2/StreamingAnalyzeContentResponse.php +++ b/Dialogflow/src/V2/StreamingAnalyzeContentResponse.php @@ -63,7 +63,9 @@ class StreamingAnalyzeContentResponse extends \Google\Protobuf\Internal\Message * Only set if a Dialogflow automated agent has responded. * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] instead. + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] + * instead. * * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 4; */ @@ -76,7 +78,8 @@ class StreamingAnalyzeContentResponse extends \Google\Protobuf\Internal\Message private $message = null; /** * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 7; @@ -84,7 +87,8 @@ class StreamingAnalyzeContentResponse extends \Google\Protobuf\Internal\Message private $human_agent_suggestion_results; /** * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 8; @@ -122,16 +126,20 @@ class StreamingAnalyzeContentResponse extends \Google\Protobuf\Internal\Message * Only set if a Dialogflow automated agent has responded. * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] instead. + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] + * instead. * @type \Google\Cloud\Dialogflow\V2\Message $message * Message analyzed by CCAI. * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $human_agent_suggestion_results * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $end_user_suggestion_results * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. * @type \Google\Cloud\Dialogflow\V2\DtmfParameters $dtmf_parameters * Indicates the parameters of DTMF. @@ -262,7 +270,9 @@ public function setReplyAudio($var) * Only set if a Dialogflow automated agent has responded. * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] instead. + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] + * instead. * * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 4; * @return \Google\Cloud\Dialogflow\V2\AutomatedAgentReply|null @@ -286,7 +296,9 @@ public function clearAutomatedAgentReply() * Only set if a Dialogflow automated agent has responded. * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] instead. + * are always empty, use + * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] + * instead. * * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 4; * @param \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $var @@ -338,7 +350,8 @@ public function setMessage($var) /** * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 7; @@ -351,7 +364,8 @@ public function getHumanAgentSuggestionResults() /** * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 7; @@ -368,7 +382,8 @@ public function setHumanAgentSuggestionResults($var) /** * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 8; @@ -381,7 +396,8 @@ public function getEndUserSuggestionResults() /** * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] + * of * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 8; diff --git a/Dialogflow/src/V2/StreamingDetectIntentRequest.php b/Dialogflow/src/V2/StreamingDetectIntentRequest.php index 4b87c9ffe7cc..5b8d1276fb6d 100644 --- a/Dialogflow/src/V2/StreamingDetectIntentRequest.php +++ b/Dialogflow/src/V2/StreamingDetectIntentRequest.php @@ -10,23 +10,27 @@ /** * The top-level message sent by the client to the - * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent] method. + * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent] + * method. * Multiple request messages should be sent in order: * 1. The first message must contain * [session][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.session], - * [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] plus optionally - * [query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. If the client - * wants to receive an audio response, it should also contain + * [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] + * plus optionally + * [query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. + * If the client wants to receive an audio response, it should also contain * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config]. * The message must not contain * [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio]. - * 2. If [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] was set to - * [query_input.audio_config][google.cloud.dialogflow.v2.InputAudioConfig], all subsequent - * messages must contain - * [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio] to continue with - * Speech recognition. - * If you decide to rather detect an intent from text input after you - * already started Speech recognition, please send a message with + * 2. If + * [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] + * was set to + * [query_input.audio_config][google.cloud.dialogflow.v2.InputAudioConfig], + * all subsequent messages must contain + * [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio] + * to continue with Speech recognition. If you decide to rather detect an + * intent from text input after you already started Speech recognition, + * please send a message with * [query_input.text][google.cloud.dialogflow.v2.QueryInput.text]. * However, note that: * * Dialogflow will bill you for the audio duration so far. @@ -76,14 +80,15 @@ class StreamingDetectIntentRequest extends \Google\Protobuf\Internal\Message */ private $query_input = null; /** - * Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. - * If `false` (default), recognition does not cease until - * the client closes the stream. If `true`, the recognizer will detect a - * single spoken utterance in input audio. Recognition ceases when it detects - * the audio's voice has stopped or paused. In this case, once a detected - * intent is received, the client should close the stream and start a new - * request with a new stream as needed. - * This setting is ignored when `query_input` is a piece of text or an event. + * Please use + * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] + * instead. If `false` (default), recognition does not cease until the client + * closes the stream. If `true`, the recognizer will detect a single spoken + * utterance in input audio. Recognition ceases when it detects the audio's + * voice has stopped or paused. In this case, once a detected intent is + * received, the client should close the stream and start a new request with a + * new stream as needed. This setting is ignored when `query_input` is a piece + * of text or an event. * * Generated from protobuf field bool single_utterance = 4 [deprecated = true]; * @deprecated @@ -98,11 +103,13 @@ class StreamingDetectIntentRequest extends \Google\Protobuf\Internal\Message */ private $output_audio_config = null; /** - * Mask for [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this - * request-level config should override speech synthesizer settings defined at - * agent-level. - * If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level - * config in its entirety. + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. * * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; */ @@ -147,24 +154,27 @@ class StreamingDetectIntentRequest extends \Google\Protobuf\Internal\Message * 2. a conversational query in the form of text, or * 3. an event that specifies which intent to trigger. * @type bool $single_utterance - * Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. - * If `false` (default), recognition does not cease until - * the client closes the stream. If `true`, the recognizer will detect a - * single spoken utterance in input audio. Recognition ceases when it detects - * the audio's voice has stopped or paused. In this case, once a detected - * intent is received, the client should close the stream and start a new - * request with a new stream as needed. - * This setting is ignored when `query_input` is a piece of text or an event. + * Please use + * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] + * instead. If `false` (default), recognition does not cease until the client + * closes the stream. If `true`, the recognizer will detect a single spoken + * utterance in input audio. Recognition ceases when it detects the audio's + * voice has stopped or paused. In this case, once a detected intent is + * received, the client should close the stream and start a new request with a + * new stream as needed. This setting is ignored when `query_input` is a piece + * of text or an event. * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $output_audio_config * Instructs the speech synthesizer how to generate the output * audio. If this field is not set and agent-level speech synthesizer is not * configured, no output audio is generated. * @type \Google\Protobuf\FieldMask $output_audio_config_mask - * Mask for [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this - * request-level config should override speech synthesizer settings defined at - * agent-level. - * If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level - * config in its entirety. + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. * @type string $input_audio * The input audio content to be recognized. Must be sent if * `query_input` was set to a streaming input audio config. The complete audio @@ -311,14 +321,15 @@ public function setQueryInput($var) } /** - * Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. - * If `false` (default), recognition does not cease until - * the client closes the stream. If `true`, the recognizer will detect a - * single spoken utterance in input audio. Recognition ceases when it detects - * the audio's voice has stopped or paused. In this case, once a detected - * intent is received, the client should close the stream and start a new - * request with a new stream as needed. - * This setting is ignored when `query_input` is a piece of text or an event. + * Please use + * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] + * instead. If `false` (default), recognition does not cease until the client + * closes the stream. If `true`, the recognizer will detect a single spoken + * utterance in input audio. Recognition ceases when it detects the audio's + * voice has stopped or paused. In this case, once a detected intent is + * received, the client should close the stream and start a new request with a + * new stream as needed. This setting is ignored when `query_input` is a piece + * of text or an event. * * Generated from protobuf field bool single_utterance = 4 [deprecated = true]; * @return bool @@ -331,14 +342,15 @@ public function getSingleUtterance() } /** - * Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. - * If `false` (default), recognition does not cease until - * the client closes the stream. If `true`, the recognizer will detect a - * single spoken utterance in input audio. Recognition ceases when it detects - * the audio's voice has stopped or paused. In this case, once a detected - * intent is received, the client should close the stream and start a new - * request with a new stream as needed. - * This setting is ignored when `query_input` is a piece of text or an event. + * Please use + * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] + * instead. If `false` (default), recognition does not cease until the client + * closes the stream. If `true`, the recognizer will detect a single spoken + * utterance in input audio. Recognition ceases when it detects the audio's + * voice has stopped or paused. In this case, once a detected intent is + * received, the client should close the stream and start a new request with a + * new stream as needed. This setting is ignored when `query_input` is a piece + * of text or an event. * * Generated from protobuf field bool single_utterance = 4 [deprecated = true]; * @param bool $var @@ -395,11 +407,13 @@ public function setOutputAudioConfig($var) } /** - * Mask for [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this - * request-level config should override speech synthesizer settings defined at - * agent-level. - * If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level - * config in its entirety. + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. * * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; * @return \Google\Protobuf\FieldMask|null @@ -420,11 +434,13 @@ public function clearOutputAudioConfigMask() } /** - * Mask for [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this - * request-level config should override speech synthesizer settings defined at - * agent-level. - * If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level - * config in its entirety. + * Mask for + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * indicating which settings in this request-level config should override + * speech synthesizer settings defined at agent-level. + * If unspecified or empty, + * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] + * replaces the agent-level config in its entirety. * * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; * @param \Google\Protobuf\FieldMask $var diff --git a/Dialogflow/src/V2/StreamingDetectIntentResponse.php b/Dialogflow/src/V2/StreamingDetectIntentResponse.php index 5d1ff0025b27..920c1aa30ac3 100644 --- a/Dialogflow/src/V2/StreamingDetectIntentResponse.php +++ b/Dialogflow/src/V2/StreamingDetectIntentResponse.php @@ -15,8 +15,9 @@ * 1. If the `StreamingDetectIntentRequest.input_audio` field was * set, the `recognition_result` field is populated for one * or more messages. - * See the [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] message for details - * about the result message sequence. + * See the + * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] + * message for details about the result message sequence. * 2. The next message contains `response_id`, `query_result` * and optionally `webhook_status` if a WebHook was called. * diff --git a/Dialogflow/src/V2/StreamingRecognitionResult.php b/Dialogflow/src/V2/StreamingRecognitionResult.php index dea7bff4f53a..ec08bd7ecd55 100644 --- a/Dialogflow/src/V2/StreamingRecognitionResult.php +++ b/Dialogflow/src/V2/StreamingRecognitionResult.php @@ -80,7 +80,8 @@ class StreamingRecognitionResult extends \Google\Protobuf\Internal\Message private $confidence = 0.0; /** * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and + * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. + * Populated if and only if `message_type` = `TRANSCRIPT` and * [InputAudioConfig.enable_word_info] is set. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechWordInfo speech_word_info = 7; @@ -125,7 +126,8 @@ class StreamingRecognitionResult extends \Google\Protobuf\Internal\Message * not rely on it being accurate or even set. * @type array<\Google\Cloud\Dialogflow\V2\SpeechWordInfo>|\Google\Protobuf\Internal\RepeatedField $speech_word_info * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and + * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. + * Populated if and only if `message_type` = `TRANSCRIPT` and * [InputAudioConfig.enable_word_info] is set. * @type \Google\Protobuf\Duration $speech_end_offset * Time offset of the end of this Speech recognition result relative to the @@ -263,7 +265,8 @@ public function setConfidence($var) /** * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and + * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. + * Populated if and only if `message_type` = `TRANSCRIPT` and * [InputAudioConfig.enable_word_info] is set. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechWordInfo speech_word_info = 7; @@ -276,7 +279,8 @@ public function getSpeechWordInfo() /** * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and + * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. + * Populated if and only if `message_type` = `TRANSCRIPT` and * [InputAudioConfig.enable_word_info] is set. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechWordInfo speech_word_info = 7; diff --git a/Dialogflow/src/V2/StreamingRecognitionResult/MessageType.php b/Dialogflow/src/V2/StreamingRecognitionResult/MessageType.php index af043080373b..ed0c8397e758 100644 --- a/Dialogflow/src/V2/StreamingRecognitionResult/MessageType.php +++ b/Dialogflow/src/V2/StreamingRecognitionResult/MessageType.php @@ -28,11 +28,12 @@ class MessageType /** * Event indicates that the server has detected the end of the user's speech * utterance and expects no additional inputs. - * Therefore, the server will not process additional audio (although it may subsequently return additional results). The - * client should stop sending additional audio data, half-close the gRPC - * connection, and wait for any additional results until the server closes - * the gRPC connection. This message is only sent if `single_utterance` was - * set to `true`, and is not used otherwise. + * Therefore, the server will not process additional audio (although it may + * subsequently return additional results). The client should stop sending + * additional audio data, half-close the gRPC connection, and wait for any + * additional results until the server closes the gRPC connection. This + * message is only sent if `single_utterance` was set to `true`, and is not + * used otherwise. * * Generated from protobuf enum END_OF_SINGLE_UTTERANCE = 2; */ diff --git a/Dialogflow/src/V2/SuggestArticlesRequest.php b/Dialogflow/src/V2/SuggestArticlesRequest.php index d3a50cfa3b99..39db27df41ee 100644 --- a/Dialogflow/src/V2/SuggestArticlesRequest.php +++ b/Dialogflow/src/V2/SuggestArticlesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles]. + * The request message for + * [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles]. * * Generated from protobuf message google.cloud.dialogflow.v2.SuggestArticlesRequest */ @@ -34,8 +35,9 @@ class SuggestArticlesRequest extends \Google\Protobuf\Internal\Message private $latest_message = ''; /** * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] to use as context - * when compiling the suggestion. By default 20 and at most 50. + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. * * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -64,8 +66,9 @@ class SuggestArticlesRequest extends \Google\Protobuf\Internal\Message * ID>/conversations//messages/`. * @type int $context_size * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] to use as context - * when compiling the suggestion. By default 20 and at most 50. + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. * @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params * Parameters for a human assist query. * } @@ -139,8 +142,9 @@ public function setLatestMessage($var) /** * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] to use as context - * when compiling the suggestion. By default 20 and at most 50. + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. * * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -152,8 +156,9 @@ public function getContextSize() /** * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] to use as context - * when compiling the suggestion. By default 20 and at most 50. + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] + * to use as context when compiling the suggestion. By default 20 and at + * most 50. * * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/Dialogflow/src/V2/SuggestArticlesResponse.php b/Dialogflow/src/V2/SuggestArticlesResponse.php index b5ead9bf8a20..ce95dc912f06 100644 --- a/Dialogflow/src/V2/SuggestArticlesResponse.php +++ b/Dialogflow/src/V2/SuggestArticlesResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles]. + * The response message for + * [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles]. * * Generated from protobuf message google.cloud.dialogflow.v2.SuggestArticlesResponse */ @@ -32,10 +33,11 @@ class SuggestArticlesResponse extends \Google\Protobuf\Internal\Message private $latest_message = ''; /** * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * * Generated from protobuf field int32 context_size = 3; */ @@ -56,10 +58,11 @@ class SuggestArticlesResponse extends \Google\Protobuf\Internal\Message * ID>/conversations//messages/`. * @type int $context_size * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * } */ public function __construct($data = NULL) { @@ -127,10 +130,11 @@ public function setLatestMessage($var) /** * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * * Generated from protobuf field int32 context_size = 3; * @return int @@ -142,10 +146,11 @@ public function getContextSize() /** * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * * Generated from protobuf field int32 context_size = 3; * @param int $var diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryRequest.php b/Dialogflow/src/V2/SuggestConversationSummaryRequest.php similarity index 98% rename from owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryRequest.php rename to Dialogflow/src/V2/SuggestConversationSummaryRequest.php index 293cf4a2d796..287820721b1f 100644 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryRequest.php +++ b/Dialogflow/src/V2/SuggestConversationSummaryRequest.php @@ -23,7 +23,7 @@ class SuggestConversationSummaryRequest extends \Google\Protobuf\Internal\Messag * * Generated from protobuf field string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $conversation = ''; + private $conversation = ''; /** * The name of the latest conversation message used as context for * compiling suggestion. If empty, the latest message of the conversation will @@ -33,7 +33,7 @@ class SuggestConversationSummaryRequest extends \Google\Protobuf\Internal\Messag * * Generated from protobuf field string latest_message = 3 [(.google.api.resource_reference) = { */ - protected $latest_message = ''; + private $latest_message = ''; /** * Max number of messages prior to and including * [latest_message] to use as context when compiling the @@ -41,7 +41,7 @@ class SuggestConversationSummaryRequest extends \Google\Protobuf\Internal\Messag * * Generated from protobuf field int32 context_size = 4; */ - protected $context_size = 0; + private $context_size = 0; /** * Constructor. diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse.php b/Dialogflow/src/V2/SuggestConversationSummaryResponse.php similarity index 98% rename from owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse.php rename to Dialogflow/src/V2/SuggestConversationSummaryResponse.php index 168c11a1ae16..6cdeda5e13a9 100644 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse.php +++ b/Dialogflow/src/V2/SuggestConversationSummaryResponse.php @@ -21,7 +21,7 @@ class SuggestConversationSummaryResponse extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; */ - protected $summary = null; + private $summary = null; /** * The name of the latest conversation message used as context for * compiling suggestion. @@ -30,7 +30,7 @@ class SuggestConversationSummaryResponse extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { */ - protected $latest_message = ''; + private $latest_message = ''; /** * Number of messages prior to and including * [last_conversation_message][] used to compile the suggestion. It may be @@ -39,7 +39,7 @@ class SuggestConversationSummaryResponse extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field int32 context_size = 3; */ - protected $context_size = 0; + private $context_size = 0; /** * Constructor. diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse/Summary.php b/Dialogflow/src/V2/SuggestConversationSummaryResponse/Summary.php similarity index 94% rename from owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse/Summary.php rename to Dialogflow/src/V2/SuggestConversationSummaryResponse/Summary.php index 8d14399a6a6a..7d226c765c26 100644 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse/Summary.php +++ b/Dialogflow/src/V2/SuggestConversationSummaryResponse/Summary.php @@ -20,7 +20,7 @@ class Summary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string text = 1; */ - protected $text = ''; + private $text = ''; /** * The summary content that is divided into sections. The key is the * section's name and the value is the section's content. There is no @@ -35,7 +35,7 @@ class Summary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { */ - protected $answer_record = ''; + private $answer_record = ''; /** * Constructor. @@ -145,6 +145,4 @@ public function setAnswerRecord($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Summary::class, \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse_Summary::class); diff --git a/Dialogflow/src/V2/SuggestFaqAnswersRequest.php b/Dialogflow/src/V2/SuggestFaqAnswersRequest.php index c67244b00548..51d23d0bc32e 100644 --- a/Dialogflow/src/V2/SuggestFaqAnswersRequest.php +++ b/Dialogflow/src/V2/SuggestFaqAnswersRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers]. + * The request message for + * [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers]. * * Generated from protobuf message google.cloud.dialogflow.v2.SuggestFaqAnswersRequest */ diff --git a/Dialogflow/src/V2/SuggestFaqAnswersResponse.php b/Dialogflow/src/V2/SuggestFaqAnswersResponse.php index eb5b4413fe6b..a3202855e61e 100644 --- a/Dialogflow/src/V2/SuggestFaqAnswersResponse.php +++ b/Dialogflow/src/V2/SuggestFaqAnswersResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers]. + * The request message for + * [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers]. * * Generated from protobuf message google.cloud.dialogflow.v2.SuggestFaqAnswersResponse */ @@ -32,10 +33,11 @@ class SuggestFaqAnswersResponse extends \Google\Protobuf\Internal\Message private $latest_message = ''; /** * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * * Generated from protobuf field int32 context_size = 3; */ @@ -56,10 +58,11 @@ class SuggestFaqAnswersResponse extends \Google\Protobuf\Internal\Message * ID>/conversations//messages/`. * @type int $context_size * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * } */ public function __construct($data = NULL) { @@ -127,10 +130,11 @@ public function setLatestMessage($var) /** * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * * Generated from protobuf field int32 context_size = 3; * @return int @@ -142,10 +146,11 @@ public function getContextSize() /** * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * * Generated from protobuf field int32 context_size = 3; * @param int $var diff --git a/Dialogflow/src/V2/SuggestSmartRepliesRequest.php b/Dialogflow/src/V2/SuggestSmartRepliesRequest.php index 95780fca094c..ce274f3e8d66 100644 --- a/Dialogflow/src/V2/SuggestSmartRepliesRequest.php +++ b/Dialogflow/src/V2/SuggestSmartRepliesRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2.Participants.SuggestSmartReplies]. + * The request message for + * [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2.Participants.SuggestSmartReplies]. * * Generated from protobuf message google.cloud.dialogflow.v2.SuggestSmartRepliesRequest */ diff --git a/Dialogflow/src/V2/SuggestSmartRepliesResponse.php b/Dialogflow/src/V2/SuggestSmartRepliesResponse.php index 3be81121136c..b4f0a63f6789 100644 --- a/Dialogflow/src/V2/SuggestSmartRepliesResponse.php +++ b/Dialogflow/src/V2/SuggestSmartRepliesResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The response message for [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2.Participants.SuggestSmartReplies]. + * The response message for + * [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2.Participants.SuggestSmartReplies]. * * Generated from protobuf message google.cloud.dialogflow.v2.SuggestSmartRepliesResponse */ @@ -34,10 +35,11 @@ class SuggestSmartRepliesResponse extends \Google\Protobuf\Internal\Message private $latest_message = ''; /** * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * * Generated from protobuf field int32 context_size = 3; */ @@ -60,10 +62,11 @@ class SuggestSmartRepliesResponse extends \Google\Protobuf\Internal\Message * ID>/conversations//messages/`. * @type int $context_size * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * } */ public function __construct($data = NULL) { @@ -135,10 +138,11 @@ public function setLatestMessage($var) /** * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * * Generated from protobuf field int32 context_size = 3; * @return int @@ -150,10 +154,11 @@ public function getContextSize() /** * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] to compile the - * suggestion. It may be smaller than the - * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] field in the request if there - * aren't that many messages in the conversation. + * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] + * to compile the suggestion. It may be smaller than the + * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] + * field in the request if there aren't that many messages in the + * conversation. * * Generated from protobuf field int32 context_size = 3; * @param int $var diff --git a/Dialogflow/src/V2/SuggestionResult.php b/Dialogflow/src/V2/SuggestionResult.php index 425cc0e280ed..1adc8b87646b 100644 --- a/Dialogflow/src/V2/SuggestionResult.php +++ b/Dialogflow/src/V2/SuggestionResult.php @@ -10,8 +10,12 @@ /** * One response of different type of suggestion response which is used in - * the response of [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and - * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent], as well as [HumanAgentAssistantEvent][google.cloud.dialogflow.v2.HumanAgentAssistantEvent]. + * the response of + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] + * and + * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent], + * as well as + * [HumanAgentAssistantEvent][google.cloud.dialogflow.v2.HumanAgentAssistantEvent]. * * Generated from protobuf message google.cloud.dialogflow.v2.SuggestionResult */ diff --git a/Dialogflow/src/V2/TextToSpeechSettings.php b/Dialogflow/src/V2/TextToSpeechSettings.php index 3f727ae99cc8..35dd6e12687b 100644 --- a/Dialogflow/src/V2/TextToSpeechSettings.php +++ b/Dialogflow/src/V2/TextToSpeechSettings.php @@ -16,8 +16,8 @@ class TextToSpeechSettings extends \Google\Protobuf\Internal\Message { /** - * Optional. Indicates whether text to speech is enabled. Even when this field is false, - * other settings in this proto are still retained. + * Optional. Indicates whether text to speech is enabled. Even when this field + * is false, other settings in this proto are still retained. * * Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -29,18 +29,18 @@ class TextToSpeechSettings extends \Google\Protobuf\Internal\Message */ private $output_audio_encoding = 0; /** - * Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then - * the synthesizer will use the default sample rate based on the audio - * encoding. If this is different from the voice's natural sample rate, then - * the synthesizer will honor this request by converting to the desired sample - * rate (which might result in worse audio quality). + * Optional. The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). * * Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $sample_rate_hertz = 0; /** - * Optional. Configuration of how speech should be synthesized, mapping from language - * (https://cloud.google.com/dialogflow/docs/reference/language) to + * Optional. Configuration of how speech should be synthesized, mapping from + * language (https://cloud.google.com/dialogflow/docs/reference/language) to * SynthesizeSpeechConfig. * * Generated from protobuf field map synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -54,19 +54,19 @@ class TextToSpeechSettings extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type bool $enable_text_to_speech - * Optional. Indicates whether text to speech is enabled. Even when this field is false, - * other settings in this proto are still retained. + * Optional. Indicates whether text to speech is enabled. Even when this field + * is false, other settings in this proto are still retained. * @type int $output_audio_encoding * Required. Audio encoding of the synthesized audio content. * @type int $sample_rate_hertz - * Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then - * the synthesizer will use the default sample rate based on the audio - * encoding. If this is different from the voice's natural sample rate, then - * the synthesizer will honor this request by converting to the desired sample - * rate (which might result in worse audio quality). + * Optional. The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). * @type array|\Google\Protobuf\Internal\MapField $synthesize_speech_configs - * Optional. Configuration of how speech should be synthesized, mapping from language - * (https://cloud.google.com/dialogflow/docs/reference/language) to + * Optional. Configuration of how speech should be synthesized, mapping from + * language (https://cloud.google.com/dialogflow/docs/reference/language) to * SynthesizeSpeechConfig. * } */ @@ -76,8 +76,8 @@ public function __construct($data = NULL) { } /** - * Optional. Indicates whether text to speech is enabled. Even when this field is false, - * other settings in this proto are still retained. + * Optional. Indicates whether text to speech is enabled. Even when this field + * is false, other settings in this proto are still retained. * * Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return bool @@ -88,8 +88,8 @@ public function getEnableTextToSpeech() } /** - * Optional. Indicates whether text to speech is enabled. Even when this field is false, - * other settings in this proto are still retained. + * Optional. Indicates whether text to speech is enabled. Even when this field + * is false, other settings in this proto are still retained. * * Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var @@ -130,11 +130,11 @@ public function setOutputAudioEncoding($var) } /** - * Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then - * the synthesizer will use the default sample rate based on the audio - * encoding. If this is different from the voice's natural sample rate, then - * the synthesizer will honor this request by converting to the desired sample - * rate (which might result in worse audio quality). + * Optional. The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). * * Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -145,11 +145,11 @@ public function getSampleRateHertz() } /** - * Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then - * the synthesizer will use the default sample rate based on the audio - * encoding. If this is different from the voice's natural sample rate, then - * the synthesizer will honor this request by converting to the desired sample - * rate (which might result in worse audio quality). + * Optional. The synthesis sample rate (in hertz) for this audio. If not + * provided, then the synthesizer will use the default sample rate based on + * the audio encoding. If this is different from the voice's natural sample + * rate, then the synthesizer will honor this request by converting to the + * desired sample rate (which might result in worse audio quality). * * Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var @@ -164,8 +164,8 @@ public function setSampleRateHertz($var) } /** - * Optional. Configuration of how speech should be synthesized, mapping from language - * (https://cloud.google.com/dialogflow/docs/reference/language) to + * Optional. Configuration of how speech should be synthesized, mapping from + * language (https://cloud.google.com/dialogflow/docs/reference/language) to * SynthesizeSpeechConfig. * * Generated from protobuf field map synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -177,8 +177,8 @@ public function getSynthesizeSpeechConfigs() } /** - * Optional. Configuration of how speech should be synthesized, mapping from language - * (https://cloud.google.com/dialogflow/docs/reference/language) to + * Optional. Configuration of how speech should be synthesized, mapping from + * language (https://cloud.google.com/dialogflow/docs/reference/language) to * SynthesizeSpeechConfig. * * Generated from protobuf field map synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/Dialogflow/src/V2/TrainAgentRequest.php b/Dialogflow/src/V2/TrainAgentRequest.php index 670ec72cf52b..80228b54b2f3 100644 --- a/Dialogflow/src/V2/TrainAgentRequest.php +++ b/Dialogflow/src/V2/TrainAgentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent]. + * The request message for + * [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent]. * * Generated from protobuf message google.cloud.dialogflow.v2.TrainAgentRequest */ diff --git a/Dialogflow/src/V2/UndeployConversationModelOperationMetadata.php b/Dialogflow/src/V2/UndeployConversationModelOperationMetadata.php index 0014aa70910f..456ba756db34 100644 --- a/Dialogflow/src/V2/UndeployConversationModelOperationMetadata.php +++ b/Dialogflow/src/V2/UndeployConversationModelOperationMetadata.php @@ -9,7 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Metadata for a [ConversationModels.UndeployConversationModel][google.cloud.dialogflow.v2.ConversationModels.UndeployConversationModel] operation. + * Metadata for a + * [ConversationModels.UndeployConversationModel][google.cloud.dialogflow.v2.ConversationModels.UndeployConversationModel] + * operation. * * Generated from protobuf message google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata */ diff --git a/Dialogflow/src/V2/UpdateAnswerRecordRequest.php b/Dialogflow/src/V2/UpdateAnswerRecordRequest.php index b1610dbe2c30..b55826cec0f8 100644 --- a/Dialogflow/src/V2/UpdateAnswerRecordRequest.php +++ b/Dialogflow/src/V2/UpdateAnswerRecordRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord]. + * Request message for + * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateAnswerRecordRequest */ diff --git a/Dialogflow/src/V2/UpdateContextRequest.php b/Dialogflow/src/V2/UpdateContextRequest.php index 3627f9c8f090..d7a530d07dab 100644 --- a/Dialogflow/src/V2/UpdateContextRequest.php +++ b/Dialogflow/src/V2/UpdateContextRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext]. + * The request message for + * [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateContextRequest */ diff --git a/Dialogflow/src/V2/UpdateConversationProfileRequest.php b/Dialogflow/src/V2/UpdateConversationProfileRequest.php index 5d4dc87aafcc..5612cd760c00 100644 --- a/Dialogflow/src/V2/UpdateConversationProfileRequest.php +++ b/Dialogflow/src/V2/UpdateConversationProfileRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfile]. + * The request message for + * [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfile]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateConversationProfileRequest */ diff --git a/Dialogflow/src/V2/UpdateDocumentRequest.php b/Dialogflow/src/V2/UpdateDocumentRequest.php index d01492a8f0d7..630c34cfee30 100644 --- a/Dialogflow/src/V2/UpdateDocumentRequest.php +++ b/Dialogflow/src/V2/UpdateDocumentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2.Documents.UpdateDocument]. + * Request message for + * [Documents.UpdateDocument][google.cloud.dialogflow.v2.Documents.UpdateDocument]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateDocumentRequest */ diff --git a/Dialogflow/src/V2/UpdateEntityTypeRequest.php b/Dialogflow/src/V2/UpdateEntityTypeRequest.php index 165f3bdb448f..19383b794877 100644 --- a/Dialogflow/src/V2/UpdateEntityTypeRequest.php +++ b/Dialogflow/src/V2/UpdateEntityTypeRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]. + * The request message for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateEntityTypeRequest */ diff --git a/Dialogflow/src/V2/UpdateEnvironmentRequest.php b/Dialogflow/src/V2/UpdateEnvironmentRequest.php index e67018b4ea3b..c90f0ac19bc2 100644 --- a/Dialogflow/src/V2/UpdateEnvironmentRequest.php +++ b/Dialogflow/src/V2/UpdateEnvironmentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Environments.UpdateEnvironment][google.cloud.dialogflow.v2.Environments.UpdateEnvironment]. + * The request message for + * [Environments.UpdateEnvironment][google.cloud.dialogflow.v2.Environments.UpdateEnvironment]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateEnvironmentRequest */ diff --git a/Dialogflow/src/V2/UpdateFulfillmentRequest.php b/Dialogflow/src/V2/UpdateFulfillmentRequest.php index 43c386fbe247..96949c6f6a4a 100644 --- a/Dialogflow/src/V2/UpdateFulfillmentRequest.php +++ b/Dialogflow/src/V2/UpdateFulfillmentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Fulfillments.UpdateFulfillment][google.cloud.dialogflow.v2.Fulfillments.UpdateFulfillment]. + * The request message for + * [Fulfillments.UpdateFulfillment][google.cloud.dialogflow.v2.Fulfillments.UpdateFulfillment]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateFulfillmentRequest */ diff --git a/Dialogflow/src/V2/UpdateIntentRequest.php b/Dialogflow/src/V2/UpdateIntentRequest.php index ed272043f8e6..ad76f3100c87 100644 --- a/Dialogflow/src/V2/UpdateIntentRequest.php +++ b/Dialogflow/src/V2/UpdateIntentRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent]. + * The request message for + * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateIntentRequest */ diff --git a/Dialogflow/src/V2/UpdateKnowledgeBaseRequest.php b/Dialogflow/src/V2/UpdateKnowledgeBaseRequest.php index 1f57201d933d..8bc377604028 100644 --- a/Dialogflow/src/V2/UpdateKnowledgeBaseRequest.php +++ b/Dialogflow/src/V2/UpdateKnowledgeBaseRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.UpdateKnowledgeBase]. + * Request message for + * [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.UpdateKnowledgeBase]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest */ diff --git a/Dialogflow/src/V2/UpdateParticipantRequest.php b/Dialogflow/src/V2/UpdateParticipantRequest.php index 096d0bf3ea66..0f903e9a0662 100644 --- a/Dialogflow/src/V2/UpdateParticipantRequest.php +++ b/Dialogflow/src/V2/UpdateParticipantRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Participants.UpdateParticipant][google.cloud.dialogflow.v2.Participants.UpdateParticipant]. + * The request message for + * [Participants.UpdateParticipant][google.cloud.dialogflow.v2.Participants.UpdateParticipant]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateParticipantRequest */ diff --git a/Dialogflow/src/V2/UpdateSessionEntityTypeRequest.php b/Dialogflow/src/V2/UpdateSessionEntityTypeRequest.php index 9ef45fc0edf8..b2e65adbf2d9 100644 --- a/Dialogflow/src/V2/UpdateSessionEntityTypeRequest.php +++ b/Dialogflow/src/V2/UpdateSessionEntityTypeRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType]. + * The request message for + * [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest */ diff --git a/Dialogflow/src/V2/UpdateVersionRequest.php b/Dialogflow/src/V2/UpdateVersionRequest.php index dfd5390edc71..9b1ab12f6b77 100644 --- a/Dialogflow/src/V2/UpdateVersionRequest.php +++ b/Dialogflow/src/V2/UpdateVersionRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The request message for [Versions.UpdateVersion][google.cloud.dialogflow.v2.Versions.UpdateVersion]. + * The request message for + * [Versions.UpdateVersion][google.cloud.dialogflow.v2.Versions.UpdateVersion]. * * Generated from protobuf message google.cloud.dialogflow.v2.UpdateVersionRequest */ diff --git a/Dialogflow/src/V2/Version.php b/Dialogflow/src/V2/Version.php index 932d5450ad51..0f587eda45ce 100644 --- a/Dialogflow/src/V2/Version.php +++ b/Dialogflow/src/V2/Version.php @@ -45,22 +45,22 @@ class Version extends \Google\Protobuf\Internal\Message */ private $description = ''; /** - * Output only. The sequential number of this version. This field is read-only which means - * it cannot be set by create and update methods. + * Output only. The sequential number of this version. This field is read-only + * which means it cannot be set by create and update methods. * * Generated from protobuf field int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $version_number = 0; /** - * Output only. The creation time of this version. This field is read-only, i.e., it cannot - * be set by create and update methods. + * Output only. The creation time of this version. This field is read-only, + * i.e., it cannot be set by create and update methods. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $create_time = null; /** - * Output only. The status of this version. This field is read-only and cannot be set by - * create and update methods. + * Output only. The status of this version. This field is read-only and cannot + * be set by create and update methods. * * Generated from protobuf field .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -81,14 +81,14 @@ class Version extends \Google\Protobuf\Internal\Message * @type string $description * Optional. The developer-provided description of this version. * @type int $version_number - * Output only. The sequential number of this version. This field is read-only which means - * it cannot be set by create and update methods. + * Output only. The sequential number of this version. This field is read-only + * which means it cannot be set by create and update methods. * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time of this version. This field is read-only, i.e., it cannot - * be set by create and update methods. + * Output only. The creation time of this version. This field is read-only, + * i.e., it cannot be set by create and update methods. * @type int $status - * Output only. The status of this version. This field is read-only and cannot be set by - * create and update methods. + * Output only. The status of this version. This field is read-only and cannot + * be set by create and update methods. * } */ public function __construct($data = NULL) { @@ -157,8 +157,8 @@ public function setDescription($var) } /** - * Output only. The sequential number of this version. This field is read-only which means - * it cannot be set by create and update methods. + * Output only. The sequential number of this version. This field is read-only + * which means it cannot be set by create and update methods. * * Generated from protobuf field int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -169,8 +169,8 @@ public function getVersionNumber() } /** - * Output only. The sequential number of this version. This field is read-only which means - * it cannot be set by create and update methods. + * Output only. The sequential number of this version. This field is read-only + * which means it cannot be set by create and update methods. * * Generated from protobuf field int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var @@ -185,8 +185,8 @@ public function setVersionNumber($var) } /** - * Output only. The creation time of this version. This field is read-only, i.e., it cannot - * be set by create and update methods. + * Output only. The creation time of this version. This field is read-only, + * i.e., it cannot be set by create and update methods. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null @@ -207,8 +207,8 @@ public function clearCreateTime() } /** - * Output only. The creation time of this version. This field is read-only, i.e., it cannot - * be set by create and update methods. + * Output only. The creation time of this version. This field is read-only, + * i.e., it cannot be set by create and update methods. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var @@ -223,8 +223,8 @@ public function setCreateTime($var) } /** - * Output only. The status of this version. This field is read-only and cannot be set by - * create and update methods. + * Output only. The status of this version. This field is read-only and cannot + * be set by create and update methods. * * Generated from protobuf field .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -235,8 +235,8 @@ public function getStatus() } /** - * Output only. The status of this version. This field is read-only and cannot be set by - * create and update methods. + * Output only. The status of this version. This field is read-only and cannot + * be set by create and update methods. * * Generated from protobuf field .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var diff --git a/Dialogflow/src/V2/VoiceSelectionParams.php b/Dialogflow/src/V2/VoiceSelectionParams.php index 3d313ddc82c0..285b6ea90dee 100644 --- a/Dialogflow/src/V2/VoiceSelectionParams.php +++ b/Dialogflow/src/V2/VoiceSelectionParams.php @@ -26,9 +26,10 @@ class VoiceSelectionParams extends \Google\Protobuf\Internal\Message /** * Optional. The preferred gender of the voice. If not set, the service will * choose a voice based on the other parameters such as language_code and - * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a - * voice of the appropriate gender is not available, the synthesizer should - * substitute a voice with a different gender rather than failing the request. + * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer should substitute a voice with a + * different gender rather than failing the request. * * Generated from protobuf field .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2; */ @@ -47,9 +48,10 @@ class VoiceSelectionParams extends \Google\Protobuf\Internal\Message * @type int $ssml_gender * Optional. The preferred gender of the voice. If not set, the service will * choose a voice based on the other parameters such as language_code and - * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a - * voice of the appropriate gender is not available, the synthesizer should - * substitute a voice with a different gender rather than failing the request. + * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer should substitute a voice with a + * different gender rather than failing the request. * } */ public function __construct($data = NULL) { @@ -90,9 +92,10 @@ public function setName($var) /** * Optional. The preferred gender of the voice. If not set, the service will * choose a voice based on the other parameters such as language_code and - * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a - * voice of the appropriate gender is not available, the synthesizer should - * substitute a voice with a different gender rather than failing the request. + * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer should substitute a voice with a + * different gender rather than failing the request. * * Generated from protobuf field .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2; * @return int @@ -105,9 +108,10 @@ public function getSsmlGender() /** * Optional. The preferred gender of the voice. If not set, the service will * choose a voice based on the other parameters such as language_code and - * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a - * voice of the appropriate gender is not available, the synthesizer should - * substitute a voice with a different gender rather than failing the request. + * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer should substitute a voice with a + * different gender rather than failing the request. * * Generated from protobuf field .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2; * @param int $var diff --git a/Dialogflow/src/V2/WebhookResponse.php b/Dialogflow/src/V2/WebhookResponse.php index 8d91e32b357f..42eb5b59a2aa 100644 --- a/Dialogflow/src/V2/WebhookResponse.php +++ b/Dialogflow/src/V2/WebhookResponse.php @@ -11,9 +11,10 @@ /** * The response message for a webhook call. * This response is validated by the Dialogflow server. If validation fails, - * an error will be returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow.v2.QueryResult.diagnostic_info] field. - * Setting JSON fields to an empty value with the wrong type is a common error. - * To avoid this error: + * an error will be returned in the + * [QueryResult.diagnostic_info][google.cloud.dialogflow.v2.QueryResult.diagnostic_info] + * field. Setting JSON fields to an empty value with the wrong type is a common + * error. To avoid this error: * - Use `""` for empty strings * - Use `{}` or `null` for empty objects * - Use `[]` or `null` for empty arrays @@ -29,7 +30,8 @@ class WebhookResponse extends \Google\Protobuf\Internal\Message * Optional. The text response message intended for the end-user. * It is recommended to use `fulfillment_messages.text.text[0]` instead. * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller. + * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] + * sent to the integration or API caller. * * Generated from protobuf field string fulfillment_text = 1; */ @@ -37,7 +39,8 @@ class WebhookResponse extends \Google\Protobuf\Internal\Message /** * Optional. The rich response messages intended for the end-user. * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller. + * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] + * sent to the integration or API caller. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; */ @@ -46,17 +49,18 @@ class WebhookResponse extends \Google\Protobuf\Internal\Message * Optional. A custom field used to identify the webhook source. * Arbitrary strings are supported. * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller. + * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] + * sent to the integration or API caller. * * Generated from protobuf field string source = 3; */ private $source = ''; /** - * Optional. This field can be used to pass custom data from your webhook to the - * integration or API caller. Arbitrary JSON objects are supported. - * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. - * This field is also used by the + * Optional. This field can be used to pass custom data from your webhook to + * the integration or API caller. Arbitrary JSON objects are supported. When + * provided, Dialogflow uses this field to populate + * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] + * sent to the integration or API caller. This field is also used by the * [Google Assistant * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) * for rich response messages. @@ -70,7 +74,8 @@ class WebhookResponse extends \Google\Protobuf\Internal\Message * Optional. The collection of output contexts that will overwrite currently * active contexts for the session and reset their lifespans. * When provided, Dialogflow uses this field to populate - * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller. + * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] + * sent to the integration or API caller. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; */ @@ -88,7 +93,9 @@ class WebhookResponse extends \Google\Protobuf\Internal\Message * entity types with. The entity synonyms apply to all languages and persist * for the session. Setting this data from a webhook overwrites * the session entity types that have been set using `detectIntent`, - * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods. + * `streamingDetectIntent` or + * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] + * management methods. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; */ @@ -104,22 +111,25 @@ class WebhookResponse extends \Google\Protobuf\Internal\Message * Optional. The text response message intended for the end-user. * It is recommended to use `fulfillment_messages.text.text[0]` instead. * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller. + * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] + * sent to the integration or API caller. * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $fulfillment_messages * Optional. The rich response messages intended for the end-user. * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller. + * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] + * sent to the integration or API caller. * @type string $source * Optional. A custom field used to identify the webhook source. * Arbitrary strings are supported. * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller. + * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] + * sent to the integration or API caller. * @type \Google\Protobuf\Struct $payload - * Optional. This field can be used to pass custom data from your webhook to the - * integration or API caller. Arbitrary JSON objects are supported. - * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. - * This field is also used by the + * Optional. This field can be used to pass custom data from your webhook to + * the integration or API caller. Arbitrary JSON objects are supported. When + * provided, Dialogflow uses this field to populate + * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] + * sent to the integration or API caller. This field is also used by the * [Google Assistant * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) * for rich response messages. @@ -129,7 +139,8 @@ class WebhookResponse extends \Google\Protobuf\Internal\Message * Optional. The collection of output contexts that will overwrite currently * active contexts for the session and reset their lifespans. * When provided, Dialogflow uses this field to populate - * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller. + * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] + * sent to the integration or API caller. * @type \Google\Cloud\Dialogflow\V2\EventInput $followup_event_input * Optional. Invokes the supplied events. * When this field is set, Dialogflow ignores the `fulfillment_text`, @@ -139,7 +150,9 @@ class WebhookResponse extends \Google\Protobuf\Internal\Message * entity types with. The entity synonyms apply to all languages and persist * for the session. Setting this data from a webhook overwrites * the session entity types that have been set using `detectIntent`, - * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods. + * `streamingDetectIntent` or + * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] + * management methods. * } */ public function __construct($data = NULL) { @@ -151,7 +164,8 @@ public function __construct($data = NULL) { * Optional. The text response message intended for the end-user. * It is recommended to use `fulfillment_messages.text.text[0]` instead. * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller. + * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] + * sent to the integration or API caller. * * Generated from protobuf field string fulfillment_text = 1; * @return string @@ -165,7 +179,8 @@ public function getFulfillmentText() * Optional. The text response message intended for the end-user. * It is recommended to use `fulfillment_messages.text.text[0]` instead. * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller. + * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] + * sent to the integration or API caller. * * Generated from protobuf field string fulfillment_text = 1; * @param string $var @@ -182,7 +197,8 @@ public function setFulfillmentText($var) /** * Optional. The rich response messages intended for the end-user. * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller. + * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] + * sent to the integration or API caller. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; * @return \Google\Protobuf\Internal\RepeatedField @@ -195,7 +211,8 @@ public function getFulfillmentMessages() /** * Optional. The rich response messages intended for the end-user. * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller. + * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] + * sent to the integration or API caller. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $var @@ -213,7 +230,8 @@ public function setFulfillmentMessages($var) * Optional. A custom field used to identify the webhook source. * Arbitrary strings are supported. * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller. + * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] + * sent to the integration or API caller. * * Generated from protobuf field string source = 3; * @return string @@ -227,7 +245,8 @@ public function getSource() * Optional. A custom field used to identify the webhook source. * Arbitrary strings are supported. * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller. + * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] + * sent to the integration or API caller. * * Generated from protobuf field string source = 3; * @param string $var @@ -242,11 +261,11 @@ public function setSource($var) } /** - * Optional. This field can be used to pass custom data from your webhook to the - * integration or API caller. Arbitrary JSON objects are supported. - * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. - * This field is also used by the + * Optional. This field can be used to pass custom data from your webhook to + * the integration or API caller. Arbitrary JSON objects are supported. When + * provided, Dialogflow uses this field to populate + * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] + * sent to the integration or API caller. This field is also used by the * [Google Assistant * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) * for rich response messages. @@ -272,11 +291,11 @@ public function clearPayload() } /** - * Optional. This field can be used to pass custom data from your webhook to the - * integration or API caller. Arbitrary JSON objects are supported. - * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. - * This field is also used by the + * Optional. This field can be used to pass custom data from your webhook to + * the integration or API caller. Arbitrary JSON objects are supported. When + * provided, Dialogflow uses this field to populate + * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] + * sent to the integration or API caller. This field is also used by the * [Google Assistant * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) * for rich response messages. @@ -299,7 +318,8 @@ public function setPayload($var) * Optional. The collection of output contexts that will overwrite currently * active contexts for the session and reset their lifespans. * When provided, Dialogflow uses this field to populate - * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller. + * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] + * sent to the integration or API caller. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; * @return \Google\Protobuf\Internal\RepeatedField @@ -313,7 +333,8 @@ public function getOutputContexts() * Optional. The collection of output contexts that will overwrite currently * active contexts for the session and reset their lifespans. * When provided, Dialogflow uses this field to populate - * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller. + * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] + * sent to the integration or API caller. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var @@ -372,7 +393,9 @@ public function setFollowupEventInput($var) * entity types with. The entity synonyms apply to all languages and persist * for the session. Setting this data from a webhook overwrites * the session entity types that have been set using `detectIntent`, - * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods. + * `streamingDetectIntent` or + * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] + * management methods. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; * @return \Google\Protobuf\Internal\RepeatedField @@ -387,7 +410,9 @@ public function getSessionEntityTypes() * entity types with. The entity synonyms apply to all languages and persist * for the session. Setting this data from a webhook overwrites * the session entity types that have been set using `detectIntent`, - * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods. + * `streamingDetectIntent` or + * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] + * management methods. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; * @param array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/Dialogflow/src/V2/gapic_metadata.json b/Dialogflow/src/V2/gapic_metadata.json index d45db367d9e8..3856eb92dc9e 100644 --- a/Dialogflow/src/V2/gapic_metadata.json +++ b/Dialogflow/src/V2/gapic_metadata.json @@ -437,6 +437,11 @@ "listMessages" ] }, + "SuggestConversationSummary": { + "methods": [ + "suggestConversationSummary" + ] + }, "GetLocation": { "methods": [ "getLocation" diff --git a/Dialogflow/src/V2/resources/conversations_client_config.json b/Dialogflow/src/V2/resources/conversations_client_config.json index 9083b58155aa..47e5785bc38a 100644 --- a/Dialogflow/src/V2/resources/conversations_client_config.json +++ b/Dialogflow/src/V2/resources/conversations_client_config.json @@ -53,6 +53,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "SuggestConversationSummary": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetLocation": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", diff --git a/Dialogflow/src/V2/resources/conversations_rest_client_config.php b/Dialogflow/src/V2/resources/conversations_rest_client_config.php index 82ac0be7a0c6..4aab11384239 100644 --- a/Dialogflow/src/V2/resources/conversations_rest_client_config.php +++ b/Dialogflow/src/V2/resources/conversations_rest_client_config.php @@ -92,6 +92,25 @@ ], ], ], + 'SuggestConversationSummary' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{conversation=projects/*/conversations/*}/suggestions:suggestConversationSummary', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:suggestConversationSummary', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'conversation' => [ + 'getters' => [ + 'getConversation', + ], + ], + ], + ], ], 'google.cloud.location.Locations' => [ 'GetLocation' => [ diff --git a/Dialogflow/tests/Unit/V2/ConversationModelsClientTest.php b/Dialogflow/tests/Unit/V2/ConversationModelsClientTest.php index 2e2c44673916..808b106374e9 100644 --- a/Dialogflow/tests/Unit/V2/ConversationModelsClientTest.php +++ b/Dialogflow/tests/Unit/V2/ConversationModelsClientTest.php @@ -223,9 +223,11 @@ public function createConversationModelEvaluationTest() $transport->addResponse($incompleteOperation); $name = 'name3373707'; $displayName = 'displayName1615086568'; + $rawHumanEvalTemplateCsv = 'rawHumanEvalTemplateCsv-1393080869'; $expectedResponse = new ConversationModelEvaluation(); $expectedResponse->setName($name); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRawHumanEvalTemplateCsv($rawHumanEvalTemplateCsv); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -634,9 +636,11 @@ public function getConversationModelEvaluationTest() // Mock response $name2 = 'name2-1052831874'; $displayName = 'displayName1615086568'; + $rawHumanEvalTemplateCsv = 'rawHumanEvalTemplateCsv-1393080869'; $expectedResponse = new ConversationModelEvaluation(); $expectedResponse->setName($name2); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRawHumanEvalTemplateCsv($rawHumanEvalTemplateCsv); $transport->addResponse($expectedResponse); // Mock request $name = 'name3373707'; diff --git a/Dialogflow/tests/Unit/V2/ConversationsClientTest.php b/Dialogflow/tests/Unit/V2/ConversationsClientTest.php index ca810871dcac..349e379e9fc5 100644 --- a/Dialogflow/tests/Unit/V2/ConversationsClientTest.php +++ b/Dialogflow/tests/Unit/V2/ConversationsClientTest.php @@ -31,6 +31,7 @@ use Google\Cloud\Dialogflow\V2\ListConversationsResponse; use Google\Cloud\Dialogflow\V2\ListMessagesResponse; use Google\Cloud\Dialogflow\V2\Message; +use Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse; use Google\Cloud\Location\ListLocationsResponse; use Google\Cloud\Location\Location; use Google\Rpc\Code; @@ -394,6 +395,68 @@ public function listMessagesExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function suggestConversationSummaryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $latestMessage2 = 'latestMessage2-440913086'; + $contextSize2 = 397491196; + $expectedResponse = new SuggestConversationSummaryResponse(); + $expectedResponse->setLatestMessage($latestMessage2); + $expectedResponse->setContextSize($contextSize2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedConversation = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); + $response = $gapicClient->suggestConversationSummary($formattedConversation); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.v2.Conversations/SuggestConversationSummary', $actualFuncCall); + $actualValue = $actualRequestObject->getConversation(); + $this->assertProtobufEquals($formattedConversation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function suggestConversationSummaryExceptionTest() + { + $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 + $formattedConversation = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); + try { + $gapicClient->suggestConversationSummary($formattedConversation); + // 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 getLocationTest() { diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Agent.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Agent.php deleted file mode 100644 index 3f823d547bb2f2f155379f406c07c2d243b8b16e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5807 zcmb_gNpssq7B(nLv7c;9Zh4{UEHG@x@**&1mYL9Tra+OBn9{i39`? z0F<}#9HwS|K`u!ysY=aUa-7Rl%}>ZFmAR$nkV8&$n^RIr4td>J2+j9OT^lZo%haTf=Fyhecqn>ZD%y_aSxw6j8~t{hI%3o6*}6d;Srm&K;`&BS zEEUVOOQ`BveWywDV#l&N2F*4NtKZ7Dbj`3jZNs{s-N|LO4mCZQn*=bm9(8T4NyX(# zVU2oPOY^k)GS{vzGVOXX(ynji?f^6m&2>eES%JqO;y=6JF!ZMAdYXs-UC~`tH+2uy z^hX%OU9qhhE=A3!W!rtT>FJg!GKCGZN$0PNzD*{3#kMf!yJF~1g{1*gP%oPvbxh5u z7pdEHblbC>3X10Q9qL8NV_)X42ir1pdRv_Leaz>da`LX|Iei-6T@)Sa^&RsL_nR4b z68)+tWJ|I2x?-9Z%YtRP`TQWJfr-5o7Y!Zrc`%(Nof@qI?P@!^RVW0#0y4?_WH&F++VfKj?*_y-R#siYzFp&r7S`M)}hq1y@%t6AF1;6t!eH@$+{eT z3vcTI)Ra~$Le>)Y-h6}whKy_Q_p9*ocuhw#zMRaPQyw&@ypzkE4{T_*j?K$3;dg50 zrPxB76<%!wl@A0i!~~q6yunf~SW04pov4N?YGDxroy&oaF{o75iYgTdT?~XcnP6jP zDXT@W7;;dw=)2v+jQbMOKc0h0&Ld zIkLYirpT3%3A0$y4{6gQ7vMxocWpy^s4`khr?{yJG({vh+oEj^!&42-?DWx$+O%3U zJu#5E3Td}*+m?gGyIaal9~CFiD>NmLb8y_#dsKa7nKV5)P*1~jD_|qUa(XIU5y*J} zZ3k)9QTvXber~XE5l&H4YZz2TdhTE^q>tg^F@K*WfS%?xyK0a5c^nr`bT7PQ+&T$`|pRW zx8>{jcHV@eo=%I39UVGH`B9sV%OkYa7Lq`tJH>rLFk35^szV!`hLim3W=&ZyDplt89L(@f zrS)2=TB(*dOSr-FaAxSET3LN}b9N$=Iws_M|5HAMmtxE@)DeDDrLpr^W4PJJ!LKL& z@FxoiD~9F61Es^Cfw=Sz%q&xn8?Dlh`_%QwABGyXevNnRC9>f-5%2Q}$;76IVjJ?kTC`ox7`JF|Op*T$m_X=4iTkNco~bN)H&z9*#YhE*>f;*8%0D+jG122{JPm7w5xf z#yb5(3W%Q+A?-btx`KJKWF-|3N$iWFGTsbBf26ir#k2ss3 z>BBnQ*sl&Zo}~`|72rgiJ4rV5BFXExWa#!Q<16^&Bk8<6+vG|zZUSKCT|Q5?bL5p| zxulZ#Is=&fDgX>{8qtI3@kb~s+Z*a&CAzaiaDmQ8Anf!;Gj|9?C?B+P8` z#wcJVD1^Bfc{?0F8A$$UGKriVZIGGl;5`DlF73cILO zgzdNez77bDJ#2KW_|q*qhR2b?4tC>C{Ewdm;mcI2xb#&jv&^4w^A;MR%Qc({t~YWch(fXg0BQ@A=NT=X~dJ z_0b(`+ky+y3NeVSxTGP~pGfXDku2MEP1V$;dZ*bWwxpVEOVf#+kfhu_sdR5c%IAt3 z=TX!#JGM&FQp+@3I!UU!*=ZyjnxdPnrf%*fcT-8laQ28@vx#cjjRb=RFqAfNEJY>K zN;z|vxJpBDmFfyZsb(okH5Z^%w^GXhs;)SWBr~)M1A}KE;h)v1>zXP#uHxdqi<(o@ z49!Jp?I|AVmef>qhakY<-e$*8UClHkDsazG$>J4>W754BEfZaEOY+SsQ?H;$szt*k zwxQ_N9C1`zvs}|II@dLu)&m0iuW4<}k79&Zk8 zs~ZPzw_grevSY?1xwmvcFr0fgwszhPOR*$5=6aJ9D72y3)bhr~SFirwXYO?2i*U=T95!H2)&%9szUg_kp z_})7)H*a6e50TJKmFIu*ng8<*Fqz{p!4c!n1(;t$AB634D&$cI$u8c82@EtImq#Fz zKh8`cM{u9Kr0PMYM?hu28 zBFYxxyRb0CM#sXMN5qd|y2nWl8asxpSR5I|P)k9*GX{C=)1z6a$uuYM$ zdwlQY;6#sN=A=XD7tb}`l{g!n0(>ra*jHg8R@^`&8Iq?Vqn@r_1%=Ec2{@Vo1$wU1lDsVF38b(&Zxy6fZ=I~zkLS7*r63;#j zPB%=o)24MXL?p(@=~Uq@)Z{$4kY~B77Mu!Hk!BMcIx*BIEdJA}{QuCD55TyhHq1Gl zc3ZKvr>sPFDa#A}>Raeq4+Hu{X6j;J2ykZTG9@+k8QbN2r2T9%HHy?pm~=Yzw&n@& zJ~v9>G)(c6KB>7_%a|{t@lRmJuUuZNMG4-KOY8UZm0Bf_l$J}`d>^T&0g6a_wzz?u zo`U1SQzU*LP7R5xcoFcLklnnSF9qqqvZgm*PC&F+>SoI%9P=L{@dqIKz}+y47vNlg zn=cfK*?5h8FgAM?0Gmx*LbFR zrRT~>iqL6P_qqe+01g4zkf5nN@=5&n1TiTaj`*hl zvjfdgyg3SgV7u4BVjmt-ig(=j&gZ}W{$-?E6)(}d-ZMTT+zKX>t9{eQ!yDoU!#5`V zdBsWg3%!)R(L?+(0^(p37Dw7XxZgkWfv1A_&jLHFrvz|x9zthsWG<4*?vF+-9 zx_35sSWewJ07}RoZ$f-2FZ5Wn6q+JpkAIODUOR)nkRNQjuH~eY$-TWjj{?Dfs&w3K zey6{NJ=JZRc6;ef+qKEdXx8<&II*b={khpz0ey{@yJ L{93&a`vCs|Jr2>( diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/AudioConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/AudioConfig.php deleted file mode 100644 index 2f8a26e8eacf53a19ef221afa86d54788f95aa06..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3565 zcmb7HPjlNu6h}_eHZQR&)IYc>w5lmX8mJA1=^>>pvZXj4Y|CTI33M`}k)^dQkhMaR z1ErIXz=i3J8%M5u6Aqj?GkgGMxbSvmD~aP8$R*m{_xJaH?|Ju=r@<(Ix8)k~Nod8y zk^9f(ctqqNq%pOrC-*0V0SRTBjsw>tVNsSA?9dHj8n#h%XJ<&_ z6iK$Tb${xXnR5s7RubdR&bc5T%W*g%r@hN^Na9K8KjLvS1IOvt;R4K*z&+e`iRVq=Cs+OE-8p(N~1levth&@8C z#pK&qx&oJiQD{XZ$_w(!)|!-s)jp+BoX^O@R;KWS0J%itfQC-pA5dunE_{RE`4tpc zlS;6G^$%l{4h9j4(TcFOUcOnJ#y<C@SYJ2Q{u6%zM$^s~h+<-P!kZ!{3ku?rHVzRMejz}1P$8lJd zu0z(d{NcnJ66|@0Ota5}NPMf08VnL_(E-h8F~-YM9yStS%@MLB!pITbN+vHz6}S@d z8nEHPiV)@3@o;^4q-V>9RT^UyUj7m~Taz@%@}+rXg|6ktdBE*lxwtI##9)(I*-x}E zW-&tGFq=t?!@y#QU*_3tL&0$)o~TdFY4{Ck8M$RtMuz2=x~VF1_mscVxi@dzJ8 zZ7a0K5#tS;kGw2v(xV@UDA zam=cPFy;d{zcCRa5lDR-`*{Yq3nixYg~K8OWaLJPAo}Xbr8sr?2f)vay^f|KpR=&W*SmU;(Kub!_cf&MOt)MA9JxBv z?P~j4OT3h>wR&yO5HF|7Eo?E7T~-p)&$Ny%0$vp^a!-o5o_<%vjr6-JX47v~%%$qc z&5n2_b=KBOKW8>;{NYgK4~OE(!=boe{zK`(Eo&0fu{RA5twu$Rw!~XkdWgSV zU$URD(u?WWamk}LztZB~?DM$9XDIIQ|HpqQeYlfM*Lk~beogF>SbF+jZ6_BXRAEtY mbrY|M$Nh_FAf_L^o8FS&PaX=V-W9KWQ*g=T=6?*w0RI57{6850 diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Context.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Context.php deleted file mode 100644 index 12791ba0816e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Context.php +++ /dev/null @@ -1,70 +0,0 @@ -internalAddGeneratedFile( - ' -" -(google/cloud/dialogflow/v2/context.protogoogle.cloud.dialogflow.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/struct.proto" -Context -name ( BàA -lifespan_count (BàA0 - -parameters ( 2.google.protobuf.StructBàA:¡êA -!dialogflow.googleapis.com/Context>projects/{project}/agent/sessions/{session}/contexts/{context}fprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}Sprojects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}{projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}" -ListContextsRequest9 -parent ( B)àAúA#!dialogflow.googleapis.com/Context - page_size (BàA - -page_token ( BàA"f -ListContextsResponse5 -contexts ( 2#.google.cloud.dialogflow.v2.Context -next_page_token ( "L -GetContextRequest7 -name ( B)àAúA# -!dialogflow.googleapis.com/Context"Œ -CreateContextRequest9 -parent ( B)àAúA#!dialogflow.googleapis.com/Context9 -context ( 2#.google.cloud.dialogflow.v2.ContextBàA"‡ -UpdateContextRequest9 -context ( 2#.google.cloud.dialogflow.v2.ContextBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"O -DeleteContextRequest7 -name ( B)àAúA# -!dialogflow.googleapis.com/Context"U -DeleteAllContextsRequest9 -parent ( B)àAúA#!dialogflow.googleapis.com/Context2è -Contextsœ - ListContexts/.google.cloud.dialogflow.v2.ListContextsRequest0.google.cloud.dialogflow.v2.ListContextsResponse"¨‚Ó䓘1/v2/{parent=projects/*/agent/sessions/*}/contextsZJH/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZ?=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contextsZVT/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contextsÚAparent‰ - -GetContext-.google.cloud.dialogflow.v2.GetContextRequest#.google.cloud.dialogflow.v2.Context"¦‚Ó䓘1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJH/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}Z?=/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}ZVT/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}ÚAname½ - CreateContext0.google.cloud.dialogflow.v2.CreateContextRequest#.google.cloud.dialogflow.v2.Context"Ô‚Ó䓼"1/v2/{parent=projects/*/agent/sessions/*}/contexts:contextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:contextZH"=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts:contextZ_"T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts:contextÚAparent,contextâ - UpdateContext0.google.cloud.dialogflow.v2.UpdateContextRequest#.google.cloud.dialogflow.v2.Context"ù‚Óä“Ü29/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:contextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:contextZP2E/v2/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}:contextZg2\\/v2/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}:contextÚAcontext,update_mask‚ - DeleteContext0.google.cloud.dialogflow.v2.DeleteContextRequest.google.protobuf.Empty"¦‚Ó䓘*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}Z?*=/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}ZV*T/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}ÚAnameŒ -DeleteAllContexts4.google.cloud.dialogflow.v2.DeleteAllContextsRequest.google.protobuf.Empty"¨‚Ó䓘*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZ?*=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contextsZV*T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contextsÚAparentxÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB• -com.google.cloud.dialogflow.v2B ContextProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Conversation.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Conversation.php deleted file mode 100644 index 9bfeeba7ecdd62f7051d479d255f9c9d5e485fd4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5535 zcmb_g-EZ4e6vye>t*2k>?X5Ac8lZ~PIkXC488)Tcf0gv1+2Xc7|l`Xjyh@={ozQv05--}#+$e9xV` z)|LfR{3156t+=?tZ|w2z7UnJ6bWPRN`Hfn&ifvvsw=GS_w#f78Wj?oDvq(LrJaPNn#K;c9mUm5L-aHQ7|J$wEJelqVt)P} zc9n|aDy2nFNhw8@l+tx2rM1Lu0998Uhfgue;1TfT&#GDHCX<`ktwTwlOkWPnQgvFDpZ0xBCR?1G`h9g8llh zQX9}@ODoBSVNw)K!$~F&V>(pPNid~r*l>>~v!G$UGLN^E9nG|lCc1(H+H~z?8%mV& zicJ!(S;|p7uP3pn5eB--w$?@TrBcuA0;z=QdM;>YF2R!vaP3GXfa3mf z(W@BouwulWM0`9@rC1uND4H6-ZsO;d7gdUXc_TbOj~k0)Z}?Qr4^ z(RZd@^dhTOTngn2RNPlvfKzNwDH9*7BqtL+p5zBK};Ba&7ou@(p+ zs4&XGptWThxNOw6H?Tc%j3^sO%yjE$p33GtQQyfK01~n7mML%(y`Hvss4YZQth3M; zx&bG!QSn9kx)WIg)BpxCx``)_6XD@RGPKu*WQ{Phh!CVVvG5KIH)4;@!I`D(LMC-T zwUj9rigGbiUd{^*ZYeoDE z_O@d0g?UdmRiZy3kC=bb4~BKpDjc^Q1Rikz;&XWly2!^V&kL7w)+;GG;Ch8$dq9Ya zAb|T_IPUmCdEICru@Hs!ixr9iL~Ww-s%ZYdMn#j;8-E;wv>Xq?h{UjslwVfD0}q%|33Z3e`V2Zc76)?h9f1xw7-95VAlEJM=y4u>(LM3pTBJXY+B9&&9hDubHR*rXeUxP+FljXj;<4qD$qWCJ7DbBJR&7FrLwUF;#l*>p_{dlEv;6?A814c%-m zuf0rFeJAh?te~Fb^eikJmJ@X3j;UKtuWLEm@>WeY9D56UzD`WXZg+H|`t!qo6F|EOjY0bo#cCWSofMMyrj~XeXO>PtH0!07ZVBIneW6FHks^Y*P(zcqS(6@!-(Re zE!zZpwr*)n>>Hlx631&%QAO!tk|4`|nZFWk%gmWwG|zohlp!Y<5%B_?-W?$ilfbhV zLcf`Te)6SdV5hpKrrNf{P;hKtQ3f#$OynsxEEC&gGM!r{wmNmZp>LUvH<{`xj;d&E zCo?KTTQVky^0s65yuh|iyQi(VtoSEGDM|jCNeh_ho9_4_ueyeIm*yqN@i#2At2fN3 ztkg~?siIqyg!4(>SryEIUuVI!Ct@Egb2TX>tu!F5v{fr#h)n9PNlDGhfm60Tn_B3y zoVVAbq(=fXDFH9aY_xPaTFUAYJ;RTrE=5w-AV;#330xlKf6#>2mrVS6%rru`Al#bDr=~_8X!vugmrMz zWWiDtShS_%p_(=q>t&RRltPCaxeZQJ^+C@!Da56z&{B1jp)?#UE!^5HfCsD@PGFPL zv(#KM6i^-sf2bb|;A*OXc{*tA`Vt*oa@uf=^IZzT18fjq-i^NcvgH`O5y-poXaB(X zij=9&0hc;_0QJRB1b`YL>KR+E;`amEE8rP05ApD&;@8L8F!hGcW=DTzJ9v#!Y;J}!O;D!EPSf52Rvwdr<_Pi<=^IYPi=s6(J4GR+}_-D$qt;L*}y*w;C%Kl z8qJPuoiRap%t81{5F3-QLE)|aaBozE%KbHQCDYOvJju7Zr>-77s*_M<)T!`=V~r=`h&OU0+E5^OqoeQz$fVeOD+ig%4g*gFSdj q&E&yLx>sAD3ak0mx#ZSgHg diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationEvent.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationEvent.php deleted file mode 100644 index 706dd9507cb4608df505c984a43f23f8f49b1be5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1358 zcmbVMO>fgc6s*$})NKX9Ei|nJTG~oYC2*wlmeN8#HmN1zM7A3QvSe+XO=`*YTI+SH zf_mUzATCH8`Gp)=+xbEX2$56l-I+IUJny}F9b5(A05*wF80Mr8d$*8Z5g0JasY5;3 ziv|P2phK?%*CR}Uu-=AR+k~jDn$HC^q!DvS84f8OdZg%hH0l@oF81hf;L)4ns8n>Q zKO!u|+@-!vM#Sez!ViFtuSpnShrnj1+9DkHF~?Rjp|WZ*l~tcoS>4hp0FH;l5Z2}> zQOpQF0VsY!)bm^ihFlbL;GrAZuJ3X|;eHg&oxuV2LLyie?+zm0i3P$K(DoftIEE=_ zeD^S*!i+OG(bkFm5#Cs;&k6IfXVppQFgM_ob;Q+jc}V!w)%Z=}cw9E7a|f`HYAlx* zM4my;A~IhcLPmJR{L@5tOmH{-XZ@RVRtGa-i5p;_m&>yrXOzo`^uVzU;bjyq$0WAA zJa@+?RQmmC&kYfm!c=9f`3QVj11JBH6L~KMDM`4LS-6x@X>Vst$O5MrTN;IFxb{D< zf=3H6k+;F-d>r!rvd#XA{7|1hAx4rIkW1R`$P2Ae)rk208P62icdJ z(Lpt}p`vr&HEtu5+Qs&A2vbiJ+Tvek8Pf812{ zn*^ST)$y06s!tXSO=hbjeK=1&n0yO*T^!Q+&4L40ESFgtg5K%;!%s>2p2^f3KQepG tWT7a@LQ!T5Md_A$_mWL?ax_iqi*)+thBf}8uCruNlbh)P-GMs*egUn#v^f9( diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationModel.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationModel.php deleted file mode 100644 index 4136092dc73e22d0cd8e2672e7ce3acbd50ee84d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9095 zcmcgyO>7%k9p7=jnwPelzHXD$Rl{_)t7b!MgG<@P-E1}fNbt&WvWZhE#nNapes%`N zGsDa{X|@VNE5Q-*aYb4QAt7;qBN9j)5NM@bkU(5|KpZ$AZY!h}>H+aS<}02L$0qpP93q8a^mzOBld(d}r)Vg8_yR}B3CS+?w`hA#Dt zHqvsGKLEPiL$)a^h+o?*ts_Tn%Z}VyqpVtG!m3sAS+yP)9s;0fvTgI_5X*JK5j+Dt z{xkb~nyT=&gM}&lZPk`kU3D-E^#g3&3g3}68(}Wdy`8?U5CwTcu%Rnx=}n&TBzte0 z1_on=_jKDN_+V^WHQhm$E^Dm{vK31;9mCqhTZ_dma(q$<9UTN@^c+tG~leb-cR^f_|RjMtd@{NB5&>tV6o z_8q#4b79GM0ddG3@W~@^{~SpGvy3Q5Gba~hPVS(Pop%|^riwF*_=ROo_H&_y4gp`< zbJ2GHWJd|Mj(o0x%L0yBz*aLJJfOrm}*P}mYVZjM5xB#BXEIK z2pc)}!Z<&MNtQg482EBE-RwIRM!>|bfeDg#XkiKqyj-}SMjf#(w@pZyCfC3vP1d`8 zxr-zP7odf!)Z#9U@iQB0~6Fzcnw_HZi>ySwA0w$td?u5wQ6Pd z73|~-<*lmNtTonVId~a>okpd)S>M>js~LC+OtUAlJVrMAi{tQBFyn0|%M)z5UZuPy zApn!BVy%w(Ou-p2wOMUc$hHeY7fe$%n@1*sSunT0QK{CY=I-X8ZUR``UKh8T(iYZe zSE}rYb*b7Yn#2lf~b1{}g}CfzOBXki{fUK|6=rU_KHSa04gF z*OB7b`DgB@2!9+0 zHzG<`4`i)RH9Tw1ai+gEWgaV!s(L~0nv;=Ng@}acf@5#DE43r$y!$k|%CdEFW*-DGnSn&l8j!!x8 zV1(cZY=_(D_i8@C9fwTta18fjn0f(+w|XDX9D9k9O4DEpS1^LM@Z)hX8yLo%da5>$ zou@W`4ZyH#-S{FsW2Uf@=Gj42a)GOvZrI5Zc#Sb9ldNHrqD{khoU(s3I{Px?;|a(f zfZ0K@uneHA;UQR4ZAWSwO23CYIO~n2)}0sPZ6G9vQpMd5Z-UvL{1g{@yRSJ|?>^>1 zP??}DE&CKeD)^K_{}<7vd2o%@8rwvQ+EEo3RpBwX81B7r6->E(+qM1yo&jEnd2lb; zevGVtYH)kF@C+=bcShV7uR4~D=Uu()Hbn=w3_4$2F1(fI=CC|kU~}|8={U4t2@aSK zJWSWTew-wg)W(;U`Z0%_aL}t+2I3YLiY&#zK;c1zVw-`R;F4pQ5S>iJ6`TXpCYcOveC!Nzm4ovD(C;1N8%U=?NjnQCd(tvj(G2h{ ip^OT#6)4wk@T)WLKhVS}3I>(Q!MU|X`+|BBU2 z$jpG;19p8N;8$oVe+!;-DpJ7BRIA-=Kd;d&i$BgJ8tC63_{Ds%+OeX;PPDt;`H`f{ z<-&VuH8lazh(LC%g!vIq#DYEKm=-!fapY9Cy;Ck%s}*`k3l3UiWT`AR%GEkKca4+t zocrjX(3)FftwEk9g+s7ZiBH;yU6HmC26AL;kHB(bz4(kpQ=4Op;%6-Q(+nsiL{X5J zQ61hGmQpO1F0+Cx%vo}3>LsxP+->r9io(E@%VuEbpr zCUqI#R=)`UivzF4HF}uZ2;wL_kVhMl1e;>sfednTeHj8g?j~pX_{rOl!8^FyJB8c% z<#@{HBE2?+-_3xz*m=Q*spES*jc0jkXeN=ep+xAPg5gY&=fe=$JuJ$ei|+Uje}OYC zVGvEvv;-m#iXoZyE0$@U<&nI;{BmAD5k+uq@Z!7LGo2%dd+izf&TlASvD5T0z+#Ec z2-xo#U>^uyq;+L5@WX{+o!m;|3^*>bslUiAKPd?-v2;TdCg72dUaW1=YV(H-xSlv& zz<0dz9QPYTBH0-cJYfiaOSm74L_C6h_vAz{tO$={DTiYi;&LLElVWg`vFn!^uozc^ zgINHIX<(+)dWfdBfJoa8WDDPCSbxaDw__oT1N+p4D6a9Vuo6o<4DJCwUd8`i2Jo>Z zI8fV$|4}LfRVYJ4_fp{FY-iI(sI}F5Ae1dNAmkhX-Fk%HT!c+i; zl6x=?=^$=8*8~4cs=og_D|yOzT=p7 zF`qv?JamK0|CLPcJNxWqkbC5(l#XHb?he}?h$?-A@5As-eM-od<|3KCNnXm>a^QZF`InX2)~komBeFoAkEx+7=HLS$NeOesjU7ylU<{4qU6ftO_W^4e-kD5xUe^g l$8X2Df5(3d;4XV@BlMOB`K4J^V&3qeJK38U$KV)%{{o%SNnHQ{ diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationProfile.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ConversationProfile.php deleted file mode 100644 index 083999d5c0ddbb84eae5d0fe50d2709ce2f1027a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10877 zcmeHNU2Ggz74EL%);^9MXA;NjP0~&_t@2ZQw`?hbP17>#znJ*1-tAA!qS1Kv?s}5( z%rG-+*A0z%xSdP@$^g37*IkNId0*M^FV4=l;y>tUa^cT^Wf7 z@(|lI_xykNoO93IS6_E_9k?nl6N|W-PwMi{q3rJx*>P>()@@VXX*C+em34d1F-+p- zWqDykUf-z7iwi5&D@f|uEmtQcxoO)?lN5B*Zq*BQLo@AW!?X_y`^AE8Tl>WIG~ci- z6*)JMQ=Ulxu(UnmIhs!7<<0UM@wK|yZFduwmP$?Hhn}TRuHO)1DLbPfU*|fO zO2?GEE&FbZM5W8JOZ=8=-C}xE29LtuYB9c39HXXKmQB52TVAQuwyDh`iE!RDh~@W3 zvt$snUM9QRzG1ulk!}%zqMntEK}Jn!)eReA(J-35i;rWpskw+8!_oS2!K!UF-Iiq; zRvM_*=fO2a|}#06rwzhWS@(?XiyxgI|7Je z!AxXC13wx3#BPf*TeO1A*S=dy4UWr5oQn zl%DZa0&2nhZOBHM?`l@vZZrawhZ*aadt-fv(+b9S;T$G!qhaX0Zt4t#nWq`Yd^e8k z5i-F{feEa~P0US!X3sD_H@fjzHm)U0NU>ZjXvk^y8hDxHN<3S0F(+aj3>_GlH(dPHxzhJUDf z#P`uLUS^!WDu3n^B@eTayu(qBDaXrW7gU&kry?jTg0S>a>WT7U3g)^H9dA~o*Kohy zC%W$y9*W-{b#zLbys5$082V%V(<7-8LvPv~El3pn+85K@w^Q)kDsB%9dMGkbWQ%;Y zg(X5-gr_mlVfcCCD8GU!;uEDH^=Utb#i5b%ur15bWHT&D0PK-(KOh#{@1wbIr9e*B z$aAo_A<{Zb#W~4C4TmsQ6}rJZ##Ct<&RB>mHKGkmhq*djUM6wg37j(@&8dNF`h-UA zH)!)bOSm!01(HrE3|nwM&UGvz{dsq|2J9c@1lQ_U|Nj^6dWlzv_1+Oju)!1 zPvYt}L0%vx@ktkLPb9AEa6Yy|eGZ0kCxjcSc8%?*EAU)$Mp5Yc++WYZOmb~XC?OQd zW5s?;$R1pd7CNuhY+^FN9yh2cygV;;+iHob<|`pPi~%-V(tXGhtFE>@;;P4G@sfQ~ zvP_r`%9@79xI^p@0;6~VzdM*wYrIw}f+x2udk1FP)>d5u{pbdzL^=9{?3^!-4n>oiAN-w}= zVre^OQ1o{+4_mV~cb2F}Bp)uepQ%1KtX*AcEgmawbQ9eRJdQd{gVR`*+`}MXygwQ+ zU~Svqpge^u9hlK0R=m7{{s71%Z!E7k{#Qmn}Q-9TI!r7>M9Y!Y_oDe3De zn5x@)Ymc_b9eVK8tDdAD3qnw*3g1YHgtgKM@5=VHPq-GtgLEDV%K1{{>NxFUf@*p&G?470q2VXm=4x!p%&WL` z1!lww${P==C?#k^c;d@_I0Vz};@CMS*a68j_KAu^C9mC#@g{nqw>{p$Fu#i2HW@SY z2euNJ&{}ZG(@f$uY#jBgOdRW1gM!4Q(7hDOXaezHV~UFz~oV7q>C`2>CE-2 z)!N%3t_V1tQ)RIX%p@|zymQ8Oo0?_3$0sUAJwhvGVZ2Tp(>`PYz<1OrG5@*%qdP6% zNB81$nm)yIehbuvm)YZ_8(3oO=m-*nLAMx!HHkIT+JqqWEgJU>;|i7kFG^JaP*#-thn-on2e3RFvgKb!lU3O{uDHu2(h} z=U0|i78fR;l15>8b8DlzF`1G^;MA8Y8|#zl+{-ZDITgaP9e~%@^aphpgXpSa)+EsT zK?=^cYp5vu(ih>Bf9UYx<3zF8&A4O4`6^Q8*5MTWi9PdV_1@;<5&bWKq-<4J=2sWh z%A3o}iEDWAEaTf8!rCuC-xDo_^Wep{zyMTKYM%9chZnanrBM4y5)x?Dv_D8T?<4q zF+XGF4&VRN-@co^FU`^~_7C}h_ck6p`H1>v{1|z=Bz-=9eIb}XdxZqr$BGyuOaD&6 zh4`te^o4E?iKhwN(eKbVchKPh`VA~%fBb0v=A+O9N7qN}PojOSuQ+=H_=6S2w_PBw@|z{wn=fVch)^XGG5GM1up=#&s~AHXT|4T zI%}7nVDFtcMepwUM6$s17lJH+`G{S)$+H_0!H&Jjk=mmtw@WuUCXcS~!9Br_{qYcF zlY0f}cA#(EH|k`%z}(9LdF0kWJ}j)cpQhOk{e3F;c4F*%$Xq2avDYo7Zf@`9^q#o) z;I;0O9xJh_<71^9e`}$yCheC)aH(6nBE25?IxbY*D0>XnFLkF|i;}8GZB*Ags7kuM)Y1Fi z_rCA85hFnPc2_R#Elx@C%V!iL!;i;C$(L$Ey(<)$U|yU zFaU_on&}b8)QnDzxLrrLJuXUI-z5vUoXImb%lo#YI2HYIR?bH$~4GlIZH9 z=n!w{nAcg{)WKf(t1|&G+15LfJ+Rxo(+#XK0$b+3#%Fl;wv*DcpRP_Fc_=l0M~dZd(V&d)mNG zKeuIfJDael!vk_jf+#G` zENA~N3-~-b+0$Ly&~{Zel;J}e{05pCz%r`0Ym-8D^t_2qJu$5vgY^3Tpj(&{vx{?; zO3BZ5(k7I65T$qd+&1{7L1ge*lI>fNFULg;oIX|a1I%B}m;CjKB>LXG(2`2fLkL)Ndb2IJ$5%Xwaw{!GZo^Di7NO(*lCU0(+;7(Wku0P)(^A$q2O`@MKtB|5zwL=Rc3;emMt(V1h_$AY3ONPoPDjhpC6V8&bjp1|Xlu4d>YGi3v z5Yi6?baurdP^{xnzE0lPQI5yS(oPvB>#x#}Gw6-Afo(aT?q1wL2u?cHr%w>o#U$`R z25mB~xzNU2=rqqr^~eB@AZUp6n0ZBGjVIC$X0k+~yA^eor%D6s4qeY0sA1QpRLDgL z|NVWiaBuOmFFYLVwJi*eNxDl7qtqjM<*lbL|~BD&xXG{*y)yRO!UeS((c(05AJ z&y&e1Ul~QX|8Gc0c@}L6ygMH~AqAbHW!HmaLpRy+6u_G(aG)u`%PF4$xqlXYhOo%g z?V(|W@{i(^!xvMgJB#v>IHW#0=Vu$fQ1Obv>!{!_M|!MlM5YCL>JZ^eA7?=MaD}^n zu_jl3l(%!08%d>pup1`Sd@Tr_YA!A#f)nsPbUr{aeBX$7!hGdw(&`7m_0BPA`4vhl zk4`j|2GdUhNXHYc`;7(_QyH8?Q?-qTGM`;OgYf>aD!+tR4qjg_{&fb;#tv=#rKEsk zrU99YiDG|jhTrg{-wEIQ>pwood?ersy$X8nOO>0U2wNJLaZ3^5_UI12b-*mH)7)~h zhbq2yfCtb$rkAw(OF0l$_`?j!N5mX1B_S6v7ypi|(Qds@ck1~u>e-@-8P^uaV zzenGYUXxrAUp48-G#hz&DWCGo;|iB@FXW4n3x}ju_^S*$H6}W6;tj%>aZ2oe?{oBh zLHhauWfith|E(-q&Q+bM$*Qmf*eeIjPvUE&HH>_{kiUAc-b#Y(Z$Q?#%t|I}+%_d( z|KUZwm}E`3z6a@8jw_d1vCbDR<_Buu1!k;&2<{u=~PjqZpr`eji4@YSL}C z597Ylz#n>fDbLgSS0Y!e>7oA_K<`UIF3gglkK3k%{^PM8J)UlIE%-9`(}6zpl^UVq zvlsID1MdU>B0qfWdA3_Emv?q{0+kS67Q+4YWB>c(+w}Tl+j0h1US&R7YWXJux&U{M zTzgEou3DbuyVj(Auqiyc7%g5N4ep(wCN`+crP0+AQ0sO+#uU7btaq=q7eTXcC(ysc2+jt?g%L>1KDk zyKd`N=1?S%khp+^dWHiM65K#SsIQE1P2j0)_`gzw*HceECUK+oh znK$#zH#2YFo`1twH^4Dr4rD2tni%8Ydt7Z`OWh;a?D3 zr?MCkghp;&v!SWUYAyw>qNy0RZf22aGFgGPha+B@IO%MQ%_(JJg8G7 zy9iS8^|O>$w``~V-$4FN+z2zHBEFVc50s4tuI3;6>TG-d>l`<;4m*})LqYY2b4klAI>tOG zdx=O8#gJG!21r_GY)jM};$Wz;tNw*q#9(mbEq@t%mFID1s&~sB( zs}6QF%0r;fs%g4b+ptC=$P)^l_!j8KNbm>2;N|(HRDN}7Ih&rDpPf&q2A@MY=p(C( zQg)Ez_klg+*TVer%3y>a0R80WmGoTto$O$jcn$0iz`!2^W76tMCXYmcYw(m;8$ROZt)n;|$elni0#b7@9}%W@`Ba;@EqzXj}2S&R_Mo zTtRtoW)Geh=owmY2T`4$Yonv;McP~9cilg?G$bM~hZYpeZu(s|6k_i`(s4dqR8g=`m9&K-O*jI@AcG zN!mHl0K)+%Ed$L8h`ij(AY&n4F>Q~Bqb)xS1~f#^JhLtFQ`Er0Imn>mf|6v*+=V1$ zqBns={Eh>|GbTjGm}Vy2J$IIfOQ4?th@>GjKC~7Ce&g2VWab;>_o{&oKyCc??TkC) zPIqQV^a|*&l8y7YDH9s?C!%iN-M$_3MjxS=xC(|-P=)Q>-9c)_?<3&Iv}_mG{aEZ$ zHI0EoOcL`2yj8wxDzvKJe2&k6k)VL0sftD`tUv6eAyFWMfu!RBLzB+?pzk4x-3t2Y z17Lr^Me$v5v=eT-QQ%_T$%{YfyOfustuc`|19o0L;6Rkb$J90&u3J=g$bQ03Ydj;L zW?DyriDs(%iR(T?>;I4Yex70mhiDO>x4aqsyG^B%cqp6mI3Xe#?uVwc0FK-r8i>Ql2 z$n%HzVQb*He+0s2qmED3y}FomcGX?B(EPq4q}^{;ca|yFS`p#|`j^tIAwu#Jp=H z@psCJdtAp_AWUfKoXJA-pqk_+*Jee^gkaYVgua=bhte`QyUArnr#PKs-jJi}C2|>E zD;9137Z+AP1*{OT26RHg`uM3~r918%R?kjD8VU9ya;aoJl;Yr!A2z~&z7v{HBH#c? z1k=6I*@l13rCCRYwkm|g@q-Ad!~2|gsl%*p*Qn^+LT*u}(w#A+Z;J~Z%mkR~n|+;3 zHlzU-U9@LII^tVtZC*P8otXgPKyOuemY~y}cNKKc%hTnZaz1+dp)}g@_VbZ+ZQZsFD;ba9x^>HGJ>JzQ zy4_xB+4b8TZk zx9h4%6Pkp$aDfAGLE^w+e*hAH0&qZr+fF-h;>-ai4!j?B;>50-Zo4e5zu)ise!kz& z_w%0LyYE?T3tSXekb!I&BURkm6LA}fmTh8FF?DgvZ8niDD(1GO>ByEuv9vC(t=GhI zX|;BNxH_h5E2tp0OtYnIhL#- zaiy|&8(~?Mv0PtaG3rY+M!nRHQQyeV1EA=#B}OINo_A#Cc(cT`dL+INk}>Bs|H54 zA?x)Laui#$uxVF_X`#?UxLZj2m+8yivNW956sLKPg+eIF1rggW3a&1SHo~rL%(J{{ zfKK;UJ)&ksOREFlCx!yq@X@*WR zf)Vwit7_(wX*9Lg@XJR9T6XoOrt6fR!w2fJf%KxhZQ;G=aAhUDEj#y~!?&i90mAaO z746H&J9}O8s9IFjE;Eb>-pt^1OvzD@e(S@^iR7T9kNH^@F30jYp+!Etbm3Se3gh3S)v$*096OoNo_ z$qAX?bi#ilz#HHdxkZZD*g>{K-zC|*%TJ5Kv*JZ?Ay9k{gVf!Th+yY7xC1PL5vn{W zeT;aH=4T~t7u7r|kfv0nPCUJ9Amv&_qfvumOOKF1seHx{A0dKAQjNIQ%qnxNdVVynKmerzO-!F)vFcNC!2(0hVr0u; zgyDk|V7yu@*2;~$Yt>45X?1zETpD``roi!PZM{+<4+4F-wO%Z(uC0tE=);}6Yisl& zS$Hh`Rs2B!Zywx*KtrqvOSulYNc}pkl?dum~=m}o*Dwr@`Y`M6>=M5Q(sghnYu8!t&an)aEj!d!3 zo*NCCfak%uLqv=$OphOpHnQ;pM(`27s0+?Gdj>g?IAk~XNyI1JA#_d>7T%6qI0~&) z?MCF};+u$5Hn6?Nmd)7UT$~Z1K=K~iQBH&5JEUDeIVton@$-C3wq(ykvpjBjPdgYx2fc+ht_mD3v zbi%SWNQZNAEON3yB$-nIemW#2+J^Y?3xI-?;8laNEU+?@yKD_ite_x%AO3uwUi#pN z9J=gJ0!S~}i0~_rg&+DwD@&v(Pz;X(L)U^2!C5dGh|$ngPvYr>WPc{v-(}Jpk^R8x zbU!&lC-~|;X{TG7hafEN-NTCSRiBb|a=>rsrmRwhS8cgTw82mts^%!Ntu~alY_yQW z&~OpSehAVfq@&1IyjYjN5Wu;9_S_`HWZHX&b$Un|!6VPmzXE`Po_XoO*9K;pbU6v% z2gk{D+Zw4>f{oL)I28#;CHuA~UP*W^JYW3CKv&ABV1(I{eQ)4g!A>J2z3@Q<=0Hke z6U4WF8ZLJG&;NP~oC;*=z`q4BHmE4@Y8=QxYp;))*vf>RxM*eFPyhJy%S02-&=1mm zE~X3Jjdh0a!kxZtcykWEbAYwK=Q_Da&nHDsuHh2_jP|njJ|KRW*JIR3ANJO_b#hec_yhY^R%nNA;w%@6X6jOB4*4y8h0NcbD!MM&o3 z>k=~e>vGy37c#8u{zYP++dk80I0uHpy*W3-D>i6-C_MNmF?crd<$TW1FX|Jff1LX_ zq>L2j84yp;E&Gu7{Q`@a;=9QdX4d-0<-#+Fma z<#u;>J#gKRQQ5_9emgj8=`wDb_V$&-%zH~Mej|YM+au`QXDpg7AGJQCfbS$gHrtNok4RO-iNi-K4aU-+Gx*^XgRh cQsoN2&I{cB(eH0fiMaV=mi&gU13Ccw4>z@LNB{r; diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Fulfillment.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Fulfillment.php deleted file mode 100644 index d9633a5b8ddf0d4f82641eee87990b9552679056..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2908 zcmb7G&vV;E6t0}4P1kL4R62EhfF*=U3W+qR?F>~&J8~SS8S=x^xP@jkV`OP%FOel7 ztzy!QFPu1VDLwVd3AplKaD-cX;lPQ%fZ@dMN|qJuq>e9^t@plt?|a{S`#yc(w|($F z+(0f041z4!Jc6W+pdWa|Gd%}3Bilv+G`)_G9TZ3qR(9deZXK>yHtX+E*U*as6REJ} zc`XOYrsGAHY+=LkTDIeL)lC~yr&ub|Kjuur_8Mom?GRMkOF z1BlZc*Bnf1b3UIcMvhfRZQ~Go!TDStp+q!e2bpruPu(`cgV87Qnl0bQNrg1aN()k@ z@?A_RWP~n&=LN8I9^Hzi*jnN$mj)`A4wcf)1j+C*?E*$O=HrgOm zCpr{{>L8w}`XTc~5$DMASAnPbgP_E*X9Op`Ib}5~(ET0d0nh&|jI+5of%i(gnL%30 zXsGnfZ`$msP5Qg`v`vT~sinternalAddGeneratedFile( - ' -ž -$google/cloud/dialogflow/v2/gcs.protogoogle.cloud.dialogflow.v2" - -GcsSources -uris ( BàA" -GcsDestination -uri ( B‘ -com.google.cloud.dialogflow.v2BGcsProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php deleted file mode 100644 index 3f2efe820e73..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/HumanAgentAssistantEvent.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - ' - -cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Intent.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Intent.php deleted file mode 100644 index f7c9f4f8346b04c709d395dfef0c00af1451101e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12742 zcmds8OKcn06)ma%r9{zBvQ3ShgrSqzF&wg?^KsQFPH&iU38BO?uyZ^W#S{M{+jx z#uVq>`|ju5&%1B<=39-e2AoSQD7w;=Ev25Q?j@`(CDCXamQgdbM76cCp)?aUW2d2N zN;8#6%#{+$rAi_{SExLTq^8ko)|A=AreSPqO1h>Qt$Mny%9^pcp&9qmyP34ATZ(R_ z7*7CQ-cihkTvHMY&$;C5w=!1&YMN}Ci2`E-4iObvlXSf{%;by-`VQ_NaZZCFOLj7w){Hxlv7xSux^7S_7`iz->*?gNIEXN(spytqH1n#W z)w9Z$ysH|`V5BRG4VAuy>;Z=LoPmD$Fo4uWL*Hz+bY0aq*GmnG@?e&70f6Su?=-Bv z{0s1nqzI2_&7lo!+ue(T`$7sFaVuvE>JpAZASU=xqoDzXA zOtFAYc>$f;%?PJ$CUQf?fTt+p!7V)Fd$2*FB2{gy*b8QS3z{|{>_->uN4+vgjeFf* zdCp#`d9FtFz<73w_up_8rLhg{elbdkN{Y$v(N{J@_k|9S<6c{(B| zV320CcqkFNFqR$oyBH!fFkV;9h9>Vx>`~Zx6ec%d;+|67GK_7BrUfNFjL)K(bc%1+ z%i1ZvQR+6QTcu=tpOY}!Xkr|y)?R!7`3&)|;}F4ghzU@u%C+tIAU+v&pX_K7$|hGe zr5>O1o;(9YQ+E|f-b80gTe4m^Ha6nZ-h#6*spxe~vIsSq<F; zZ!i7C{{)jU0}wejLF45m@IJ;&SHHXgu1dJw=_#ac^g<06bXT7Z5YiRGd_u2 zqnXS7b4`_PTF(9jm}we@C2bfQmiAVI!2$8YP#$v(K0waF88iq*QqPqq=t}Y~Om{w2 z^$jCVnCh?gA>_O*1~+E`iK&Q_EDE5~4)aF$Z|rA$b)Bsa|9nVwF4PytKBwTF&PR z^M(9e>>DHkBl&m5rE)PJ3y~O%R`U2+tmI>1Av_uq9)(~Gh2ufcVeaW(`H-M=yRz0& z{L%?9;lP(aqvF}xJP&c7o-~Vj8Ft89b_&LJFn!6`pY5^iYUjRb7{P3hHJ~jm;kTG8 zHPy5*FFAQq_{BvSvEz!o&EZg>bjYF% z6CbqH+BU{?1IsOUXe9G`09H3C{R$^Xj;K{lZgTer(<+B#$N(+WkoPo0uE(kIBbn2V zFiuTP@y-R;-h!B^?ld&T%}LY;lxWr=>d|F5b zR%9GpuJ6NiwQ1bL^5Zhc5B2yd#`;+2J*#Q5i@I%*Iw29%aKh2m1aeajn+q^Kk zb`)%IdGmrPH_q4viLNC|&l(1uhWtC&nAwHXZt#v=bA=hq%9u!KpJ^w3r>7F$h9Q
>XE+|jrx{rx_3k*Acf4U_FG zP3(KRvtfuS93zlJzmucey!*?L>)wer$dXO$^&5&#BSErH0@TBiOyL-trf_heuQgSX9elX4&%#98 zx7Z*JxZx)x0KAml!xdrSTM+S9n55KRe>fn5>6vXPZ#OZ7b!uxjj z;2OrZj;Y{=L|FJF4B%CZ9*Ts>GJ?cX@N_}*La>tVaZVMG1rwb3(}pjS{)DN9F2d?J z$j%8=?qEfV7bnWZIV*%cjXb4kM~zluLq41p`TNr+5)i^~@qB^_%U3YTiep6X`0D|{ z+Rn){r0{=au{SU?vwp>K9);?*vgZ}MFvHEBZs>b96zvlAlR+5wmuFH1;N_kjmne#& zfs%utS;}cg*_Y0#Fob*9Ern72HnwO^Y}^Ro)`PbxF`mL_A((30o`2tQ_Ugd0i}Dcb zBIV|$BJtA+4Yi}Dcx-v{7?n8uVdu$Xu$h7g8zJH7pw-ma(PAt+Vwa(04oDYPqz$nwOUFRzj3|oLa_)2NoxT3>a;fs({$Q`LzA=m6q?}zvpk;rB%(iVDN$~v zR4(JlXaKusk}a;StmNmUteCs8uu@uEo{J3%pNC=0J%D*2V2wyy`S)cjxAGn*PvNor z1YT;kc614+6nJA`(P0WdZ3JmbbBssXWx>3Ir@ldYR7G&nJ}AiX(KW`3agX!z^~}Rh zsAv8%1hG!RNfd^+6uFKe!L8qf=`FlaxR3WOvL@m5a8uvGsT(`!L^GuTpzqu&wdnE{ z9kv|RRha7Wj64U4#nMXQF2YqTN@B6Fu)Ku0?LZ*{u9z3+3d;)!M1bKOF3GPT631~w zxgr*d^vQtmA&mQtjKy!Lrf8apYEx%j380wECx;BUx9HeX-Broo>^fvi%2u7VDJ0`$sI#Zo5tt@q@iQ3GIxqP-%y1@f(wTKaAtC=t6F%p+B;znTL zM&U+mkcQ;y4IJXeh6u(f8X+GWreEGFWYIb!7-c7TURae%%hE!rw19KnQOuB&{Ij$u zE-#eUDyy+bb__;#_$7mI8%X!iot*8SxQq8FGYv=R>=i@>2$xlN- z=(&jRY_2FDwD816@WK)A8E7c7K+Rsj%ZD$;Bze5-2u@AbH(Mw#PPpoP4sFlW-^Qy# zCbzV!D);Qt_QK75vUZyDQ)?yI-S8cemR$H%$k zG7jRIBu+>sA1?(t4U;+@&-ixYaQZdox&_6yp<}|={C7Z(0sCVS8@ra=J24}spAo$m;5vgGg;ZH zZTSuNL~=sRj{7R*&gRC+lc1LJI01{_aE&5N4w=?pH2(6NFy&Jw{SW{xoF!%nyVo;Ik`UhUAmBegh?$g-C&U zl&N~8RD1C)0M3J^esTs*<9UO2W48+V+a1Lj?~nZt=huqGSSa&(3`RHylYAD2h_48c z)M23VEwpo^aOmqYZR@!slV63t`_sL-;(s z?jRof;_0?9u-g;7bK4h%UQc-A@<=SftB1T@*~=n!`9EcoxjyD^w2-#kPAMHR3WO%;O@eJ?s*cYR1<~1LQX*k(w8-{;!fXRdpABi&up0Ym??`&CC!<internalAddGeneratedFile( - ' -Þ -/google/cloud/dialogflow/v2/knowledge_base.protogoogle.cloud.dialogflow.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"ü - KnowledgeBase -name (  - display_name ( BàA - language_code ( :ªêA¦ -\'dialogflow.googleapis.com/KnowledgeBase2projects/{project}/knowledgeBases/{knowledge_base}Gprojects/{project}/locations/{location}/knowledgeBases/{knowledge_base}"“ -ListKnowledgeBasesRequest? -parent ( B/àAúA)\'dialogflow.googleapis.com/KnowledgeBase - page_size ( - -page_token (  -filter ( "y -ListKnowledgeBasesResponseB -knowledge_bases ( 2).google.cloud.dialogflow.v2.KnowledgeBase -next_page_token ( "X -GetKnowledgeBaseRequest= -name ( B/àAúA) -\'dialogflow.googleapis.com/KnowledgeBase"¥ -CreateKnowledgeBaseRequest? -parent ( B/àAúA)\'dialogflow.googleapis.com/KnowledgeBaseF -knowledge_base ( 2).google.cloud.dialogflow.v2.KnowledgeBaseBàA"o -DeleteKnowledgeBaseRequest= -name ( B/àAúA) -\'dialogflow.googleapis.com/KnowledgeBase -force (BàA"š -UpdateKnowledgeBaseRequestF -knowledge_base ( 2).google.cloud.dialogflow.v2.KnowledgeBaseBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA2´ -KnowledgeBases¤ -ListKnowledgeBases5.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest6.google.cloud.dialogflow.v2.ListKnowledgeBasesResponse"ž‚Óä“Ž&/v2/{parent=projects/*}/knowledgeBasesZ42/v2/{parent=projects/*/locations/*}/knowledgeBasesZ.,/v2/{parent=projects/*/agent}/knowledgeBasesÚAparent‘ -GetKnowledgeBase3.google.cloud.dialogflow.v2.GetKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"œ‚Óä“Ž&/v2/{name=projects/*/knowledgeBases/*}Z42/v2/{name=projects/*/locations/*/knowledgeBases/*}Z.,/v2/{name=projects/*/agent/knowledgeBases/*}ÚAnameØ -CreateKnowledgeBase6.google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"Ý‚Ó䓾"&/v2/{parent=projects/*}/knowledgeBases:knowledge_baseZD"2/v2/{parent=projects/*/locations/*}/knowledgeBases:knowledge_baseZ>",/v2/{parent=projects/*/agent}/knowledgeBases:knowledge_baseÚAparent,knowledge_base„ -DeleteKnowledgeBase6.google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest.google.protobuf.Empty"œ‚Óä“Ž*&/v2/{name=projects/*/knowledgeBases/*}Z4*2/v2/{name=projects/*/locations/*/knowledgeBases/*}Z.*,/v2/{name=projects/*/agent/knowledgeBases/*}ÚAnameŠ -UpdateKnowledgeBase6.google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest).google.cloud.dialogflow.v2.KnowledgeBase"‚Óä“ë25/v2/{knowledge_base.name=projects/*/knowledgeBases/*}:knowledge_baseZS2A/v2/{knowledge_base.name=projects/*/locations/*/knowledgeBases/*}:knowledge_baseZM2;/v2/{knowledge_base.name=projects/*/agent/knowledgeBases/*}:knowledge_baseÚAknowledge_base,update_maskxÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB› -com.google.cloud.dialogflow.v2BKnowledgeBaseProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Participant.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Participant.php deleted file mode 100644 index 778b215c7776706da38d94b649a87a6dfb5a1b58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11918 zcmd^FO>Er86%JRDCC%zD<49g_QfEUawyemz=_dWbI!?ls){0VFQlz!pI7(THJCYbv zBtvrTD25IV5ClPcDbhm=^i-giqKEd}9)dQP77b7|ITQw3_z)CD&P7r9)Hgrma=Bb; zS9VVI#Vc~=&71eW_q{i7`235`u7ge&mWV}M%_oh*)_%d?B?ZT|eOtH9!d7#8o45tt z-g69-xWz(Yaka3rS})WVm+Mc!RL^d@I;j+PYen&lUnV1z7fk9dxzlfu$k^$PK|hUROVOH9V*0+q437|PhZR=$9cZfc%aSZm2b zw^0H9In6E8&B9B2+Z#syWO;O->|I$ov>=@WcFNv z%cNtUbZprF#X_Lf8Z`-+V{_T^iEC-*<|6TQ*KmB>U4x;O$`0{EL((U+=ftv9oUvV) z9ZFs-_->O#S1%M?;x}FE0@IrcI0%1jCfH1Ij7`O|Y-$DD@+y_qo?0ThOhX1|Xx^1s4qJ=U*@cu$4w5#PKDF`q>b9 z6o+Tg_v>iBpK!-{KDx-rq1Yma;>~jYgpi~;29O8EA?Jwv%EnBZkkW4EH!X#K?f=7>xlLl(=SlfB`Y$F(E4);W0;xx51{u zw|?MFF(5F9>*ys)7fp}9kbg9UvJvvb52Ha!qB*G`&5l+F?kW;~5e>SwNpcx@G*O-} za!rz~UW`a8uEQKEUK*qxnr$`X3?Ye)^^j=Y06N^ z+nf*8rbk@WXyk@lBQ2C~*m`ph-0Fce&hzTFVZszIH&Pgw&6aDuD!Ld*3K9l@lgg=C zzPry%kbe<HXozqH> z2UtyzW!m60njuQJgP%uUK>pzn8omPYq3w_)JU)VkL02Dq&mhTAn!$NAZfe#}6DC0v zHb`!u1(zJkMs|=J4BiajZ=tEk8}61#`z z;@1KGc7lumi@n3LQ?UFq3FQ`;Un3EO zXi|>NmN(C)**u~JwR1+Uqv<8$M;-^tU1%foK(!t@L;gTQCoUUaRInFFzTa)npizgS z*Mn-BMez{biiA%f#Gd>14Pr$?SawmaQy0$x#v$N?G4Mff7Vy9ml>d7+A}l&-LAFsN zD^ov=${&K~uR3ssAPL5ed5*fjk42g1C}T94e3hnpW{9Nd4+}!>?{^2$G>f-)$O0$A zz%A8wG_^yrN55k@UHH@-hUGMU!D3IP0kRIGm+9b_9|B)w$xX^4d^V?$GikGHba*g* z8DW<==Dr#&r*f2$4(gnfyh_J|tDyj*1pv_O zaX1`82&iq6CYU;3O_QXsX>oZ)G_JqR^(n|10I+-7SY*qDcEpQic*4!3Z1u3(ExEWEQncP;dGjWE24I& zqf@)hJT@Cn!Wc5JkVG)hB1t(8gsWxQM9f?ig2~dTR z45W29X$xGW1}76jsRlR?rhtrOvY^#n-()e3vMj1N?=X;!y(~ewj`(918tkY7Piw(b z>NLSCsgSM{lQ_G!wNG8f_|5|{ae|`fn`}AN25~~^LQtG_9|S>-Go88;)I55USlX6J zD5=rr7}zf|_^|Sy91+TZJ ziy&_2JeKWojPvOE;jo0>6X$V2rUK*;&ZEG~mLCx39fhC{;XHoePNjej8cpCl#J1TF z=e?IfGeWXL3qX?`TA}t@1u1C4g!BcuKgc``CDn6KrruLd_j0N^iN*l$jOJLKOA#gN z+%AF3q0)cg%0GZwy~7Y9eyV7aRmTven&sW19THw4pGylKVNZq4z%$9#0D?@|qWpda z<%Bkuw70m3|5L}jC!v!GrVy^FpzOBxR?ID_wRULFK3(!}3FUi4^8MSv*Q<%Ayz%pW3(kh@edMuG;!a;0}zNFwFj?HW1dK7w7`t} z9N_e9Ht;3w;&qgbrW!bXi@J%QI#XLdk%_!=qWwu$!LhP_O#W8}9ZyO?YiOnc#i< zaJ~SZ=if)eW3dL4q@%9iSkmK)C4t)3D4>v4jO`3 zGvTUG)it<-Gl9&ZdSE@R5qjc>gIIuAdhX|^EBOs{qMN)qbSBo5Ro824mtRxsudT%! zx>+>5rmWYOmCMk~9YsTzmRI0sM*dtvzVHnny6fz$PW#AB*I8I9;<~mgViN}tfD4}@zoUZ#(|6z^hEG(1@>sdl3Tl3iOEs!kRUjBLI*)6R{04d~ zkQ_;9E#bVF{#u|_(z#y<4;>d3uc1?c_!e73`f4q}Q%x%J#R8$*So#ZgP@RTE5E?a< zE1yS`v4dylO#^c`Z_T}l9ud8D(hzM3Xwdj@cQeS2kQ^Dup-Beab{|?Ul=%4Zql6~6 zZ5LW5^zw_}A91VA1Xc^%L)Yl-l5C-e#S*P{K3vuf(W6*U;-zwQqNX`CMT=I=uvDfa zScxe(B7Y)5+cB}P<)vQ7@nUl|*hP}>6U7!&uiWnYPOf}!8jVrsh;K+d{EG~FxTDdJ zpG#A`W4P$V=F@v+k!9syOYeUA`G=VwOY(E{s}_3K28O>F-e%0jF6!pmFXt-JtF7y+ z@=INWw5~$>5qL+zT%URPFR&E;kAx=LZya#ynWcSf|0a5$o9G?PEkrMW;hu{-wLNrRFJBHq zr>npeE2Rp*qnwDu&wS+02j9)0iS}-7dMve%4eVD=BdPclfu(;2mXu$KZ@iD_s%Z4) zH@u0eNORX;m#?J>?8k^5!tW?EQA@Js3Tx5EOdPp{!at$Sk>t)euA~{R%cQ{Q7mhSn zSpT6}=@|+CF@q*WU80DJ45#`sHaJivm4Z6v2o?U!0q{FXUJv}0o_XRJFSRNruOfa2 z+n_+u{?QuMkXm;~ z-uiN^8(S!}Z~pB+DJQ!g{Qj!Ew(I+jS1FZl-MS^{Cj7t)dMUg7%jokCv^VJKVg9h; zt);3zmCz~pPArAQs#9yNs&9>csJtd!e}Nb9!B>Frq1lcd{T33`gEF?YjF1fu;-z0^@=NTy?BW9bF1xrGewSUmR^B?s&N|PY4L=c`=bti1zI>*iF&cWpSI=xD L|2p{q9U$~S)@|t_ diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Session.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Session.php deleted file mode 100644 index 049e1ceb29f835497e6bd1247d6a20a5a5f14858..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6680 zcmds6&2t-B5s&0Jv07Tkd3K1R^@fR(C3X@^DeVV~67Q~L$&MlZz%tonOSMzu(UUY} zJTp5V_Bt+KxO0IkTsU&z%)bDffZ_lr4sh8!Ra>0s_c0^c9?7yPF8E-5yzYLlyMO)b zo~NguI9&(sDl62YuIAI0vU8yLU8*>)?c2I-Dmy{DO?uQgY=eshWGH*1l8^F`?ifNpA@r!<5eI0Oa%oM6W^bj9;EA7Abno@!WzkBY_{ z^kY$JYoRR5y{LpI+GL@?Ff>;!pSqT2Hfz+= zUBmHhcN0a+1fkdc0QHE9GuVE1F{<@3B%66qoyU-$I+!i@GBVMhe{O6L4i! z$fX6j#5X)aq#A?1s&nj1@nN2zAOpCRY~CMYnZ+(T{`*4&C6}uxjbK%M%#E~vTWWEZ zN4_k!BqZf}*dd~I5t&^Co|Kq9X~E;@lB;2~T}Ll6LJd5*kdC1>V?}xj_l%5DF_7jvR4`6bi?sRSYwJLBS zBT7O8h?s&P9Wn!%erI{aGK0c-kx27yqdmj!_35j%==|NXcng z;1Mr}HsaiCghndThAe7y8z%zt60U_{=u)kP<(8e~j(sxB=!t|CJ`;F)CM=-8?m_MY zn2!0Hq+#qeJ&;*_3&!^}GoU=3sdDn8ME(y60B)X_FR4N1SjjT}NtYfCI~-T+tJr6k z5E7SJN+oLE9j3jFa@+!{eHX^*9>#AJ%BeF!saU-V;|61&{BOn~&ApMeM*zO$Y{-wp z$&}oHw@l6I1X_n;URyMK4Sh_Jci|n+p;Yf;(sjGTW_8;ViEmLH!nrd^G6`2SKArPJ zrpQA8&a|95CBqE_*v!=)|B(W=7=0o`WoG(l!zM%Qpd(^Eau_SLpwnugWM z-r%cQm}& z?twR~suV7yO9LH#3fCl`MO6-?Q$z`_h{m5y^KJ5H`#>Vw zj%9oJY=+NeZ5yj_s3R}nRxCa6j&PmpzBlZ2F|@!`^S>B_S!5up?P7|L_ap@F|HCXW z3sWBYW>PiqalBy27EE7FW)p*28>@sf$o_vkDX^N#!-MhG2dcs3f+=DcK>SXLXW z>nqPue0#f&0!#I&WWEfks56u6vYm^E5kBGPPBu~YoRQ+wf4&RQ>&{G>-KdEPL_8iG z@0sEWWnc?AwG#ur+-VtZ#}F$gPC0MggIPYzy`gGv5Ktp3=ck&;e*rgR?C|M*31$W= zrb|Odo5*B-0aDQif=AT^}DpZxhBKTrNPng5VokRHl`d=Y{9V|-fmiVuo7T3CK~b&6jc zl|{c5qeMCJ;Pb8g+HhrR?HR6Zu{nlW3_P5M@l|dXYjY)E9b_|nRADC0KHL}iSECy` z|3Uv&nU-!m66oRMDfw9fZbYotpDOavupGszgxUSx1vF)vFU=($Cvso?zH)2ey~3X= zue!ePc;#Yoe}7+Y6I)9uY_x56_t9D6y{)QWkHKxcyBOj?H6!a_lihM} zCO-dIfIhsANL-G2*(M?=8&_HcHd^nds!k@!_ISzG>fGPlAn^b1S;;;a^3=oem; zzOMW+Im%Vb!>Ak%<-4Pk$O|jyh%^QYA4At+-=`y45{IlZj(T;`Gx}+a(Ow-KhHr-) xt9w2ReW&w^=Q``o72L_U-@6~(c0Lk6F7*8t!LCOPJ?3`^E-8L5ID#X9{{R*s$yfjY diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/SessionEntityType.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/SessionEntityType.php deleted file mode 100644 index 51d43436e46cc34ccd380add5212c419110897f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5745 zcmcIo&u<$=6vlR2(WwOO5+$vxwp%x-sY!Mvw-Ul7rJL9ZQR~`D(^j!8ne}>{ELra^ zJL9Aw@+AkvjRWF>kPrn4i6bEX0)&7g+;ZZ;seeJmiP@Rmwd0+&vu>M1{A1^R@6CJf z`{sGxeb3&s!4+{Cn$S@(Y>JIt5pP1#b}VdZmLWDetrm1d&1&1a0Ub#c3uWPQ)G1<4d%rS%i1uYtQl6PDK~Z1ur^wTwIgrmWCRh?Ewc_ytmEA}-nF4b9ROge zZHR1DgW_^!p#-toRIyrHrdYK_7pqnXuxbx;Hv!NL6(R9H!z@zBHG&BCfJpxAPQ%bO z5n&aRmuVfHwbYQ=C zQFI{gIOa_nw+qk>-qkpnQ*6Dan5N}s!7@=k-`i6UBFb>l&`G7@*(~YMXfD7_bz8Tb zc&4k+YoQ|t$?1z)uMv*!J*XkcV6koE-7!q*#!D*N;@i@;nY*QXO`%DA~?)R0lZ3` z=n$PviK&@Wxw&D$491lx50Ro|_7gw|dl069SiHBkvbJ6?KP;}Ut`v&(QkndFaPNMl zxVW;kQY@T)MYs$ua98;@rxU^zaEZI*{)0;8Zm~q3olfR|Pd!zBO@X)i8iu8a^a_%Q z=*ywB2t`t-521#Uyyv~^%IXHmh_CbH0b=Uhm1&}O-OZD4*$1lsU7;Nb1I=ySvCKAE zPK|<3UAcpxL%wrgy7AmqIqnQgWBMrX`ESSC%6=jq_{-Q}=8FWla92k-R4}v(Kk7h) zg+*|}RvnU6k1^K?WBya-gjm&|1Sf4$?K&doDW%nMx1AHh6ae&lY;8f4(88l+BJ)WC zT#Skf+2nA7!W}T-HBA4AfJm4l$raiy3FLJXKF0OFXk7N6%zOaOFT-$p{Ol-))Wpk8 zEM{bWAzNK^Aeo~=VfkKONDa#14NksjHAZMrC@!W&-;=-}*ktsI4m`rAtG#3S6mEc1 z9qO{~3cVM6+80tnC^}wA!TCztETe&o1!%w_fj)m7b5AFL5Xux1eoKK#ekTj>_;GX2 zUx{zybwoNpjwvHf=I7-8-~WD|{4OcnaOdnjM(_DRjk1HnoIRw-)sk>$sNEr<%6jUX z?FsJy+=6gB0?wCLB##PdU3he4jCkQ4D4zTYKc&C~PYQ&$ht+~-;TLh}01#@W%#Qux*k^RQd5x%qi zL~iRjyuFYeA1FNL9w?VMrJe1YY=kE%FcmSg4DZMYBfldj{lhAlmFOKt?{LX7fr{B? z)l!ye5#KIuE~^V!COd<0F`A;fo@EL%8Y6Ca-rB9gi!C>Mge1zt$kX z*Eg*G%U2R4nG1W~?8eRh56=>bC&^@C>4#)`nO?a{i|&=HR0ytIrH8r33EE)SuLgHj Wv+RDd?>aN`DwD2cSB_oK1>k>5augB( diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ValidationResult.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/ValidationResult.php deleted file mode 100644 index 9baa2f455897615e8d5f736e100c23154b2224af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1126 zcmb7DQE$>v6t;j4?$lx960!$##3k#ZmZbW`WQIW@O%w=2j0*|5lnc8_*W28Ci=`0d@(rdnX@>#HtF9+A-6p5iyOLDbr|Z9U47xt+bQ=dx3K)?JV@&NFYRjuJ01#5E9O)c0XWh z6*ah$){C~IHZyX3Nw|-_QIiOl(?BxbQ>E4FoXB*i(I4Y*)i$D|GcXd3)#?qAHIO_c zo8198ksvO%| zaXRf{MlYcIcE8{47qj|9ly4}Y)2M$a=E`TNxK@_rOilJ=k!EikYY}S1tg&sqyu*km zKQ#1A-PC^|C%f01$EoXSXUB;RR|{nql{wqII2=%QbZeJ_$LNKG8P^X@FiOx!j2Htr3nZle8|;5}|*}7;6du diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Version.php b/owl-bot-staging/Dialogflow/v2/proto/src/GPBMetadata/Google/Cloud/Dialogflow/V2/Version.php deleted file mode 100644 index b1f9bc09a0945675df9294d88105e9ba9aede058..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3769 zcmbtX&u<$=6lR?^Z6-~dPNURyrLuJ@>V#w$Oc1I=3Y++cETyq!Cqa!Yto3^AELra^ zyR%74WC;+W7fv9!apB0nfy4oc3*2(bffFZ=2ytL`W_E4Ij_ZV6yxDp0&HLW>zPB^) zzGv^*U{1^-6FDkIb+Ptb#Cu4z9Sd8UWr#Je(Lj!Aw!}<2zjdFu zx|Zi?C?z&6t7#xvGc2zz*LBsfnhnD`ln;{f0did3G9?-m08?!t*H$$o=89`i5LW9d zRx3H`Us?D4E9ua`vXfi^Kr>X=6?a%1a0Ep1XL~h6*F+bqnEX7@-KuWtm^kX65FD#w zLp5APeEV%1o~dDykmx%UObsRGMHbVyePCMz_o^6VRP;+h%23Ih7&)eDRMN=R9Nos2 zQzWLTR1@K_fc~4rJm1z2r#Hj|%Q2PeOLA4jj)%H;7exnQ&oNhM-hO~~_*5BCFU8g? zifLMY6)e+Dr8<~8Af+|9_&k7W$Cfb8$+qr!#>CowIo93d>$WyFJ?hvRGGjSvy`Zy zq>iAZgJkSBkD}T-5uDE<(^l-&u7!qARJF#L;s$rR3>;1eU%Jbes7gt{%g8S{Ukv0O zF0$w?Qr1&jhZZ=f9W#jkGzPA41;d-*l0OBaf+!>=*2YehF&G7tb*?MY$k9l!BEY-g zI-ej_(`(g`6CERqmzmo#nA99ZMpxC}FM5frOeSLz!@_nZSfr3h=9LBGz9v04I!+v} zC*KSl22@+(Ne91W>PX|nKLAsFmA!@cKx`*dD(4HE)$*3IwOy`mZhH3=*N-mB=)f zgHpau3jPt&uqz+&r?#v%NlOG{mn`t|wc+~%j15a;vqL@#9?y;t|4ab4Hgp&B?cEak z*dr2wkHEOCI%HeU>HLWj`A3<9BOsUs6E?}X>XN}td8gD0@HPPSJ+}6dNjayjBE%bD zrZ)xGCZi9*x4~78)FoMrkw%ysfmgE64HG@X)vnEG_r*8B%^V7l20-8GXN(pzBqY=;8fU54b4G|)0oq$~G%9V=XM@K*tVPNTx5Vfl9K0(hfn zB);E+$e-PPctSYxLOVos+OiK%x7V>kzY6d#0ZjEM1rDX4$MjsNUI-MH9UqaXRG^IA z)%XP%3*C>E>#Qjjxq9K35ir%G#^I2AOwR@Rdj|PaAt}+8;|WNoi8}QOS!jpJ?`D#z zp{_$Y4#ONPxA@+RT{8pzOt|lv2Ez-{V;U4A^z0Zk@d9J}rHFTz7Z}N> zEr$Z+O&ojni*o18ulH}t(>;uBHzmu5hlf1f@YAk(c#mDAmTW`C4a;dQzRbL{)!MfL zxJOP1K@kQVY1Xds@mTZ=R1|g}Gb4U#@{boytNRj1QX})Jvxi+<>Hg<$LHHpONoRkI y#B%f+C$0O}I4K=oQP^N1GE=tsrU1-{%4ZwfVinternalAddGeneratedFile( - ' -Ó -(google/cloud/dialogflow/v2/webhook.protogoogle.cloud.dialogflow.v2\'google/cloud/dialogflow/v2/intent.proto(google/cloud/dialogflow/v2/session.proto4google/cloud/dialogflow/v2/session_entity_type.protogoogle/protobuf/struct.proto"Ö -WebhookRequest -session (  - response_id ( = - query_result ( 2\'.google.cloud.dialogflow.v2.QueryResult_ -original_detect_intent_request ( 27.google.cloud.dialogflow.v2.OriginalDetectIntentRequest"€ -WebhookResponse -fulfillment_text ( H -fulfillment_messages ( 2*.google.cloud.dialogflow.v2.Intent.Message -source ( ( -payload ( 2.google.protobuf.Struct< -output_contexts ( 2#.google.cloud.dialogflow.v2.ContextD -followup_event_input ( 2&.google.cloud.dialogflow.v2.EventInputK -session_entity_types - ( 2-.google.cloud.dialogflow.v2.SessionEntityType"h -OriginalDetectIntentRequest -source (  -version ( ( -payload ( 2.google.protobuf.StructB• -com.google.cloud.dialogflow.v2B WebhookProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbø¢DFªGoogle.Cloud.Dialogflow.V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent.php deleted file mode 100644 index 664ea58c7fc0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent.php +++ /dev/null @@ -1,541 +0,0 @@ -google.cloud.dialogflow.v2.Agent - */ -class Agent extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project of this agent. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name of this agent. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Required. The default language of the agent as a language tag. See - * [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. This field cannot be - * set by the `Update` method. - * - * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $default_language_code = ''; - /** - * Optional. The list of all languages supported by this agent (except for the - * `default_language_code`). - * - * Generated from protobuf field repeated string supported_language_codes = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $supported_language_codes; - /** - * Required. The time zone of this agent from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. - * - * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $time_zone = ''; - /** - * Optional. The description of this agent. - * The maximum length is 500 characters. If exceeded, the request is rejected. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. The URI of the agent's avatar. - * Avatars are used throughout the Dialogflow console and in the self-hosted - * [Web - * Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) - * integration. - * - * Generated from protobuf field string avatar_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $avatar_uri = ''; - /** - * Optional. Determines whether this agent should log conversation queries. - * - * Generated from protobuf field bool enable_logging = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_logging = false; - /** - * Optional. Determines how intents are detected from user queries. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $match_mode = 0; - /** - * Optional. To filter out false positive results and still get variety in - * matched natural language inputs for your agent, you can tune the machine - * learning classification threshold. If the returned score value is less than - * the threshold value, then a fallback intent will be triggered or, if there - * are no fallback intents defined, no intent will be triggered. The score - * values range from 0.0 (completely uncertain) to 1.0 (completely certain). - * If set to 0.0, the default of 0.3 is used. - * - * Generated from protobuf field float classification_threshold = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $classification_threshold = 0.0; - /** - * Optional. API version displayed in Dialogflow console. If not specified, - * V2 API is assumed. Clients are free to query different service endpoints - * for different API versions. However, bots connectors and webhook calls will - * follow the specified API version. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.ApiVersion api_version = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $api_version = 0; - /** - * Optional. The agent tier. If not specified, TIER_STANDARD is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.Tier tier = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tier = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project of this agent. - * Format: `projects/`. - * @type string $display_name - * Required. The name of this agent. - * @type string $default_language_code - * Required. The default language of the agent as a language tag. See - * [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. This field cannot be - * set by the `Update` method. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_language_codes - * Optional. The list of all languages supported by this agent (except for the - * `default_language_code`). - * @type string $time_zone - * Required. The time zone of this agent from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. - * @type string $description - * Optional. The description of this agent. - * The maximum length is 500 characters. If exceeded, the request is rejected. - * @type string $avatar_uri - * Optional. The URI of the agent's avatar. - * Avatars are used throughout the Dialogflow console and in the self-hosted - * [Web - * Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) - * integration. - * @type bool $enable_logging - * Optional. Determines whether this agent should log conversation queries. - * @type int $match_mode - * Optional. Determines how intents are detected from user queries. - * @type float $classification_threshold - * Optional. To filter out false positive results and still get variety in - * matched natural language inputs for your agent, you can tune the machine - * learning classification threshold. If the returned score value is less than - * the threshold value, then a fallback intent will be triggered or, if there - * are no fallback intents defined, no intent will be triggered. The score - * values range from 0.0 (completely uncertain) to 1.0 (completely certain). - * If set to 0.0, the default of 0.3 is used. - * @type int $api_version - * Optional. API version displayed in Dialogflow console. If not specified, - * V2 API is assumed. Clients are free to query different service endpoints - * for different API versions. However, bots connectors and webhook calls will - * follow the specified API version. - * @type int $tier - * Optional. The agent tier. If not specified, TIER_STANDARD is assumed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project of this agent. - * Format: `projects/`. - * - * 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 project of this agent. - * Format: `projects/`. - * - * 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 name of this agent. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The name of this agent. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. The default language of the agent as a language tag. See - * [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. This field cannot be - * set by the `Update` method. - * - * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDefaultLanguageCode() - { - return $this->default_language_code; - } - - /** - * Required. The default language of the agent as a language tag. See - * [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. This field cannot be - * set by the `Update` method. - * - * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDefaultLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->default_language_code = $var; - - return $this; - } - - /** - * Optional. The list of all languages supported by this agent (except for the - * `default_language_code`). - * - * Generated from protobuf field repeated string supported_language_codes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedLanguageCodes() - { - return $this->supported_language_codes; - } - - /** - * Optional. The list of all languages supported by this agent (except for the - * `default_language_code`). - * - * Generated from protobuf field repeated string supported_language_codes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedLanguageCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->supported_language_codes = $arr; - - return $this; - } - - /** - * Required. The time zone of this agent from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. - * - * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * Required. The time zone of this agent from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. - * - * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * Optional. The description of this agent. - * The maximum length is 500 characters. If exceeded, the request is rejected. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The description of this agent. - * The maximum length is 500 characters. If exceeded, the request is rejected. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. The URI of the agent's avatar. - * Avatars are used throughout the Dialogflow console and in the self-hosted - * [Web - * Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) - * integration. - * - * Generated from protobuf field string avatar_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAvatarUri() - { - return $this->avatar_uri; - } - - /** - * Optional. The URI of the agent's avatar. - * Avatars are used throughout the Dialogflow console and in the self-hosted - * [Web - * Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) - * integration. - * - * Generated from protobuf field string avatar_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAvatarUri($var) - { - GPBUtil::checkString($var, True); - $this->avatar_uri = $var; - - return $this; - } - - /** - * Optional. Determines whether this agent should log conversation queries. - * - * Generated from protobuf field bool enable_logging = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableLogging() - { - return $this->enable_logging; - } - - /** - * Optional. Determines whether this agent should log conversation queries. - * - * Generated from protobuf field bool enable_logging = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableLogging($var) - { - GPBUtil::checkBool($var); - $this->enable_logging = $var; - - return $this; - } - - /** - * Optional. Determines how intents are detected from user queries. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return int - * @deprecated - */ - public function getMatchMode() - { - @trigger_error('match_mode is deprecated.', E_USER_DEPRECATED); - return $this->match_mode; - } - - /** - * Optional. Determines how intents are detected from user queries. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - * @deprecated - */ - public function setMatchMode($var) - { - @trigger_error('match_mode is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Agent\MatchMode::class); - $this->match_mode = $var; - - return $this; - } - - /** - * Optional. To filter out false positive results and still get variety in - * matched natural language inputs for your agent, you can tune the machine - * learning classification threshold. If the returned score value is less than - * the threshold value, then a fallback intent will be triggered or, if there - * are no fallback intents defined, no intent will be triggered. The score - * values range from 0.0 (completely uncertain) to 1.0 (completely certain). - * If set to 0.0, the default of 0.3 is used. - * - * Generated from protobuf field float classification_threshold = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getClassificationThreshold() - { - return $this->classification_threshold; - } - - /** - * Optional. To filter out false positive results and still get variety in - * matched natural language inputs for your agent, you can tune the machine - * learning classification threshold. If the returned score value is less than - * the threshold value, then a fallback intent will be triggered or, if there - * are no fallback intents defined, no intent will be triggered. The score - * values range from 0.0 (completely uncertain) to 1.0 (completely certain). - * If set to 0.0, the default of 0.3 is used. - * - * Generated from protobuf field float classification_threshold = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setClassificationThreshold($var) - { - GPBUtil::checkFloat($var); - $this->classification_threshold = $var; - - return $this; - } - - /** - * Optional. API version displayed in Dialogflow console. If not specified, - * V2 API is assumed. Clients are free to query different service endpoints - * for different API versions. However, bots connectors and webhook calls will - * follow the specified API version. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.ApiVersion api_version = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Optional. API version displayed in Dialogflow console. If not specified, - * V2 API is assumed. Clients are free to query different service endpoints - * for different API versions. However, bots connectors and webhook calls will - * follow the specified API version. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.ApiVersion api_version = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Agent\ApiVersion::class); - $this->api_version = $var; - - return $this; - } - - /** - * Optional. The agent tier. If not specified, TIER_STANDARD is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.Tier tier = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTier() - { - return $this->tier; - } - - /** - * Optional. The agent tier. If not specified, TIER_STANDARD is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent.Tier tier = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Agent\Tier::class); - $this->tier = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/ApiVersion.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/ApiVersion.php deleted file mode 100644 index 39e0da50ffd4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/ApiVersion.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.Agent.ApiVersion - */ -class ApiVersion -{ - /** - * Not specified. - * - * Generated from protobuf enum API_VERSION_UNSPECIFIED = 0; - */ - const API_VERSION_UNSPECIFIED = 0; - /** - * Legacy V1 API. - * - * Generated from protobuf enum API_VERSION_V1 = 1; - */ - const API_VERSION_V1 = 1; - /** - * V2 API. - * - * Generated from protobuf enum API_VERSION_V2 = 2; - */ - const API_VERSION_V2 = 2; - /** - * V2beta1 API. - * - * Generated from protobuf enum API_VERSION_V2_BETA_1 = 3; - */ - const API_VERSION_V2_BETA_1 = 3; - - private static $valueToName = [ - self::API_VERSION_UNSPECIFIED => 'API_VERSION_UNSPECIFIED', - self::API_VERSION_V1 => 'API_VERSION_V1', - self::API_VERSION_V2 => 'API_VERSION_V2', - self::API_VERSION_V2_BETA_1 => 'API_VERSION_V2_BETA_1', - ]; - - 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(ApiVersion::class, \Google\Cloud\Dialogflow\V2\Agent_ApiVersion::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/MatchMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/MatchMode.php deleted file mode 100644 index e1e08fd21806..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/MatchMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.dialogflow.v2.Agent.MatchMode - */ -class MatchMode -{ - /** - * Not specified. - * - * Generated from protobuf enum MATCH_MODE_UNSPECIFIED = 0; - */ - const MATCH_MODE_UNSPECIFIED = 0; - /** - * Best for agents with a small number of examples in intents and/or wide - * use of templates syntax and composite entities. - * - * Generated from protobuf enum MATCH_MODE_HYBRID = 1; - */ - const MATCH_MODE_HYBRID = 1; - /** - * Can be used for agents with a large number of examples in intents, - * especially the ones using @sys.any or very large custom entities. - * - * Generated from protobuf enum MATCH_MODE_ML_ONLY = 2; - */ - const MATCH_MODE_ML_ONLY = 2; - - private static $valueToName = [ - self::MATCH_MODE_UNSPECIFIED => 'MATCH_MODE_UNSPECIFIED', - self::MATCH_MODE_HYBRID => 'MATCH_MODE_HYBRID', - self::MATCH_MODE_ML_ONLY => 'MATCH_MODE_ML_ONLY', - ]; - - 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(MatchMode::class, \Google\Cloud\Dialogflow\V2\Agent_MatchMode::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/Tier.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/Tier.php deleted file mode 100644 index c20b42316e00..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent/Tier.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.Agent.Tier - */ -class Tier -{ - /** - * Not specified. This value should never be used. - * - * Generated from protobuf enum TIER_UNSPECIFIED = 0; - */ - const TIER_UNSPECIFIED = 0; - /** - * Trial Edition, previously known as Standard Edition. - * - * Generated from protobuf enum TIER_STANDARD = 1; - */ - const TIER_STANDARD = 1; - /** - * Essentials Edition, previously known as Enterprise Essential Edition. - * - * Generated from protobuf enum TIER_ENTERPRISE = 2; - */ - const TIER_ENTERPRISE = 2; - /** - * Essentials Edition (same as TIER_ENTERPRISE), previously known as - * Enterprise Plus Edition. - * - * Generated from protobuf enum TIER_ENTERPRISE_PLUS = 3 [deprecated = true]; - */ - const TIER_ENTERPRISE_PLUS = 3; - - private static $valueToName = [ - self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', - self::TIER_STANDARD => 'TIER_STANDARD', - self::TIER_ENTERPRISE => 'TIER_ENTERPRISE', - self::TIER_ENTERPRISE_PLUS => 'TIER_ENTERPRISE_PLUS', - ]; - - 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(Tier::class, \Google\Cloud\Dialogflow\V2\Agent_Tier::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback.php deleted file mode 100644 index 0317768299a3..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.dialogflow.v2.AgentAssistantFeedback - */ -class AgentAssistantFeedback extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether or not the suggested answer is relevant. - * For example: - * * Query: "Can I change my mailing address?" - * * Suggested document says: "Items must be returned/exchanged within 60 - * days of the purchase date." - * * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance answer_relevance = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $answer_relevance = 0; - /** - * Optional. Whether or not the information in the document is correct. - * For example: - * * Query: "Can I return the package in 2 days once received?" - * * Suggested document says: "Items must be returned/exchanged within 60 - * days of the purchase date." - * * Ground truth: "No return or exchange is allowed." - * * [document_correctness]: INCORRECT - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness document_correctness = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $document_correctness = 0; - /** - * Optional. Whether or not the suggested document is efficient. For example, - * if the document is poorly written, hard to understand, hard to use or - * too long to find useful information, - * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] - * is - * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency document_efficiency = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $document_efficiency = 0; - /** - * Optional. Feedback for conversation summarization. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback summarization_feedback = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $summarization_feedback = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $answer_relevance - * Optional. Whether or not the suggested answer is relevant. - * For example: - * * Query: "Can I change my mailing address?" - * * Suggested document says: "Items must be returned/exchanged within 60 - * days of the purchase date." - * * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] - * @type int $document_correctness - * Optional. Whether or not the information in the document is correct. - * For example: - * * Query: "Can I return the package in 2 days once received?" - * * Suggested document says: "Items must be returned/exchanged within 60 - * days of the purchase date." - * * Ground truth: "No return or exchange is allowed." - * * [document_correctness]: INCORRECT - * @type int $document_efficiency - * Optional. Whether or not the suggested document is efficient. For example, - * if the document is poorly written, hard to understand, hard to use or - * too long to find useful information, - * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] - * is - * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. - * @type \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback $summarization_feedback - * Optional. Feedback for conversation summarization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether or not the suggested answer is relevant. - * For example: - * * Query: "Can I change my mailing address?" - * * Suggested document says: "Items must be returned/exchanged within 60 - * days of the purchase date." - * * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance answer_relevance = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAnswerRelevance() - { - return $this->answer_relevance; - } - - /** - * Optional. Whether or not the suggested answer is relevant. - * For example: - * * Query: "Can I change my mailing address?" - * * Suggested document says: "Items must be returned/exchanged within 60 - * days of the purchase date." - * * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance answer_relevance = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAnswerRelevance($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\AnswerRelevance::class); - $this->answer_relevance = $var; - - return $this; - } - - /** - * Optional. Whether or not the information in the document is correct. - * For example: - * * Query: "Can I return the package in 2 days once received?" - * * Suggested document says: "Items must be returned/exchanged within 60 - * days of the purchase date." - * * Ground truth: "No return or exchange is allowed." - * * [document_correctness]: INCORRECT - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness document_correctness = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDocumentCorrectness() - { - return $this->document_correctness; - } - - /** - * Optional. Whether or not the information in the document is correct. - * For example: - * * Query: "Can I return the package in 2 days once received?" - * * Suggested document says: "Items must be returned/exchanged within 60 - * days of the purchase date." - * * Ground truth: "No return or exchange is allowed." - * * [document_correctness]: INCORRECT - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness document_correctness = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDocumentCorrectness($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\DocumentCorrectness::class); - $this->document_correctness = $var; - - return $this; - } - - /** - * Optional. Whether or not the suggested document is efficient. For example, - * if the document is poorly written, hard to understand, hard to use or - * too long to find useful information, - * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] - * is - * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency document_efficiency = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDocumentEfficiency() - { - return $this->document_efficiency; - } - - /** - * Optional. Whether or not the suggested document is efficient. For example, - * if the document is poorly written, hard to understand, hard to use or - * too long to find useful information, - * [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] - * is - * [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency document_efficiency = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDocumentEfficiency($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\DocumentEfficiency::class); - $this->document_efficiency = $var; - - return $this; - } - - /** - * Optional. Feedback for conversation summarization. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback summarization_feedback = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback|null - */ - public function getSummarizationFeedback() - { - return $this->summarization_feedback; - } - - public function hasSummarizationFeedback() - { - return isset($this->summarization_feedback); - } - - public function clearSummarizationFeedback() - { - unset($this->summarization_feedback); - } - - /** - * Optional. Feedback for conversation summarization. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedback summarization_feedback = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback $var - * @return $this - */ - public function setSummarizationFeedback($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback\SummarizationFeedback::class); - $this->summarization_feedback = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/AnswerRelevance.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/AnswerRelevance.php deleted file mode 100644 index f3f32765064b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/AnswerRelevance.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance - */ -class AnswerRelevance -{ - /** - * Answer relevance unspecified. - * - * Generated from protobuf enum ANSWER_RELEVANCE_UNSPECIFIED = 0; - */ - const ANSWER_RELEVANCE_UNSPECIFIED = 0; - /** - * Answer is irrelevant to query. - * - * Generated from protobuf enum IRRELEVANT = 1; - */ - const IRRELEVANT = 1; - /** - * Answer is relevant to query. - * - * Generated from protobuf enum RELEVANT = 2; - */ - const RELEVANT = 2; - - private static $valueToName = [ - self::ANSWER_RELEVANCE_UNSPECIFIED => 'ANSWER_RELEVANCE_UNSPECIFIED', - self::IRRELEVANT => 'IRRELEVANT', - self::RELEVANT => 'RELEVANT', - ]; - - 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(AnswerRelevance::class, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback_AnswerRelevance::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentCorrectness.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentCorrectness.php deleted file mode 100644 index 51a3988cfaa8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentCorrectness.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness - */ -class DocumentCorrectness -{ - /** - * Document correctness unspecified. - * - * Generated from protobuf enum DOCUMENT_CORRECTNESS_UNSPECIFIED = 0; - */ - const DOCUMENT_CORRECTNESS_UNSPECIFIED = 0; - /** - * Information in document is incorrect. - * - * Generated from protobuf enum INCORRECT = 1; - */ - const INCORRECT = 1; - /** - * Information in document is correct. - * - * Generated from protobuf enum CORRECT = 2; - */ - const CORRECT = 2; - - private static $valueToName = [ - self::DOCUMENT_CORRECTNESS_UNSPECIFIED => 'DOCUMENT_CORRECTNESS_UNSPECIFIED', - self::INCORRECT => 'INCORRECT', - self::CORRECT => '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(DocumentCorrectness::class, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback_DocumentCorrectness::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentEfficiency.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentEfficiency.php deleted file mode 100644 index 70517d74d9bb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback/DocumentEfficiency.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency - */ -class DocumentEfficiency -{ - /** - * Document efficiency unspecified. - * - * Generated from protobuf enum DOCUMENT_EFFICIENCY_UNSPECIFIED = 0; - */ - const DOCUMENT_EFFICIENCY_UNSPECIFIED = 0; - /** - * Document is inefficient. - * - * Generated from protobuf enum INEFFICIENT = 1; - */ - const INEFFICIENT = 1; - /** - * Document is efficient. - * - * Generated from protobuf enum EFFICIENT = 2; - */ - const EFFICIENT = 2; - - private static $valueToName = [ - self::DOCUMENT_EFFICIENCY_UNSPECIFIED => 'DOCUMENT_EFFICIENCY_UNSPECIFIED', - self::INEFFICIENT => 'INEFFICIENT', - self::EFFICIENT => 'EFFICIENT', - ]; - - 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(DocumentEfficiency::class, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback_DocumentEfficiency::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_AnswerRelevance.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_AnswerRelevance.php deleted file mode 100644 index 584321513a5a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AgentAssistantFeedback_AnswerRelevance.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.AgentAssistantRecord - */ -class AgentAssistantRecord extends \Google\Protobuf\Internal\Message -{ - protected $answer; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\ArticleAnswer $article_suggestion_answer - * Output only. The article suggestion answer. - * @type \Google\Cloud\Dialogflow\V2\FaqAnswer $faq_answer - * Output only. The FAQ answer. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The article suggestion answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ArticleAnswer article_suggestion_answer = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\ArticleAnswer|null - */ - public function getArticleSuggestionAnswer() - { - return $this->readOneof(5); - } - - public function hasArticleSuggestionAnswer() - { - return $this->hasOneof(5); - } - - /** - * Output only. The article suggestion answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ArticleAnswer article_suggestion_answer = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\ArticleAnswer $var - * @return $this - */ - public function setArticleSuggestionAnswer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ArticleAnswer::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Output only. The FAQ answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.FaqAnswer faq_answer = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\FaqAnswer|null - */ - public function getFaqAnswer() - { - return $this->readOneof(6); - } - - public function hasFaqAnswer() - { - return $this->hasOneof(6); - } - - /** - * Output only. The FAQ answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.FaqAnswer faq_answer = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\FaqAnswer $var - * @return $this - */ - public function setFaqAnswer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\FaqAnswer::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getAnswer() - { - return $this->whichOneof("answer"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_ApiVersion.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_ApiVersion.php deleted file mode 100644 index 96aa93c23b6d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Agent_ApiVersion.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Agents/GetAgent', - $argument, - ['\Google\Cloud\Dialogflow\V2\Agent', 'decode'], - $metadata, $options); - } - - /** - * Creates/updates the specified agent. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\SetAgentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetAgent(\Google\Cloud\Dialogflow\V2\SetAgentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/SetAgent', - $argument, - ['\Google\Cloud\Dialogflow\V2\Agent', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified agent. - * @param \Google\Cloud\Dialogflow\V2\DeleteAgentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteAgent(\Google\Cloud\Dialogflow\V2\DeleteAgentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/DeleteAgent', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Returns the list of agents. - * - * Since there is at most one conversational agent per project, this method is - * useful primarily for listing all agents across projects the caller has - * access to. One can achieve that with a wildcard project collection id "-". - * Refer to [List - * Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - * @param \Google\Cloud\Dialogflow\V2\SearchAgentsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SearchAgents(\Google\Cloud\Dialogflow\V2\SearchAgentsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/SearchAgents', - $argument, - ['\Google\Cloud\Dialogflow\V2\SearchAgentsResponse', 'decode'], - $metadata, $options); - } - - /** - * Trains the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\TrainAgentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function TrainAgent(\Google\Cloud\Dialogflow\V2\TrainAgentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/TrainAgent', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Exports the specified agent to a ZIP file. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: - * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse] - * @param \Google\Cloud\Dialogflow\V2\ExportAgentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ExportAgent(\Google\Cloud\Dialogflow\V2\ExportAgentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/ExportAgent', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Imports the specified agent from a ZIP file. - * - * Uploads new intents and entity types without deleting the existing ones. - * Intents and entity types with the same name are replaced with the new - * versions from - * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After - * the import, the imported draft agent will be trained automatically (unless - * disabled in agent settings). However, once the import is done, training may - * not be completed yet. Please call - * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the - * operation it returns in order to train explicitly. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * The operation only tracks when importing is complete, not when it is done - * training. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\ImportAgentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ImportAgent(\Google\Cloud\Dialogflow\V2\ImportAgentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/ImportAgent', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Restores the specified agent from a ZIP file. - * - * Replaces the current agent version with a new one. All the intents and - * entity types in the older version are deleted. After the restore, the - * restored draft agent will be trained automatically (unless disabled in - * agent settings). However, once the restore is done, training may not be - * completed yet. Please call - * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the - * operation it returns in order to train explicitly. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * The operation only tracks when restoring is complete, not when it is done - * training. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\RestoreAgentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RestoreAgent(\Google\Cloud\Dialogflow\V2\RestoreAgentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/RestoreAgent', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets agent validation result. Agent validation is performed during - * training time and is updated automatically when training is completed. - * @param \Google\Cloud\Dialogflow\V2\GetValidationResultRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetValidationResult(\Google\Cloud\Dialogflow\V2\GetValidationResultRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Agents/GetValidationResult', - $argument, - ['\Google\Cloud\Dialogflow\V2\ValidationResult', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentRequest.php deleted file mode 100644 index 6011eb464a7b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentRequest.php +++ /dev/null @@ -1,401 +0,0 @@ -google.cloud.dialogflow.v2.AnalyzeContentRequest - */ -class AnalyzeContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the participant this text comes from. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $participant = ''; - /** - * Speech synthesis configuration. - * The speech synthesis settings for a virtual agent that may be configured - * for the associated conversation profile are not used when calling - * AnalyzeContent. If this configuration is not supplied, speech synthesis - * is disabled. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5; - */ - protected $reply_audio_config = null; - /** - * Parameters for a Dialogflow virtual-agent query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 9; - */ - protected $query_params = null; - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14; - */ - protected $assist_query_params = null; - /** - * Additional parameters to be put into Dialogflow CX session parameters. To - * remove a parameter from the session, clients should explicitly set the - * parameter value to null. - * Note: this field should only be used if you are connecting to a Dialogflow - * CX agent. - * - * Generated from protobuf field .google.protobuf.Struct cx_parameters = 18; - */ - protected $cx_parameters = null; - /** - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. - * This request is only idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 11; - */ - protected $request_id = ''; - protected $input; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $participant - * Required. The name of the participant this text comes from. - * Format: `projects//locations//conversations//participants/`. - * @type \Google\Cloud\Dialogflow\V2\TextInput $text_input - * The natural language text to be processed. - * @type \Google\Cloud\Dialogflow\V2\EventInput $event_input - * An input event to send to Dialogflow. - * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $reply_audio_config - * Speech synthesis configuration. - * The speech synthesis settings for a virtual agent that may be configured - * for the associated conversation profile are not used when calling - * AnalyzeContent. If this configuration is not supplied, speech synthesis - * is disabled. - * @type \Google\Cloud\Dialogflow\V2\QueryParameters $query_params - * Parameters for a Dialogflow virtual-agent query. - * @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params - * Parameters for a human assist query. - * @type \Google\Protobuf\Struct $cx_parameters - * Additional parameters to be put into Dialogflow CX session parameters. To - * remove a parameter from the session, clients should explicitly set the - * parameter value to null. - * Note: this field should only be used if you are connecting to a Dialogflow - * CX agent. - * @type string $request_id - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. - * This request is only idempotent if a `request_id` is provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the participant this text comes from. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParticipant() - { - return $this->participant; - } - - /** - * Required. The name of the participant this text comes from. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParticipant($var) - { - GPBUtil::checkString($var, True); - $this->participant = $var; - - return $this; - } - - /** - * The natural language text to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput text_input = 6; - * @return \Google\Cloud\Dialogflow\V2\TextInput|null - */ - public function getTextInput() - { - return $this->readOneof(6); - } - - public function hasTextInput() - { - return $this->hasOneof(6); - } - - /** - * The natural language text to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput text_input = 6; - * @param \Google\Cloud\Dialogflow\V2\TextInput $var - * @return $this - */ - public function setTextInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextInput::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * An input event to send to Dialogflow. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput event_input = 8; - * @return \Google\Cloud\Dialogflow\V2\EventInput|null - */ - public function getEventInput() - { - return $this->readOneof(8); - } - - public function hasEventInput() - { - return $this->hasOneof(8); - } - - /** - * An input event to send to Dialogflow. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput event_input = 8; - * @param \Google\Cloud\Dialogflow\V2\EventInput $var - * @return $this - */ - public function setEventInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Speech synthesis configuration. - * The speech synthesis settings for a virtual agent that may be configured - * for the associated conversation profile are not used when calling - * AnalyzeContent. If this configuration is not supplied, speech synthesis - * is disabled. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5; - * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null - */ - public function getReplyAudioConfig() - { - return $this->reply_audio_config; - } - - public function hasReplyAudioConfig() - { - return isset($this->reply_audio_config); - } - - public function clearReplyAudioConfig() - { - unset($this->reply_audio_config); - } - - /** - * Speech synthesis configuration. - * The speech synthesis settings for a virtual agent that may be configured - * for the associated conversation profile are not used when calling - * AnalyzeContent. If this configuration is not supplied, speech synthesis - * is disabled. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5; - * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var - * @return $this - */ - public function setReplyAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); - $this->reply_audio_config = $var; - - return $this; - } - - /** - * Parameters for a Dialogflow virtual-agent query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 9; - * @return \Google\Cloud\Dialogflow\V2\QueryParameters|null - */ - public function getQueryParams() - { - return $this->query_params; - } - - public function hasQueryParams() - { - return isset($this->query_params); - } - - public function clearQueryParams() - { - unset($this->query_params); - } - - /** - * Parameters for a Dialogflow virtual-agent query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 9; - * @param \Google\Cloud\Dialogflow\V2\QueryParameters $var - * @return $this - */ - public function setQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class); - $this->query_params = $var; - - return $this; - } - - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14; - * @return \Google\Cloud\Dialogflow\V2\AssistQueryParameters|null - */ - public function getAssistQueryParams() - { - return $this->assist_query_params; - } - - public function hasAssistQueryParams() - { - return isset($this->assist_query_params); - } - - public function clearAssistQueryParams() - { - unset($this->assist_query_params); - } - - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14; - * @param \Google\Cloud\Dialogflow\V2\AssistQueryParameters $var - * @return $this - */ - public function setAssistQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AssistQueryParameters::class); - $this->assist_query_params = $var; - - return $this; - } - - /** - * Additional parameters to be put into Dialogflow CX session parameters. To - * remove a parameter from the session, clients should explicitly set the - * parameter value to null. - * Note: this field should only be used if you are connecting to a Dialogflow - * CX agent. - * - * Generated from protobuf field .google.protobuf.Struct cx_parameters = 18; - * @return \Google\Protobuf\Struct|null - */ - public function getCxParameters() - { - return $this->cx_parameters; - } - - public function hasCxParameters() - { - return isset($this->cx_parameters); - } - - public function clearCxParameters() - { - unset($this->cx_parameters); - } - - /** - * Additional parameters to be put into Dialogflow CX session parameters. To - * remove a parameter from the session, clients should explicitly set the - * parameter value to null. - * Note: this field should only be used if you are connecting to a Dialogflow - * CX agent. - * - * Generated from protobuf field .google.protobuf.Struct cx_parameters = 18; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setCxParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->cx_parameters = $var; - - return $this; - } - - /** - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. - * This request is only idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 11; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. - * This request is only idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 11; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * @return string - */ - public function getInput() - { - return $this->whichOneof("input"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentResponse.php deleted file mode 100644 index 7f1ce53b0bd5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnalyzeContentResponse.php +++ /dev/null @@ -1,428 +0,0 @@ -google.cloud.dialogflow.v2.AnalyzeContentResponse - */ -class AnalyzeContentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The output text content. - * This field is set if the automated agent responded with text to show to - * the user. - * - * Generated from protobuf field string reply_text = 1; - */ - protected $reply_text = ''; - /** - * The audio data bytes encoded as specified in the request. - * This field is set if: - * - `reply_audio_config` was specified in the request, or - * - The automated agent responded with audio to play to the user. In such - * case, `reply_audio.config` contains settings used to synthesize the - * speech. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 2; - */ - protected $reply_audio = null; - /** - * Only set if a Dialogflow automated agent has responded. - * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use - * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] - * instead. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 3; - */ - protected $automated_agent_reply = null; - /** - * Message analyzed by CCAI. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 5; - */ - protected $message = null; - /** - * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. - * Note that any failure of Agent Assist features will not lead to the overall - * failure of an AnalyzeContent API call. Instead, the features will - * fail silently with the error field set in the corresponding - * SuggestionResult. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 6; - */ - private $human_agent_suggestion_results; - /** - * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. - * Same as human_agent_suggestion_results, any failure of Agent Assist - * features will not lead to the overall failure of an AnalyzeContent API - * call. Instead, the features will fail silently with the error field set in - * the corresponding SuggestionResult. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 7; - */ - private $end_user_suggestion_results; - /** - * Indicates the parameters of DTMF. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 9; - */ - protected $dtmf_parameters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $reply_text - * The output text content. - * This field is set if the automated agent responded with text to show to - * the user. - * @type \Google\Cloud\Dialogflow\V2\OutputAudio $reply_audio - * The audio data bytes encoded as specified in the request. - * This field is set if: - * - `reply_audio_config` was specified in the request, or - * - The automated agent responded with audio to play to the user. In such - * case, `reply_audio.config` contains settings used to synthesize the - * speech. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * @type \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $automated_agent_reply - * Only set if a Dialogflow automated agent has responded. - * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use - * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] - * instead. - * @type \Google\Cloud\Dialogflow\V2\Message $message - * Message analyzed by CCAI. - * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $human_agent_suggestion_results - * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. - * Note that any failure of Agent Assist features will not lead to the overall - * failure of an AnalyzeContent API call. Instead, the features will - * fail silently with the error field set in the corresponding - * SuggestionResult. - * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $end_user_suggestion_results - * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. - * Same as human_agent_suggestion_results, any failure of Agent Assist - * features will not lead to the overall failure of an AnalyzeContent API - * call. Instead, the features will fail silently with the error field set in - * the corresponding SuggestionResult. - * @type \Google\Cloud\Dialogflow\V2\DtmfParameters $dtmf_parameters - * Indicates the parameters of DTMF. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * The output text content. - * This field is set if the automated agent responded with text to show to - * the user. - * - * Generated from protobuf field string reply_text = 1; - * @return string - */ - public function getReplyText() - { - return $this->reply_text; - } - - /** - * The output text content. - * This field is set if the automated agent responded with text to show to - * the user. - * - * Generated from protobuf field string reply_text = 1; - * @param string $var - * @return $this - */ - public function setReplyText($var) - { - GPBUtil::checkString($var, True); - $this->reply_text = $var; - - return $this; - } - - /** - * The audio data bytes encoded as specified in the request. - * This field is set if: - * - `reply_audio_config` was specified in the request, or - * - The automated agent responded with audio to play to the user. In such - * case, `reply_audio.config` contains settings used to synthesize the - * speech. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 2; - * @return \Google\Cloud\Dialogflow\V2\OutputAudio|null - */ - public function getReplyAudio() - { - return $this->reply_audio; - } - - public function hasReplyAudio() - { - return isset($this->reply_audio); - } - - public function clearReplyAudio() - { - unset($this->reply_audio); - } - - /** - * The audio data bytes encoded as specified in the request. - * This field is set if: - * - `reply_audio_config` was specified in the request, or - * - The automated agent responded with audio to play to the user. In such - * case, `reply_audio.config` contains settings used to synthesize the - * speech. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 2; - * @param \Google\Cloud\Dialogflow\V2\OutputAudio $var - * @return $this - */ - public function setReplyAudio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudio::class); - $this->reply_audio = $var; - - return $this; - } - - /** - * Only set if a Dialogflow automated agent has responded. - * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use - * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] - * instead. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 3; - * @return \Google\Cloud\Dialogflow\V2\AutomatedAgentReply|null - */ - public function getAutomatedAgentReply() - { - return $this->automated_agent_reply; - } - - public function hasAutomatedAgentReply() - { - return isset($this->automated_agent_reply); - } - - public function clearAutomatedAgentReply() - { - unset($this->automated_agent_reply); - } - - /** - * Only set if a Dialogflow automated agent has responded. - * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use - * [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] - * instead. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 3; - * @param \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $var - * @return $this - */ - public function setAutomatedAgentReply($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AutomatedAgentReply::class); - $this->automated_agent_reply = $var; - - return $this; - } - - /** - * Message analyzed by CCAI. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 5; - * @return \Google\Cloud\Dialogflow\V2\Message|null - */ - public function getMessage() - { - return $this->message; - } - - public function hasMessage() - { - return isset($this->message); - } - - public function clearMessage() - { - unset($this->message); - } - - /** - * Message analyzed by CCAI. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 5; - * @param \Google\Cloud\Dialogflow\V2\Message $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Message::class); - $this->message = $var; - - return $this; - } - - /** - * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. - * Note that any failure of Agent Assist features will not lead to the overall - * failure of an AnalyzeContent API call. Instead, the features will - * fail silently with the error field set in the corresponding - * SuggestionResult. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHumanAgentSuggestionResults() - { - return $this->human_agent_suggestion_results; - } - - /** - * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. - * Note that any failure of Agent Assist features will not lead to the overall - * failure of an AnalyzeContent API call. Instead, the features will - * fail silently with the error field set in the corresponding - * SuggestionResult. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 6; - * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHumanAgentSuggestionResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); - $this->human_agent_suggestion_results = $arr; - - return $this; - } - - /** - * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. - * Same as human_agent_suggestion_results, any failure of Agent Assist - * features will not lead to the overall failure of an AnalyzeContent API - * call. Instead, the features will fail silently with the error field set in - * the corresponding SuggestionResult. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndUserSuggestionResults() - { - return $this->end_user_suggestion_results; - } - - /** - * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. - * Same as human_agent_suggestion_results, any failure of Agent Assist - * features will not lead to the overall failure of an AnalyzeContent API - * call. Instead, the features will fail silently with the error field set in - * the corresponding SuggestionResult. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 7; - * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndUserSuggestionResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); - $this->end_user_suggestion_results = $arr; - - return $this; - } - - /** - * Indicates the parameters of DTMF. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 9; - * @return \Google\Cloud\Dialogflow\V2\DtmfParameters|null - */ - public function getDtmfParameters() - { - return $this->dtmf_parameters; - } - - public function hasDtmfParameters() - { - return isset($this->dtmf_parameters); - } - - public function clearDtmfParameters() - { - unset($this->dtmf_parameters); - } - - /** - * Indicates the parameters of DTMF. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 9; - * @param \Google\Cloud\Dialogflow\V2\DtmfParameters $var - * @return $this - */ - public function setDtmfParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\DtmfParameters::class); - $this->dtmf_parameters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnnotatedMessagePart.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnnotatedMessagePart.php deleted file mode 100644 index 932abff578cc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnnotatedMessagePart.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.dialogflow.v2.AnnotatedMessagePart - */ -class AnnotatedMessagePart extends \Google\Protobuf\Internal\Message -{ - /** - * A part of a message possibly annotated with an entity. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * The [Dialogflow system entity - * type](https://cloud.google.com/dialogflow/docs/reference/system-entities) - * of this message part. If this is empty, Dialogflow could not annotate the - * phrase part with a system entity. - * - * Generated from protobuf field string entity_type = 2; - */ - protected $entity_type = ''; - /** - * The [Dialogflow system entity formatted value - * ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of - * this message part. For example for a system entity of type - * `@sys.unit-currency`, this may contain: - *
-     * {
-     *   "amount": 5,
-     *   "currency": "USD"
-     * }
-     * 
- * - * Generated from protobuf field .google.protobuf.Value formatted_value = 3; - */ - protected $formatted_value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * A part of a message possibly annotated with an entity. - * @type string $entity_type - * The [Dialogflow system entity - * type](https://cloud.google.com/dialogflow/docs/reference/system-entities) - * of this message part. If this is empty, Dialogflow could not annotate the - * phrase part with a system entity. - * @type \Google\Protobuf\Value $formatted_value - * The [Dialogflow system entity formatted value - * ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of - * this message part. For example for a system entity of type - * `@sys.unit-currency`, this may contain: - *
-     *           {
-     *             "amount": 5,
-     *             "currency": "USD"
-     *           }
-     *           
- * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * A part of a message possibly annotated with an entity. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * A part of a message possibly annotated with an entity. - * - * 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 [Dialogflow system entity - * type](https://cloud.google.com/dialogflow/docs/reference/system-entities) - * of this message part. If this is empty, Dialogflow could not annotate the - * phrase part with a system entity. - * - * Generated from protobuf field string entity_type = 2; - * @return string - */ - public function getEntityType() - { - return $this->entity_type; - } - - /** - * The [Dialogflow system entity - * type](https://cloud.google.com/dialogflow/docs/reference/system-entities) - * of this message part. If this is empty, Dialogflow could not annotate the - * phrase part with a system entity. - * - * Generated from protobuf field string entity_type = 2; - * @param string $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkString($var, True); - $this->entity_type = $var; - - return $this; - } - - /** - * The [Dialogflow system entity formatted value - * ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of - * this message part. For example for a system entity of type - * `@sys.unit-currency`, this may contain: - *
-     * {
-     *   "amount": 5,
-     *   "currency": "USD"
-     * }
-     * 
- * - * Generated from protobuf field .google.protobuf.Value formatted_value = 3; - * @return \Google\Protobuf\Value|null - */ - public function getFormattedValue() - { - return $this->formatted_value; - } - - public function hasFormattedValue() - { - return isset($this->formatted_value); - } - - public function clearFormattedValue() - { - unset($this->formatted_value); - } - - /** - * The [Dialogflow system entity formatted value - * ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of - * this message part. For example for a system entity of type - * `@sys.unit-currency`, this may contain: - *
-     * {
-     *   "amount": 5,
-     *   "currency": "USD"
-     * }
-     * 
- * - * Generated from protobuf field .google.protobuf.Value formatted_value = 3; - * @param \Google\Protobuf\Value $var - * @return $this - */ - public function setFormattedValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); - $this->formatted_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback.php deleted file mode 100644 index fd0fcc0f850b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback.php +++ /dev/null @@ -1,274 +0,0 @@ -google.cloud.dialogflow.v2.AnswerFeedback - */ -class AnswerFeedback extends \Google\Protobuf\Internal\Message -{ - /** - * The correctness level of the specific answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel correctness_level = 1; - */ - protected $correctness_level = 0; - /** - * Indicates whether the answer/item was clicked by the human agent - * or not. Default to false. - * - * Generated from protobuf field bool clicked = 3; - */ - protected $clicked = false; - /** - * Time when the answer/item was clicked. - * - * Generated from protobuf field .google.protobuf.Timestamp click_time = 5; - */ - protected $click_time = null; - /** - * Indicates whether the answer/item was displayed to the human - * agent in the agent desktop UI. Default to false. - * - * Generated from protobuf field bool displayed = 4; - */ - protected $displayed = false; - /** - * Time when the answer/item was displayed. - * - * Generated from protobuf field .google.protobuf.Timestamp display_time = 6; - */ - protected $display_time = null; - protected $detail_feedback; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $correctness_level - * The correctness level of the specific answer. - * @type \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback $agent_assistant_detail_feedback - * Detail feedback of agent assist suggestions. - * @type bool $clicked - * Indicates whether the answer/item was clicked by the human agent - * or not. Default to false. - * @type \Google\Protobuf\Timestamp $click_time - * Time when the answer/item was clicked. - * @type bool $displayed - * Indicates whether the answer/item was displayed to the human - * agent in the agent desktop UI. Default to false. - * @type \Google\Protobuf\Timestamp $display_time - * Time when the answer/item was displayed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); - parent::__construct($data); - } - - /** - * The correctness level of the specific answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel correctness_level = 1; - * @return int - */ - public function getCorrectnessLevel() - { - return $this->correctness_level; - } - - /** - * The correctness level of the specific answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel correctness_level = 1; - * @param int $var - * @return $this - */ - public function setCorrectnessLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AnswerFeedback\CorrectnessLevel::class); - $this->correctness_level = $var; - - return $this; - } - - /** - * Detail feedback of agent assist suggestions. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback agent_assistant_detail_feedback = 2; - * @return \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback|null - */ - public function getAgentAssistantDetailFeedback() - { - return $this->readOneof(2); - } - - public function hasAgentAssistantDetailFeedback() - { - return $this->hasOneof(2); - } - - /** - * Detail feedback of agent assist suggestions. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantFeedback agent_assistant_detail_feedback = 2; - * @param \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback $var - * @return $this - */ - public function setAgentAssistantDetailFeedback($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Indicates whether the answer/item was clicked by the human agent - * or not. Default to false. - * - * Generated from protobuf field bool clicked = 3; - * @return bool - */ - public function getClicked() - { - return $this->clicked; - } - - /** - * Indicates whether the answer/item was clicked by the human agent - * or not. Default to false. - * - * Generated from protobuf field bool clicked = 3; - * @param bool $var - * @return $this - */ - public function setClicked($var) - { - GPBUtil::checkBool($var); - $this->clicked = $var; - - return $this; - } - - /** - * Time when the answer/item was clicked. - * - * Generated from protobuf field .google.protobuf.Timestamp click_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getClickTime() - { - return $this->click_time; - } - - public function hasClickTime() - { - return isset($this->click_time); - } - - public function clearClickTime() - { - unset($this->click_time); - } - - /** - * Time when the answer/item was clicked. - * - * Generated from protobuf field .google.protobuf.Timestamp click_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setClickTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->click_time = $var; - - return $this; - } - - /** - * Indicates whether the answer/item was displayed to the human - * agent in the agent desktop UI. Default to false. - * - * Generated from protobuf field bool displayed = 4; - * @return bool - */ - public function getDisplayed() - { - return $this->displayed; - } - - /** - * Indicates whether the answer/item was displayed to the human - * agent in the agent desktop UI. Default to false. - * - * Generated from protobuf field bool displayed = 4; - * @param bool $var - * @return $this - */ - public function setDisplayed($var) - { - GPBUtil::checkBool($var); - $this->displayed = $var; - - return $this; - } - - /** - * Time when the answer/item was displayed. - * - * Generated from protobuf field .google.protobuf.Timestamp display_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDisplayTime() - { - return $this->display_time; - } - - public function hasDisplayTime() - { - return isset($this->display_time); - } - - public function clearDisplayTime() - { - unset($this->display_time); - } - - /** - * Time when the answer/item was displayed. - * - * Generated from protobuf field .google.protobuf.Timestamp display_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDisplayTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->display_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getDetailFeedback() - { - return $this->whichOneof("detail_feedback"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback/CorrectnessLevel.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback/CorrectnessLevel.php deleted file mode 100644 index 638d5f1b0759..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback/CorrectnessLevel.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.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\Dialogflow\V2\AnswerFeedback_CorrectnessLevel::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback_CorrectnessLevel.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback_CorrectnessLevel.php deleted file mode 100644 index c532415ef10f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerFeedback_CorrectnessLevel.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.AnswerRecord - */ -class AnswerRecord extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of this answer record. - * Format: `projects//locations//answerRecords/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The AnswerFeedback for this record. You can set this with - * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] - * in order to give us feedback about this answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback answer_feedback = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $answer_feedback = null; - protected $record; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of this answer record. - * Format: `projects//locations//answerRecords/`. - * @type \Google\Cloud\Dialogflow\V2\AnswerFeedback $answer_feedback - * Required. The AnswerFeedback for this record. You can set this with - * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] - * in order to give us feedback about this answer. - * @type \Google\Cloud\Dialogflow\V2\AgentAssistantRecord $agent_assistant_record - * Output only. The record for human agent assistant. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of this answer record. - * Format: `projects//locations//answerRecords/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of this answer record. - * Format: `projects//locations//answerRecords/`. - * - * 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; - } - - /** - * Required. The AnswerFeedback for this record. You can set this with - * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] - * in order to give us feedback about this answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback answer_feedback = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\AnswerFeedback|null - */ - public function getAnswerFeedback() - { - return $this->answer_feedback; - } - - public function hasAnswerFeedback() - { - return isset($this->answer_feedback); - } - - public function clearAnswerFeedback() - { - unset($this->answer_feedback); - } - - /** - * Required. The AnswerFeedback for this record. You can set this with - * [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] - * in order to give us feedback about this answer. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerFeedback answer_feedback = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\AnswerFeedback $var - * @return $this - */ - public function setAnswerFeedback($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AnswerFeedback::class); - $this->answer_feedback = $var; - - return $this; - } - - /** - * Output only. The record for human agent assistant. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantRecord agent_assistant_record = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\AgentAssistantRecord|null - */ - public function getAgentAssistantRecord() - { - return $this->readOneof(4); - } - - public function hasAgentAssistantRecord() - { - return $this->hasOneof(4); - } - - /** - * Output only. The record for human agent assistant. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AgentAssistantRecord agent_assistant_record = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\AgentAssistantRecord $var - * @return $this - */ - public function setAgentAssistantRecord($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AgentAssistantRecord::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getRecord() - { - return $this->whichOneof("record"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecordsGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecordsGrpcClient.php deleted file mode 100644 index 2adc9fa6702f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AnswerRecordsGrpcClient.php +++ /dev/null @@ -1,67 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.AnswerRecords/ListAnswerRecords', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListAnswerRecordsResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified answer record. - * @param \Google\Cloud\Dialogflow\V2\UpdateAnswerRecordRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateAnswerRecord(\Google\Cloud\Dialogflow\V2\UpdateAnswerRecordRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.AnswerRecords/UpdateAnswerRecord', - $argument, - ['\Google\Cloud\Dialogflow\V2\AnswerRecord', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleAnswer.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleAnswer.php deleted file mode 100644 index ecbdd73bdf6a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleAnswer.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.dialogflow.v2.ArticleAnswer - */ -class ArticleAnswer extends \Google\Protobuf\Internal\Message -{ - /** - * The article title. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * The article URI. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Article snippets. - * - * Generated from protobuf field repeated string snippets = 3; - */ - private $snippets; - /** - * Article match confidence. - * The system's confidence score that this article is a good match for this - * conversation, as a value from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - /** - * A map that contains metadata about the answer and the - * document from which it originates. - * - * Generated from protobuf field map metadata = 5; - */ - private $metadata; - /** - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * - * Generated from protobuf field string answer_record = 6; - */ - protected $answer_record = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * The article title. - * @type string $uri - * The article URI. - * @type array|\Google\Protobuf\Internal\RepeatedField $snippets - * Article snippets. - * @type float $confidence - * Article match confidence. - * The system's confidence score that this article is a good match for this - * conversation, as a value from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * @type array|\Google\Protobuf\Internal\MapField $metadata - * A map that contains metadata about the answer and the - * document from which it originates. - * @type string $answer_record - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * The article title. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The 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; - } - - /** - * The article URI. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The 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; - } - - /** - * Article snippets. - * - * Generated from protobuf field repeated string snippets = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSnippets() - { - return $this->snippets; - } - - /** - * Article snippets. - * - * Generated from protobuf field repeated string snippets = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSnippets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->snippets = $arr; - - return $this; - } - - /** - * Article match confidence. - * The system's confidence score that this article is a good match for this - * conversation, as a value from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Article match confidence. - * The system's confidence score that this article is a good match for this - * conversation, as a value from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * A map that contains metadata about the answer and the - * document from which it originates. - * - * Generated from protobuf field map metadata = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * A map that contains metadata about the answer and the - * document from which it originates. - * - * Generated from protobuf field map metadata = 5; - * @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 answer record, in the format of - * "projects//locations//answerRecords/" - * - * Generated from protobuf field string answer_record = 6; - * @return string - */ - public function getAnswerRecord() - { - return $this->answer_record; - } - - /** - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * - * Generated from protobuf field string answer_record = 6; - * @param string $var - * @return $this - */ - public function setAnswerRecord($var) - { - GPBUtil::checkString($var, True); - $this->answer_record = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleSuggestionModelMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleSuggestionModelMetadata.php deleted file mode 100644 index 615d7a2cde86..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ArticleSuggestionModelMetadata.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata - */ -class ArticleSuggestionModelMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Type of the article suggestion model. If not provided, model_type - * is used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $training_model_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $training_model_type - * Optional. Type of the article suggestion model. If not provided, model_type - * is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Type of the article suggestion model. If not provided, model_type - * is used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTrainingModelType() - { - return $this->training_model_type; - } - - /** - * Optional. Type of the article suggestion model. If not provided, model_type - * is used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTrainingModelType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationModel\ModelType::class); - $this->training_model_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AssistQueryParameters.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AssistQueryParameters.php deleted file mode 100644 index 2deb569bf5cd..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AssistQueryParameters.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.dialogflow.v2.AssistQueryParameters - */ -class AssistQueryParameters extends \Google\Protobuf\Internal\Message -{ - /** - * Key-value filters on the metadata of documents returned by article - * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their - * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple - * values for a metadata key should be concatenated by comma. For example, - * filters to match all documents that have 'US' or 'CA' in their market - * metadata values and 'agent' in their user metadata values will be - * ``` - * documents_metadata_filters { - * key: "market" - * value: "US,CA" - * } - * documents_metadata_filters { - * key: "user" - * value: "agent" - * } - * ``` - * - * Generated from protobuf field map documents_metadata_filters = 1; - */ - private $documents_metadata_filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $documents_metadata_filters - * Key-value filters on the metadata of documents returned by article - * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their - * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple - * values for a metadata key should be concatenated by comma. For example, - * filters to match all documents that have 'US' or 'CA' in their market - * metadata values and 'agent' in their user metadata values will be - * ``` - * documents_metadata_filters { - * key: "market" - * value: "US,CA" - * } - * documents_metadata_filters { - * key: "user" - * value: "agent" - * } - * ``` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Key-value filters on the metadata of documents returned by article - * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their - * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple - * values for a metadata key should be concatenated by comma. For example, - * filters to match all documents that have 'US' or 'CA' in their market - * metadata values and 'agent' in their user metadata values will be - * ``` - * documents_metadata_filters { - * key: "market" - * value: "US,CA" - * } - * documents_metadata_filters { - * key: "user" - * value: "agent" - * } - * ``` - * - * Generated from protobuf field map documents_metadata_filters = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDocumentsMetadataFilters() - { - return $this->documents_metadata_filters; - } - - /** - * Key-value filters on the metadata of documents returned by article - * suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their - * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple - * values for a metadata key should be concatenated by comma. For example, - * filters to match all documents that have 'US' or 'CA' in their market - * metadata values and 'agent' in their user metadata values will be - * ``` - * documents_metadata_filters { - * key: "market" - * value: "US,CA" - * } - * documents_metadata_filters { - * key: "user" - * value: "agent" - * } - * ``` - * - * Generated from protobuf field map documents_metadata_filters = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDocumentsMetadataFilters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents_metadata_filters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AudioEncoding.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AudioEncoding.php deleted file mode 100644 index ee0084582a04..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AudioEncoding.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dialogflow.v2.AudioEncoding - */ -class AudioEncoding -{ - /** - * Not specified. - * - * Generated from protobuf enum AUDIO_ENCODING_UNSPECIFIED = 0; - */ - const AUDIO_ENCODING_UNSPECIFIED = 0; - /** - * Uncompressed 16-bit signed little-endian samples (Linear PCM). - * - * Generated from protobuf enum AUDIO_ENCODING_LINEAR_16 = 1; - */ - const AUDIO_ENCODING_LINEAR_16 = 1; - /** - * [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio - * Codec) is the recommended encoding because it is lossless (therefore - * recognition is not compromised) and requires only about half the - * bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and - * 24-bit samples, however, not all fields in `STREAMINFO` are supported. - * - * Generated from protobuf enum AUDIO_ENCODING_FLAC = 2; - */ - const AUDIO_ENCODING_FLAC = 2; - /** - * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - * - * Generated from protobuf enum AUDIO_ENCODING_MULAW = 3; - */ - const AUDIO_ENCODING_MULAW = 3; - /** - * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - * - * Generated from protobuf enum AUDIO_ENCODING_AMR = 4; - */ - const AUDIO_ENCODING_AMR = 4; - /** - * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - * - * Generated from protobuf enum AUDIO_ENCODING_AMR_WB = 5; - */ - const AUDIO_ENCODING_AMR_WB = 5; - /** - * Opus encoded audio frames in Ogg container - * ([OggOpus](https://wiki.xiph.org/OggOpus)). - * `sample_rate_hertz` must be 16000. - * - * Generated from protobuf enum AUDIO_ENCODING_OGG_OPUS = 6; - */ - const AUDIO_ENCODING_OGG_OPUS = 6; - /** - * Although the use of lossy encodings is not recommended, if a very low - * bitrate encoding is required, `OGG_OPUS` is highly preferred over - * Speex encoding. The [Speex](https://speex.org/) encoding supported by - * Dialogflow API has a header byte in each block, as in MIME type - * `audio/x-speex-with-header-byte`. - * It is a variant of the RTP Speex encoding defined in - * [RFC 5574](https://tools.ietf.org/html/rfc5574). - * The stream is a sequence of blocks, one block per RTP packet. Each block - * starts with a byte containing the length of the block, in bytes, followed - * by one or more frames of Speex data, padded to an integral number of - * bytes (octets) as specified in RFC 5574. In other words, each RTP header - * is replaced with a single byte containing the block length. Only Speex - * wideband is supported. `sample_rate_hertz` must be 16000. - * - * Generated from protobuf enum AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; - */ - const AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; - - private static $valueToName = [ - self::AUDIO_ENCODING_UNSPECIFIED => 'AUDIO_ENCODING_UNSPECIFIED', - self::AUDIO_ENCODING_LINEAR_16 => 'AUDIO_ENCODING_LINEAR_16', - self::AUDIO_ENCODING_FLAC => 'AUDIO_ENCODING_FLAC', - self::AUDIO_ENCODING_MULAW => 'AUDIO_ENCODING_MULAW', - self::AUDIO_ENCODING_AMR => 'AUDIO_ENCODING_AMR', - self::AUDIO_ENCODING_AMR_WB => 'AUDIO_ENCODING_AMR_WB', - self::AUDIO_ENCODING_OGG_OPUS => 'AUDIO_ENCODING_OGG_OPUS', - self::AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE => 'AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE', - ]; - - 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentConfig.php deleted file mode 100644 index 47b38e2db2d6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentConfig.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.dialogflow.v2.AutomatedAgentConfig - */ -class AutomatedAgentConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. ID of the Dialogflow agent environment to use. - * This project needs to either be the same project as the conversation or you - * need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API - * Service Agent` role in this project. - * - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not - * specified, the default `draft` environment is used. Refer to - * [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) - * for more details. - * - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment - * is used. - * - * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $agent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $agent - * Required. ID of the Dialogflow agent environment to use. - * This project needs to either be the same project as the conversation or you - * need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API - * Service Agent` role in this project. - * - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not - * specified, the default `draft` environment is used. Refer to - * [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) - * for more details. - * - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment - * is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. ID of the Dialogflow agent environment to use. - * This project needs to either be the same project as the conversation or you - * need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API - * Service Agent` role in this project. - * - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not - * specified, the default `draft` environment is used. Refer to - * [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) - * for more details. - * - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment - * is used. - * - * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAgent() - { - return $this->agent; - } - - /** - * Required. ID of the Dialogflow agent environment to use. - * This project needs to either be the same project as the conversation or you - * need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API - * Service Agent` role in this project. - * - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not - * specified, the default `draft` environment is used. Refer to - * [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) - * for more details. - * - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment - * is used. - * - * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAgent($var) - { - GPBUtil::checkString($var, True); - $this->agent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply.php deleted file mode 100644 index a7eb6d7bb899..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.dialogflow.v2.AutomatedAgentReply - */ -class AutomatedAgentReply extends \Google\Protobuf\Internal\Message -{ - /** - * Response of the Dialogflow - * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] - * call. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.DetectIntentResponse detect_intent_response = 1; - */ - protected $detect_intent_response = null; - /** - * AutomatedAgentReply type. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType automated_agent_reply_type = 7; - */ - protected $automated_agent_reply_type = 0; - /** - * Indicates whether the partial automated agent reply is interruptible when a - * later reply message arrives. e.g. if the agent specified some music as - * partial response, it can be cancelled. - * - * Generated from protobuf field bool allow_cancellation = 8; - */ - protected $allow_cancellation = false; - /** - * The unique identifier of the current Dialogflow CX conversation page. - * Format: `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string cx_current_page = 11; - */ - protected $cx_current_page = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\DetectIntentResponse $detect_intent_response - * Response of the Dialogflow - * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] - * call. - * @type int $automated_agent_reply_type - * AutomatedAgentReply type. - * @type bool $allow_cancellation - * Indicates whether the partial automated agent reply is interruptible when a - * later reply message arrives. e.g. if the agent specified some music as - * partial response, it can be cancelled. - * @type string $cx_current_page - * The unique identifier of the current Dialogflow CX conversation page. - * Format: `projects//locations//agents//flows//pages/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Response of the Dialogflow - * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] - * call. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.DetectIntentResponse detect_intent_response = 1; - * @return \Google\Cloud\Dialogflow\V2\DetectIntentResponse|null - */ - public function getDetectIntentResponse() - { - return $this->detect_intent_response; - } - - public function hasDetectIntentResponse() - { - return isset($this->detect_intent_response); - } - - public function clearDetectIntentResponse() - { - unset($this->detect_intent_response); - } - - /** - * Response of the Dialogflow - * [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] - * call. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.DetectIntentResponse detect_intent_response = 1; - * @param \Google\Cloud\Dialogflow\V2\DetectIntentResponse $var - * @return $this - */ - public function setDetectIntentResponse($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\DetectIntentResponse::class); - $this->detect_intent_response = $var; - - return $this; - } - - /** - * AutomatedAgentReply type. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType automated_agent_reply_type = 7; - * @return int - */ - public function getAutomatedAgentReplyType() - { - return $this->automated_agent_reply_type; - } - - /** - * AutomatedAgentReply type. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType automated_agent_reply_type = 7; - * @param int $var - * @return $this - */ - public function setAutomatedAgentReplyType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AutomatedAgentReply\AutomatedAgentReplyType::class); - $this->automated_agent_reply_type = $var; - - return $this; - } - - /** - * Indicates whether the partial automated agent reply is interruptible when a - * later reply message arrives. e.g. if the agent specified some music as - * partial response, it can be cancelled. - * - * Generated from protobuf field bool allow_cancellation = 8; - * @return bool - */ - public function getAllowCancellation() - { - return $this->allow_cancellation; - } - - /** - * Indicates whether the partial automated agent reply is interruptible when a - * later reply message arrives. e.g. if the agent specified some music as - * partial response, it can be cancelled. - * - * Generated from protobuf field bool allow_cancellation = 8; - * @param bool $var - * @return $this - */ - public function setAllowCancellation($var) - { - GPBUtil::checkBool($var); - $this->allow_cancellation = $var; - - return $this; - } - - /** - * The unique identifier of the current Dialogflow CX conversation page. - * Format: `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string cx_current_page = 11; - * @return string - */ - public function getCxCurrentPage() - { - return $this->cx_current_page; - } - - /** - * The unique identifier of the current Dialogflow CX conversation page. - * Format: `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string cx_current_page = 11; - * @param string $var - * @return $this - */ - public function setCxCurrentPage($var) - { - GPBUtil::checkString($var, True); - $this->cx_current_page = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply/AutomatedAgentReplyType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply/AutomatedAgentReplyType.php deleted file mode 100644 index a82ee1df28e1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply/AutomatedAgentReplyType.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType - */ -class AutomatedAgentReplyType -{ - /** - * Not specified. This should never happen. - * - * Generated from protobuf enum AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0; - */ - const AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0; - /** - * Partial reply. e.g. Aggregated responses in a `Fulfillment` that enables - * `return_partial_response` can be returned as partial reply. - * WARNING: partial reply is not eligible for barge-in. - * - * Generated from protobuf enum PARTIAL = 1; - */ - const PARTIAL = 1; - /** - * Final reply. - * - * Generated from protobuf enum FINAL = 2; - */ - const PBFINAL = 2; - - private static $valueToName = [ - self::AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED => 'AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED', - self::PARTIAL => 'PARTIAL', - self::PBFINAL => 'FINAL', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AutomatedAgentReplyType::class, \Google\Cloud\Dialogflow\V2\AutomatedAgentReply_AutomatedAgentReplyType::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply_AutomatedAgentReplyType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply_AutomatedAgentReplyType.php deleted file mode 100644 index 58030c17cea4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/AutomatedAgentReply_AutomatedAgentReplyType.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.BatchCreateEntitiesRequest - */ -class BatchCreateEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entity type to create entities in. Format: - * `projects//agent/entityTypes/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The entities to create. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entities; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the entity type to create entities in. Format: - * `projects//agent/entityTypes/`. - * @type array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Required. The entities to create. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entity type to create entities in. Format: - * `projects//agent/entityTypes/`. - * - * 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 name of the entity type to create entities in. Format: - * `projects//agent/entityTypes/`. - * - * 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 entities to create. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Required. The entities to create. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntitiesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntitiesRequest.php deleted file mode 100644 index 1b081609fde4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntitiesRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest - */ -class BatchDeleteEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entity type to delete entries for. Format: - * `projects//agent/entityTypes/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The reference `values` of the entities to delete. Note that - * these are not fully-qualified names, i.e. they don't start with - * `projects/`. - * - * Generated from protobuf field repeated string entity_values = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entity_values; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the entity type to delete entries for. Format: - * `projects//agent/entityTypes/`. - * @type array|\Google\Protobuf\Internal\RepeatedField $entity_values - * Required. The reference `values` of the entities to delete. Note that - * these are not fully-qualified names, i.e. they don't start with - * `projects/`. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entity type to delete entries for. Format: - * `projects//agent/entityTypes/`. - * - * 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 name of the entity type to delete entries for. Format: - * `projects//agent/entityTypes/`. - * - * 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 reference `values` of the entities to delete. Note that - * these are not fully-qualified names, i.e. they don't start with - * `projects/`. - * - * Generated from protobuf field repeated string entity_values = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityValues() - { - return $this->entity_values; - } - - /** - * Required. The reference `values` of the entities to delete. Note that - * these are not fully-qualified names, i.e. they don't start with - * `projects/`. - * - * Generated from protobuf field repeated string entity_values = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->entity_values = $arr; - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntityTypesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntityTypesRequest.php deleted file mode 100644 index 0a43822ed8ec..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteEntityTypesRequest.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest - */ -class BatchDeleteEntityTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent to delete all entities types for. Format: - * `projects//agent`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The names entity types to delete. All names must point to the - * same agent as `parent`. - * - * Generated from protobuf field repeated string entity_type_names = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entity_type_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the agent to delete all entities types for. Format: - * `projects//agent`. - * @type array|\Google\Protobuf\Internal\RepeatedField $entity_type_names - * Required. The names entity types to delete. All names must point to the - * same agent as `parent`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent to delete all entities types for. Format: - * `projects//agent`. - * - * 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 name of the agent to delete all entities types for. Format: - * `projects//agent`. - * - * 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 names entity types to delete. All names must point to the - * same agent as `parent`. - * - * Generated from protobuf field repeated string entity_type_names = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityTypeNames() - { - return $this->entity_type_names; - } - - /** - * Required. The names entity types to delete. All names must point to the - * same agent as `parent`. - * - * Generated from protobuf field repeated string entity_type_names = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityTypeNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->entity_type_names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteIntentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteIntentsRequest.php deleted file mode 100644 index 1618e46fffae..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchDeleteIntentsRequest.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.BatchDeleteIntentsRequest - */ -class BatchDeleteIntentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent to delete all entities types for. Format: - * `projects//agent`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The collection of intents to delete. Only intent `name` must be - * filled in. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $intents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the agent to delete all entities types for. Format: - * `projects//agent`. - * @type array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents - * Required. The collection of intents to delete. Only intent `name` must be - * filled in. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent to delete all entities types for. Format: - * `projects//agent`. - * - * 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 name of the agent to delete all entities types for. Format: - * `projects//agent`. - * - * 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 collection of intents to delete. Only intent `name` must be - * filled in. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntents() - { - return $this->intents; - } - - /** - * Required. The collection of intents to delete. Only intent `name` must be - * filled in. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); - $this->intents = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntitiesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntitiesRequest.php deleted file mode 100644 index 5f7e4287caf9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntitiesRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest - */ -class BatchUpdateEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entity type to update or create entities in. - * Format: `projects//agent/entityTypes/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The entities to update or create. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entities; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the entity type to update or create entities in. - * Format: `projects//agent/entityTypes/`. - * @type array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Required. The entities to update or create. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entity type to update or create entities in. - * Format: `projects//agent/entityTypes/`. - * - * 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 name of the entity type to update or create entities in. - * Format: `projects//agent/entityTypes/`. - * - * 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 entities to update or create. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Required. The entities to update or create. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesRequest.php deleted file mode 100644 index 6a281fc67777..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesRequest.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest - */ -class BatchUpdateEntityTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent to update or create entity types in. - * Format: `projects//agent`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - protected $entity_type_batch; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the agent to update or create entity types in. - * Format: `projects//agent`. - * @type string $entity_type_batch_uri - * The URI to a Google Cloud Storage file containing entity types to update - * or create. The file format can either be a serialized proto (of - * EntityBatch type) or a JSON object. Note: The URI must start with - * "gs://". - * @type \Google\Cloud\Dialogflow\V2\EntityTypeBatch $entity_type_batch_inline - * The collection of entity types to update or create. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent to update or create entity types in. - * Format: `projects//agent`. - * - * 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 name of the agent to update or create entity types in. - * Format: `projects//agent`. - * - * 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 URI to a Google Cloud Storage file containing entity types to update - * or create. The file format can either be a serialized proto (of - * EntityBatch type) or a JSON object. Note: The URI must start with - * "gs://". - * - * Generated from protobuf field string entity_type_batch_uri = 2; - * @return string - */ - public function getEntityTypeBatchUri() - { - return $this->readOneof(2); - } - - public function hasEntityTypeBatchUri() - { - return $this->hasOneof(2); - } - - /** - * The URI to a Google Cloud Storage file containing entity types to update - * or create. The file format can either be a serialized proto (of - * EntityBatch type) or a JSON object. Note: The URI must start with - * "gs://". - * - * Generated from protobuf field string entity_type_batch_uri = 2; - * @param string $var - * @return $this - */ - public function setEntityTypeBatchUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The collection of entity types to update or create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityTypeBatch entity_type_batch_inline = 3; - * @return \Google\Cloud\Dialogflow\V2\EntityTypeBatch|null - */ - public function getEntityTypeBatchInline() - { - return $this->readOneof(3); - } - - public function hasEntityTypeBatchInline() - { - return $this->hasOneof(3); - } - - /** - * The collection of entity types to update or create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityTypeBatch entity_type_batch_inline = 3; - * @param \Google\Cloud\Dialogflow\V2\EntityTypeBatch $var - * @return $this - */ - public function setEntityTypeBatchInline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EntityTypeBatch::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * @return string - */ - public function getEntityTypeBatch() - { - return $this->whichOneof("entity_type_batch"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesResponse.php deleted file mode 100644 index b73eca89fee6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateEntityTypesResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse - */ -class BatchUpdateEntityTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The collection of updated or created entity types. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; - */ - private $entity_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types - * The collection of updated or created entity types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * The collection of updated or created entity types. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityTypes() - { - return $this->entity_types; - } - - /** - * The collection of updated or created entity types. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; - * @param array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType::class); - $this->entity_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsRequest.php deleted file mode 100644 index da1c3823fa38..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsRequest.php +++ /dev/null @@ -1,278 +0,0 @@ -google.cloud.dialogflow.v2.BatchUpdateIntentsRequest - */ -class BatchUpdateIntentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent to update or create intents in. - * Format: `projects//agent`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $intent_view = 0; - protected $intent_batch; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the agent to update or create intents in. - * Format: `projects//agent`. - * @type string $intent_batch_uri - * The URI to a Google Cloud Storage file containing intents to update or - * create. The file format can either be a serialized proto (of IntentBatch - * type) or JSON object. Note: The URI must start with "gs://". - * @type \Google\Cloud\Dialogflow\V2\IntentBatch $intent_batch_inline - * The collection of intents to update or create. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields get updated. - * @type int $intent_view - * Optional. The resource view to apply to the returned intent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent to update or create intents in. - * Format: `projects//agent`. - * - * 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 name of the agent to update or create intents in. - * Format: `projects//agent`. - * - * 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 URI to a Google Cloud Storage file containing intents to update or - * create. The file format can either be a serialized proto (of IntentBatch - * type) or JSON object. Note: The URI must start with "gs://". - * - * Generated from protobuf field string intent_batch_uri = 2; - * @return string - */ - public function getIntentBatchUri() - { - return $this->readOneof(2); - } - - public function hasIntentBatchUri() - { - return $this->hasOneof(2); - } - - /** - * The URI to a Google Cloud Storage file containing intents to update or - * create. The file format can either be a serialized proto (of IntentBatch - * type) or JSON object. Note: The URI must start with "gs://". - * - * Generated from protobuf field string intent_batch_uri = 2; - * @param string $var - * @return $this - */ - public function setIntentBatchUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The collection of intents to update or create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentBatch intent_batch_inline = 3; - * @return \Google\Cloud\Dialogflow\V2\IntentBatch|null - */ - public function getIntentBatchInline() - { - return $this->readOneof(3); - } - - public function hasIntentBatchInline() - { - return $this->hasOneof(3); - } - - /** - * The collection of intents to update or create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentBatch intent_batch_inline = 3; - * @param \Google\Cloud\Dialogflow\V2\IntentBatch $var - * @return $this - */ - public function setIntentBatchInline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\IntentBatch::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIntentView() - { - return $this->intent_view; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIntentView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); - $this->intent_view = $var; - - return $this; - } - - /** - * @return string - */ - public function getIntentBatch() - { - return $this->whichOneof("intent_batch"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsResponse.php deleted file mode 100644 index fe289de698ad..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/BatchUpdateIntentsResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dialogflow.v2.BatchUpdateIntentsResponse - */ -class BatchUpdateIntentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The collection of updated or created intents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; - */ - private $intents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents - * The collection of updated or created intents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * The collection of updated or created intents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntents() - { - return $this->intents; - } - - /** - * The collection of updated or created intents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); - $this->intents = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigOperationMetadata.php deleted file mode 100644 index ffff95f24c72..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigOperationMetadata.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata - */ -class ClearSuggestionFeatureConfigOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the conversation profile. Format: - * `projects//locations//conversationProfiles/` - * - * Generated from protobuf field string conversation_profile = 1; - */ - protected $conversation_profile = ''; - /** - * Required. The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $participant_role = 0; - /** - * Required. The type of the suggestion feature to remove. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $suggestion_feature_type = 0; - /** - * Timestamp whe the request was created. The time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_profile - * The resource name of the conversation profile. Format: - * `projects//locations//conversationProfiles/` - * @type int $participant_role - * Required. The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * @type int $suggestion_feature_type - * Required. The type of the suggestion feature to remove. - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp whe the request was created. The time is measured on server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the conversation profile. Format: - * `projects//locations//conversationProfiles/` - * - * Generated from protobuf field string conversation_profile = 1; - * @return string - */ - public function getConversationProfile() - { - return $this->conversation_profile; - } - - /** - * The resource name of the conversation profile. Format: - * `projects//locations//conversationProfiles/` - * - * Generated from protobuf field string conversation_profile = 1; - * @param string $var - * @return $this - */ - public function setConversationProfile($var) - { - GPBUtil::checkString($var, True); - $this->conversation_profile = $var; - - return $this; - } - - /** - * Required. The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getParticipantRole() - { - return $this->participant_role; - } - - /** - * Required. The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setParticipantRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); - $this->participant_role = $var; - - return $this; - } - - /** - * Required. The type of the suggestion feature to remove. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSuggestionFeatureType() - { - return $this->suggestion_feature_type; - } - - /** - * Required. The type of the suggestion feature to remove. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSuggestionFeatureType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type::class); - $this->suggestion_feature_type = $var; - - return $this; - } - - /** - * Timestamp whe the request was created. The time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @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); - } - - /** - * Timestamp whe the request was created. The time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigRequest.php deleted file mode 100644 index 9e7620502ba8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ClearSuggestionFeatureConfigRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest - */ -class ClearSuggestionFeatureConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation_profile = ''; - /** - * Required. The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $participant_role = 0; - /** - * Required. The type of the suggestion feature to remove. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $suggestion_feature_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_profile - * Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * @type int $participant_role - * Required. The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * @type int $suggestion_feature_type - * Required. The type of the suggestion feature to remove. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConversationProfile() - { - return $this->conversation_profile; - } - - /** - * Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConversationProfile($var) - { - GPBUtil::checkString($var, True); - $this->conversation_profile = $var; - - return $this; - } - - /** - * Required. The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getParticipantRole() - { - return $this->participant_role; - } - - /** - * Required. The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setParticipantRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); - $this->participant_role = $var; - - return $this; - } - - /** - * Required. The type of the suggestion feature to remove. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSuggestionFeatureType() - { - return $this->suggestion_feature_type; - } - - /** - * Required. The type of the suggestion feature to remove. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSuggestionFeatureType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type::class); - $this->suggestion_feature_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CompleteConversationRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CompleteConversationRequest.php deleted file mode 100644 index 91fcdccb640d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CompleteConversationRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.CompleteConversationRequest - */ -class CompleteConversationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource identifier of the conversation to close. - * Format: `projects//locations//conversations/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource identifier of the conversation to close. - * Format: `projects//locations//conversations/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource identifier of the conversation to close. - * Format: `projects//locations//conversations/`. - * - * 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. Resource identifier of the conversation to close. - * Format: `projects//locations//conversations/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Context.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Context.php deleted file mode 100644 index 08daebb8c022..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Context.php +++ /dev/null @@ -1,269 +0,0 @@ -google.cloud.dialogflow.v2.Context - */ -class Context extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier of the context. Format: - * `projects//agent/sessions//contexts/`, - * or `projects//agent/environments//users//sessions//contexts/`. - * The `Context ID` is always converted to lowercase, may only contain - * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * The following context names are reserved for internal use by Dialogflow. - * You should not use these contexts or create contexts with these names: - * * `__system_counters__` - * * `*_id_dialog_context` - * * `*_dialog_params_size` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. The number of conversational query requests after which the - * context expires. The default is `0`. If set to `0`, the context expires - * immediately. Contexts expire automatically after 20 minutes if there - * are no matching queries. - * - * Generated from protobuf field int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $lifespan_count = 0; - /** - * Optional. The collection of parameters associated with this context. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * - * Generated from protobuf field .google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $parameters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique identifier of the context. Format: - * `projects//agent/sessions//contexts/`, - * or `projects//agent/environments//users//sessions//contexts/`. - * The `Context ID` is always converted to lowercase, may only contain - * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * The following context names are reserved for internal use by Dialogflow. - * You should not use these contexts or create contexts with these names: - * * `__system_counters__` - * * `*_id_dialog_context` - * * `*_dialog_params_size` - * @type int $lifespan_count - * Optional. The number of conversational query requests after which the - * context expires. The default is `0`. If set to `0`, the context expires - * immediately. Contexts expire automatically after 20 minutes if there - * are no matching queries. - * @type \Google\Protobuf\Struct $parameters - * Optional. The collection of parameters associated with this context. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier of the context. Format: - * `projects//agent/sessions//contexts/`, - * or `projects//agent/environments//users//sessions//contexts/`. - * The `Context ID` is always converted to lowercase, may only contain - * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * The following context names are reserved for internal use by Dialogflow. - * You should not use these contexts or create contexts with these names: - * * `__system_counters__` - * * `*_id_dialog_context` - * * `*_dialog_params_size` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique identifier of the context. Format: - * `projects//agent/sessions//contexts/`, - * or `projects//agent/environments//users//sessions//contexts/`. - * The `Context ID` is always converted to lowercase, may only contain - * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * The following context names are reserved for internal use by Dialogflow. - * You should not use these contexts or create contexts with these names: - * * `__system_counters__` - * * `*_id_dialog_context` - * * `*_dialog_params_size` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The number of conversational query requests after which the - * context expires. The default is `0`. If set to `0`, the context expires - * immediately. Contexts expire automatically after 20 minutes if there - * are no matching queries. - * - * Generated from protobuf field int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getLifespanCount() - { - return $this->lifespan_count; - } - - /** - * Optional. The number of conversational query requests after which the - * context expires. The default is `0`. If set to `0`, the context expires - * immediately. Contexts expire automatically after 20 minutes if there - * are no matching queries. - * - * Generated from protobuf field int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setLifespanCount($var) - { - GPBUtil::checkInt32($var); - $this->lifespan_count = $var; - - return $this; - } - - /** - * Optional. The collection of parameters associated with this context. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * - * Generated from protobuf field .google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getParameters() - { - return $this->parameters; - } - - public function hasParameters() - { - return isset($this->parameters); - } - - public function clearParameters() - { - unset($this->parameters); - } - - /** - * Optional. The collection of parameters associated with this context. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * - * Generated from protobuf field .google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->parameters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ContextsGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ContextsGrpcClient.php deleted file mode 100644 index 42ac71299fca..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ContextsGrpcClient.php +++ /dev/null @@ -1,127 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Contexts/ListContexts', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListContextsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified context. - * @param \Google\Cloud\Dialogflow\V2\GetContextRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetContext(\Google\Cloud\Dialogflow\V2\GetContextRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/GetContext', - $argument, - ['\Google\Cloud\Dialogflow\V2\Context', 'decode'], - $metadata, $options); - } - - /** - * Creates a context. - * - * If the specified context already exists, overrides the context. - * @param \Google\Cloud\Dialogflow\V2\CreateContextRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateContext(\Google\Cloud\Dialogflow\V2\CreateContextRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/CreateContext', - $argument, - ['\Google\Cloud\Dialogflow\V2\Context', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified context. - * @param \Google\Cloud\Dialogflow\V2\UpdateContextRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateContext(\Google\Cloud\Dialogflow\V2\UpdateContextRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/UpdateContext', - $argument, - ['\Google\Cloud\Dialogflow\V2\Context', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified context. - * @param \Google\Cloud\Dialogflow\V2\DeleteContextRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteContext(\Google\Cloud\Dialogflow\V2\DeleteContextRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/DeleteContext', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Deletes all active contexts in the specified session. - * @param \Google\Cloud\Dialogflow\V2\DeleteAllContextsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteAllContexts(\Google\Cloud\Dialogflow\V2\DeleteAllContextsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Contexts/DeleteAllContexts', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation.php deleted file mode 100644 index 618526d0cb82..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation.php +++ /dev/null @@ -1,380 +0,0 @@ -google.cloud.dialogflow.v2.Conversation - */ -class Conversation extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique identifier of this conversation. - * Format: `projects//locations//conversations/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The current state of the Conversation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lifecycle_state = 0; - /** - * Required. The Conversation Profile to be used to configure this - * Conversation. This field cannot be updated. - * Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $conversation_profile = ''; - /** - * Output only. It will not be empty if the conversation is to be connected - * over telephony. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $phone_number = null; - /** - * Output only. The time the conversation was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The time the conversation was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * The stage of a conversation. It indicates whether the virtual agent or a - * human agent is handling the conversation. - * If the conversation is created with the conversation profile that has - * Dialogflow config set, defaults to - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; - * Otherwise, defaults to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - * If the conversation is created with the conversation profile that has - * Dialogflow config set but explicitly sets conversation_stage to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], - * it skips - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] - * stage and directly goes to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7; - */ - protected $conversation_stage = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique identifier of this conversation. - * Format: `projects//locations//conversations/`. - * @type int $lifecycle_state - * Output only. The current state of the Conversation. - * @type string $conversation_profile - * Required. The Conversation Profile to be used to configure this - * Conversation. This field cannot be updated. - * Format: `projects//locations//conversationProfiles/`. - * @type \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber $phone_number - * Output only. It will not be empty if the conversation is to be connected - * over telephony. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The time the conversation was started. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the conversation was finished. - * @type int $conversation_stage - * The stage of a conversation. It indicates whether the virtual agent or a - * human agent is handling the conversation. - * If the conversation is created with the conversation profile that has - * Dialogflow config set, defaults to - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; - * Otherwise, defaults to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - * If the conversation is created with the conversation profile that has - * Dialogflow config set but explicitly sets conversation_stage to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], - * it skips - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] - * stage and directly goes to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique identifier of this conversation. - * Format: `projects//locations//conversations/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique identifier of this conversation. - * Format: `projects//locations//conversations/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The current state of the Conversation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLifecycleState() - { - return $this->lifecycle_state; - } - - /** - * Output only. The current state of the Conversation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLifecycleState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Conversation\LifecycleState::class); - $this->lifecycle_state = $var; - - return $this; - } - - /** - * Required. The Conversation Profile to be used to configure this - * Conversation. This field cannot be updated. - * Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getConversationProfile() - { - return $this->conversation_profile; - } - - /** - * Required. The Conversation Profile to be used to configure this - * Conversation. This field cannot be updated. - * Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setConversationProfile($var) - { - GPBUtil::checkString($var, True); - $this->conversation_profile = $var; - - return $this; - } - - /** - * Output only. It will not be empty if the conversation is to be connected - * over telephony. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber|null - */ - public function getPhoneNumber() - { - return $this->phone_number; - } - - public function hasPhoneNumber() - { - return isset($this->phone_number); - } - - public function clearPhoneNumber() - { - unset($this->phone_number); - } - - /** - * Output only. It will not be empty if the conversation is to be connected - * over telephony. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber $var - * @return $this - */ - public function setPhoneNumber($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationPhoneNumber::class); - $this->phone_number = $var; - - return $this; - } - - /** - * Output only. The time the conversation was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The time the conversation was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The time the conversation was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.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 conversation was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.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 stage of a conversation. It indicates whether the virtual agent or a - * human agent is handling the conversation. - * If the conversation is created with the conversation profile that has - * Dialogflow config set, defaults to - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; - * Otherwise, defaults to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - * If the conversation is created with the conversation profile that has - * Dialogflow config set but explicitly sets conversation_stage to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], - * it skips - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] - * stage and directly goes to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7; - * @return int - */ - public function getConversationStage() - { - return $this->conversation_stage; - } - - /** - * The stage of a conversation. It indicates whether the virtual agent or a - * human agent is handling the conversation. - * If the conversation is created with the conversation profile that has - * Dialogflow config set, defaults to - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; - * Otherwise, defaults to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - * If the conversation is created with the conversation profile that has - * Dialogflow config set but explicitly sets conversation_stage to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], - * it skips - * [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] - * stage and directly goes to - * [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7; - * @param int $var - * @return $this - */ - public function setConversationStage($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Conversation\ConversationStage::class); - $this->conversation_stage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/ConversationStage.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/ConversationStage.php deleted file mode 100644 index f2c3504ddeb6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/ConversationStage.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.dialogflow.v2.Conversation.ConversationStage - */ -class ConversationStage -{ - /** - * Unknown. Should never be used after a conversation is successfully - * created. - * - * Generated from protobuf enum CONVERSATION_STAGE_UNSPECIFIED = 0; - */ - const CONVERSATION_STAGE_UNSPECIFIED = 0; - /** - * The conversation should return virtual agent responses into the - * conversation. - * - * Generated from protobuf enum VIRTUAL_AGENT_STAGE = 1; - */ - const VIRTUAL_AGENT_STAGE = 1; - /** - * The conversation should not provide responses, just listen and provide - * suggestions. - * - * Generated from protobuf enum HUMAN_ASSIST_STAGE = 2; - */ - const HUMAN_ASSIST_STAGE = 2; - - private static $valueToName = [ - self::CONVERSATION_STAGE_UNSPECIFIED => 'CONVERSATION_STAGE_UNSPECIFIED', - self::VIRTUAL_AGENT_STAGE => 'VIRTUAL_AGENT_STAGE', - self::HUMAN_ASSIST_STAGE => 'HUMAN_ASSIST_STAGE', - ]; - - 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(ConversationStage::class, \Google\Cloud\Dialogflow\V2\Conversation_ConversationStage::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/LifecycleState.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/LifecycleState.php deleted file mode 100644 index 5f851d42bcbe..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation/LifecycleState.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.v2.Conversation.LifecycleState - */ -class LifecycleState -{ - /** - * Unknown. - * - * Generated from protobuf enum LIFECYCLE_STATE_UNSPECIFIED = 0; - */ - const LIFECYCLE_STATE_UNSPECIFIED = 0; - /** - * Conversation is currently open for media analysis. - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * Conversation has been completed. - * - * Generated from protobuf enum COMPLETED = 2; - */ - const COMPLETED = 2; - - private static $valueToName = [ - self::LIFECYCLE_STATE_UNSPECIFIED => 'LIFECYCLE_STATE_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::COMPLETED => 'COMPLETED', - ]; - - 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(LifecycleState::class, \Google\Cloud\Dialogflow\V2\Conversation_LifecycleState::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDataset.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDataset.php deleted file mode 100644 index 7d2a3590cc7a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDataset.php +++ /dev/null @@ -1,316 +0,0 @@ -google.cloud.dialogflow.v2.ConversationDataset - */ -class ConversationDataset extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. ConversationDataset resource name. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. The display name of the dataset. Maximum of 64 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. The description of the dataset. Maximum of 10000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Creation time of this dataset. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Input configurations set during conversation data import. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $input_config = null; - /** - * Output only. Metadata set during conversation data import. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationInfo conversation_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $conversation_info = null; - /** - * Output only. The number of conversations this conversation dataset - * contains. - * - * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $conversation_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. ConversationDataset resource name. Format: - * `projects//locations//conversationDatasets/` - * @type string $display_name - * Required. The display name of the dataset. Maximum of 64 bytes. - * @type string $description - * Optional. The description of the dataset. Maximum of 10000 bytes. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this dataset. - * @type \Google\Cloud\Dialogflow\V2\InputConfig $input_config - * Output only. Input configurations set during conversation data import. - * @type \Google\Cloud\Dialogflow\V2\ConversationInfo $conversation_info - * Output only. Metadata set during conversation data import. - * @type int|string $conversation_count - * Output only. The number of conversations this conversation dataset - * contains. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * Output only. ConversationDataset resource name. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. ConversationDataset resource name. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The display name of the dataset. Maximum of 64 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The display name of the dataset. Maximum of 64 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. The description of the dataset. Maximum of 10000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The description of the dataset. Maximum of 10000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Creation time of this dataset. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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. Creation time of this dataset. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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. Input configurations set during conversation data import. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Output only. Input configurations set during conversation data import. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Output only. Metadata set during conversation data import. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationInfo conversation_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\ConversationInfo|null - */ - public function getConversationInfo() - { - return $this->conversation_info; - } - - public function hasConversationInfo() - { - return isset($this->conversation_info); - } - - public function clearConversationInfo() - { - unset($this->conversation_info); - } - - /** - * Output only. Metadata set during conversation data import. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationInfo conversation_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\ConversationInfo $var - * @return $this - */ - public function setConversationInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationInfo::class); - $this->conversation_info = $var; - - return $this; - } - - /** - * Output only. The number of conversations this conversation dataset - * contains. - * - * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getConversationCount() - { - return $this->conversation_count; - } - - /** - * Output only. The number of conversations this conversation dataset - * contains. - * - * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setConversationCount($var) - { - GPBUtil::checkInt64($var); - $this->conversation_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDatasetsGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDatasetsGrpcClient.php deleted file mode 100644 index 48470b0e87ec..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationDatasetsGrpcClient.php +++ /dev/null @@ -1,143 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/CreateConversationDataset', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified conversation dataset. - * @param \Google\Cloud\Dialogflow\V2\GetConversationDatasetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetConversationDataset(\Google\Cloud\Dialogflow\V2\GetConversationDatasetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/GetConversationDataset', - $argument, - ['\Google\Cloud\Dialogflow\V2\ConversationDataset', 'decode'], - $metadata, $options); - } - - /** - * Returns the list of all conversation datasets in the specified - * project and location. - * @param \Google\Cloud\Dialogflow\V2\ListConversationDatasetsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListConversationDatasets(\Google\Cloud\Dialogflow\V2\ListConversationDatasetsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/ListConversationDatasets', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListConversationDatasetsResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified conversation dataset. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * @param \Google\Cloud\Dialogflow\V2\DeleteConversationDatasetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteConversationDataset(\Google\Cloud\Dialogflow\V2\DeleteConversationDatasetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/DeleteConversationDataset', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Import data into the specified conversation dataset. Note that it - * is not allowed to import data to a conversation dataset that - * already has data in it. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata] - * - `response`: - * [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse] - * @param \Google\Cloud\Dialogflow\V2\ImportConversationDataRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ImportConversationData(\Google\Cloud\Dialogflow\V2\ImportConversationDataRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationDatasets/ImportConversationData', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent.php deleted file mode 100644 index 4a557d0712c2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dialogflow.v2.ConversationEvent - */ -class ConversationEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the conversation this notification - * refers to. - * Format: `projects//conversations/`. - * - * Generated from protobuf field string conversation = 1; - */ - protected $conversation = ''; - /** - * The type of the event that this notification refers to. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationEvent.Type type = 2; - */ - protected $type = 0; - /** - * More detailed information about an error. Only set for type - * UNRECOVERABLE_ERROR_IN_PHONE_CALL. - * - * Generated from protobuf field .google.rpc.Status error_status = 3; - */ - protected $error_status = null; - protected $payload; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation - * The unique identifier of the conversation this notification - * refers to. - * Format: `projects//conversations/`. - * @type int $type - * The type of the event that this notification refers to. - * @type \Google\Rpc\Status $error_status - * More detailed information about an error. Only set for type - * UNRECOVERABLE_ERROR_IN_PHONE_CALL. - * @type \Google\Cloud\Dialogflow\V2\Message $new_message_payload - * Payload of NEW_MESSAGE event. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationEvent::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the conversation this notification - * refers to. - * Format: `projects//conversations/`. - * - * Generated from protobuf field string conversation = 1; - * @return string - */ - public function getConversation() - { - return $this->conversation; - } - - /** - * The unique identifier of the conversation this notification - * refers to. - * Format: `projects//conversations/`. - * - * Generated from protobuf field string conversation = 1; - * @param string $var - * @return $this - */ - public function setConversation($var) - { - GPBUtil::checkString($var, True); - $this->conversation = $var; - - return $this; - } - - /** - * The type of the event that this notification refers to. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationEvent.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the event that this notification refers to. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationEvent.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationEvent\Type::class); - $this->type = $var; - - return $this; - } - - /** - * More detailed information about an error. Only set for type - * UNRECOVERABLE_ERROR_IN_PHONE_CALL. - * - * Generated from protobuf field .google.rpc.Status error_status = 3; - * @return \Google\Rpc\Status|null - */ - public function getErrorStatus() - { - return $this->error_status; - } - - public function hasErrorStatus() - { - return isset($this->error_status); - } - - public function clearErrorStatus() - { - unset($this->error_status); - } - - /** - * More detailed information about an error. Only set for type - * UNRECOVERABLE_ERROR_IN_PHONE_CALL. - * - * Generated from protobuf field .google.rpc.Status error_status = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setErrorStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error_status = $var; - - return $this; - } - - /** - * Payload of NEW_MESSAGE event. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Message new_message_payload = 4; - * @return \Google\Cloud\Dialogflow\V2\Message|null - */ - public function getNewMessagePayload() - { - return $this->readOneof(4); - } - - public function hasNewMessagePayload() - { - return $this->hasOneof(4); - } - - /** - * Payload of NEW_MESSAGE event. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Message new_message_payload = 4; - * @param \Google\Cloud\Dialogflow\V2\Message $var - * @return $this - */ - public function setNewMessagePayload($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Message::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getPayload() - { - return $this->whichOneof("payload"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent/Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent/Type.php deleted file mode 100644 index 528852c42e6f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent/Type.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.dialogflow.v2.ConversationEvent.Type - */ -class Type -{ - /** - * Type not set. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * A new conversation has been opened. This is fired when a telephone call - * is answered, or a conversation is created via the API. - * - * Generated from protobuf enum CONVERSATION_STARTED = 1; - */ - const CONVERSATION_STARTED = 1; - /** - * An existing conversation has closed. This is fired when a telephone call - * is terminated, or a conversation is closed via the API. - * - * Generated from protobuf enum CONVERSATION_FINISHED = 2; - */ - const CONVERSATION_FINISHED = 2; - /** - * An existing conversation has received notification from Dialogflow that - * human intervention is required. - * - * Generated from protobuf enum HUMAN_INTERVENTION_NEEDED = 3; - */ - const HUMAN_INTERVENTION_NEEDED = 3; - /** - * An existing conversation has received a new message, either from API or - * telephony. It is configured in - * [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2.ConversationProfile.new_message_event_notification_config] - * - * Generated from protobuf enum NEW_MESSAGE = 5; - */ - const NEW_MESSAGE = 5; - /** - * Unrecoverable error during a telephone call. - * In general non-recoverable errors only occur if something was - * misconfigured in the ConversationProfile corresponding to the call. After - * a non-recoverable error, Dialogflow may stop responding. - * We don't fire this event: - * * in an API call because we can directly return the error, or, - * * when we can recover from an error. - * - * Generated from protobuf enum UNRECOVERABLE_ERROR = 4; - */ - const UNRECOVERABLE_ERROR = 4; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::CONVERSATION_STARTED => 'CONVERSATION_STARTED', - self::CONVERSATION_FINISHED => 'CONVERSATION_FINISHED', - self::HUMAN_INTERVENTION_NEEDED => 'HUMAN_INTERVENTION_NEEDED', - self::NEW_MESSAGE => 'NEW_MESSAGE', - self::UNRECOVERABLE_ERROR => 'UNRECOVERABLE_ERROR', - ]; - - 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\Dialogflow\V2\ConversationEvent_Type::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent_Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent_Type.php deleted file mode 100644 index d97b4ab2ee73..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationEvent_Type.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.ConversationInfo - */ -class ConversationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The language code of the conversation data within this dataset. - * See https://cloud.google.com/apis/design/standard_fields for more - * information. Supports all UTF-8 languages. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * Optional. The language code of the conversation data within this dataset. - * See https://cloud.google.com/apis/design/standard_fields for more - * information. Supports all UTF-8 languages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The language code of the conversation data within this dataset. - * See https://cloud.google.com/apis/design/standard_fields for more - * information. Supports all UTF-8 languages. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language code of the conversation data within this dataset. - * See https://cloud.google.com/apis/design/standard_fields for more - * information. Supports all UTF-8 languages. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel.php deleted file mode 100644 index 411295745a1d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel.php +++ /dev/null @@ -1,346 +0,0 @@ -google.cloud.dialogflow.v2.ConversationModel - */ -class ConversationModel extends \Google\Protobuf\Internal\Message -{ - /** - * ConversationModel resource name. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The display name of the model. At most 64 bytes long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Output only. Creation time of this model. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Required. Datasets used to create model. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $datasets; - /** - * Output only. State of the model. A model can only serve prediction requests - * after it gets deployed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Language code for the conversation model. If not specified, the language - * is en-US. Language at ConversationModel should be set for all non en-us - * languages. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * - * Generated from protobuf field string language_code = 19; - */ - protected $language_code = ''; - protected $model_metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * ConversationModel resource name. Format: - * `projects//conversationModels/` - * @type string $display_name - * Required. The display name of the model. At most 64 bytes long. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this model. - * @type array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $datasets - * Required. Datasets used to create model. - * @type int $state - * Output only. State of the model. A model can only serve prediction requests - * after it gets deployed. - * @type string $language_code - * Language code for the conversation model. If not specified, the language - * is en-US. Language at ConversationModel should be set for all non en-us - * languages. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * @type \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata $article_suggestion_model_metadata - * Metadata for article suggestion models. - * @type \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata $smart_reply_model_metadata - * Metadata for smart reply models. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * ConversationModel resource name. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * ConversationModel resource name. Format: - * `projects//conversationModels/` - * - * 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; - } - - /** - * Required. The display name of the model. At most 64 bytes long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The display name of the model. At most 64 bytes long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Creation time of this model. - * - * 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. Creation time of this model. - * - * 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; - } - - /** - * Required. Datasets used to create model. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatasets() - { - return $this->datasets; - } - - /** - * Required. Datasets used to create model. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatasets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\InputDataset::class); - $this->datasets = $arr; - - return $this; - } - - /** - * Output only. State of the model. A model can only serve prediction requests - * after it gets deployed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the model. A model can only serve prediction requests - * after it gets deployed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationModel\State::class); - $this->state = $var; - - return $this; - } - - /** - * Language code for the conversation model. If not specified, the language - * is en-US. Language at ConversationModel should be set for all non en-us - * languages. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * - * Generated from protobuf field string language_code = 19; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Language code for the conversation model. If not specified, the language - * is en-US. Language at ConversationModel should be set for all non en-us - * languages. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * - * Generated from protobuf field string language_code = 19; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Metadata for article suggestion models. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata article_suggestion_model_metadata = 8; - * @return \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata|null - */ - public function getArticleSuggestionModelMetadata() - { - return $this->readOneof(8); - } - - public function hasArticleSuggestionModelMetadata() - { - return $this->hasOneof(8); - } - - /** - * Metadata for article suggestion models. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata article_suggestion_model_metadata = 8; - * @param \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata $var - * @return $this - */ - public function setArticleSuggestionModelMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Metadata for smart reply models. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SmartReplyModelMetadata smart_reply_model_metadata = 9; - * @return \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata|null - */ - public function getSmartReplyModelMetadata() - { - return $this->readOneof(9); - } - - public function hasSmartReplyModelMetadata() - { - return $this->hasOneof(9); - } - - /** - * Metadata for smart reply models. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SmartReplyModelMetadata smart_reply_model_metadata = 9; - * @param \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata $var - * @return $this - */ - public function setSmartReplyModelMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * @return string - */ - public function getModelMetadata() - { - return $this->whichOneof("model_metadata"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/ModelType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/ModelType.php deleted file mode 100644 index e18b5e917760..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/ModelType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.v2.ConversationModel.ModelType - */ -class ModelType -{ - /** - * ModelType unspecified. - * - * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; - */ - const MODEL_TYPE_UNSPECIFIED = 0; - /** - * ModelType smart reply dual encoder model. - * - * Generated from protobuf enum SMART_REPLY_DUAL_ENCODER_MODEL = 2; - */ - const SMART_REPLY_DUAL_ENCODER_MODEL = 2; - /** - * ModelType smart reply bert model. - * - * Generated from protobuf enum SMART_REPLY_BERT_MODEL = 6; - */ - const SMART_REPLY_BERT_MODEL = 6; - - private static $valueToName = [ - self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', - self::SMART_REPLY_DUAL_ENCODER_MODEL => 'SMART_REPLY_DUAL_ENCODER_MODEL', - self::SMART_REPLY_BERT_MODEL => 'SMART_REPLY_BERT_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(ModelType::class, \Google\Cloud\Dialogflow\V2\ConversationModel_ModelType::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/State.php deleted file mode 100644 index fcfa0dcd49b4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel/State.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dialogflow.v2.ConversationModel.State - */ -class State -{ - /** - * Should not be used, an un-set enum has this value by default. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Model being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Model is not deployed but ready to deploy. - * - * Generated from protobuf enum UNDEPLOYED = 2; - */ - const UNDEPLOYED = 2; - /** - * Model is deploying. - * - * Generated from protobuf enum DEPLOYING = 3; - */ - const DEPLOYING = 3; - /** - * Model is deployed and ready to use. - * - * Generated from protobuf enum DEPLOYED = 4; - */ - const DEPLOYED = 4; - /** - * Model is undeploying. - * - * Generated from protobuf enum UNDEPLOYING = 5; - */ - const UNDEPLOYING = 5; - /** - * Model is deleting. - * - * Generated from protobuf enum DELETING = 6; - */ - const DELETING = 6; - /** - * Model is in error state. Not ready to deploy and use. - * - * Generated from protobuf enum FAILED = 7; - */ - const FAILED = 7; - /** - * Model is being created but the training has not started, - * The model may remain in this state until there is enough capacity to - * start training. - * - * Generated from protobuf enum PENDING = 8; - */ - const PENDING = 8; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::UNDEPLOYED => 'UNDEPLOYED', - self::DEPLOYING => 'DEPLOYING', - self::DEPLOYED => 'DEPLOYED', - self::UNDEPLOYING => 'UNDEPLOYING', - self::DELETING => 'DELETING', - self::FAILED => 'FAILED', - self::PENDING => 'PENDING', - ]; - - 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\Dialogflow\V2\ConversationModel_State::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelEvaluation.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelEvaluation.php deleted file mode 100644 index a1a91b98b37c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModelEvaluation.php +++ /dev/null @@ -1,329 +0,0 @@ -google.cloud.dialogflow.v2.ConversationModelEvaluation - */ -class ConversationModelEvaluation extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the evaluation. Format: - * `projects//conversationModels//evaluations/` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. The display name of the model evaluation. At most 64 bytes long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. The configuration of the evaluation task. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig evaluation_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $evaluation_config = null; - /** - * Output only. Creation time of this model. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Human eval template in csv format. - * It tooks real-world conversations provided through input dataset, generates - * example suggestions for customer to verify quality of the model. - * For Smart Reply, the generated csv file contains columns of - * Context, (Suggestions,Q1,Q2)*3, Actual reply. - * Context contains at most 10 latest messages in the conversation prior to - * the current suggestion. - * Q1: "Would you send it as the next message of agent?" - * Evaluated based on whether the suggest is appropriate to be sent by - * agent in current context. - * Q2: "Does the suggestion move the conversation closer to resolution?" - * Evaluated based on whether the suggestion provide solutions, or answers - * customer's question or collect information from customer to resolve the - * customer's issue. - * Actual reply column contains the actual agent reply sent in the context. - * - * Generated from protobuf field string raw_human_eval_template_csv = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $raw_human_eval_template_csv = ''; - protected $metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the evaluation. Format: - * `projects//conversationModels//evaluations/` - * @type string $display_name - * Optional. The display name of the model evaluation. At most 64 bytes long. - * @type \Google\Cloud\Dialogflow\V2\EvaluationConfig $evaluation_config - * Optional. The configuration of the evaluation task. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this model. - * @type \Google\Cloud\Dialogflow\V2\SmartReplyMetrics $smart_reply_metrics - * Output only. Only available when model is for smart reply. - * @type string $raw_human_eval_template_csv - * Output only. Human eval template in csv format. - * It tooks real-world conversations provided through input dataset, generates - * example suggestions for customer to verify quality of the model. - * For Smart Reply, the generated csv file contains columns of - * Context, (Suggestions,Q1,Q2)*3, Actual reply. - * Context contains at most 10 latest messages in the conversation prior to - * the current suggestion. - * Q1: "Would you send it as the next message of agent?" - * Evaluated based on whether the suggest is appropriate to be sent by - * agent in current context. - * Q2: "Does the suggestion move the conversation closer to resolution?" - * Evaluated based on whether the suggestion provide solutions, or answers - * customer's question or collect information from customer to resolve the - * customer's issue. - * Actual reply column contains the actual agent reply sent in the context. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the evaluation. Format: - * `projects//conversationModels//evaluations/` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the evaluation. Format: - * `projects//conversationModels//evaluations/` - * - * 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; - } - - /** - * Optional. The display name of the model evaluation. At most 64 bytes long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. The display name of the model evaluation. At most 64 bytes long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. The configuration of the evaluation task. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig evaluation_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\EvaluationConfig|null - */ - public function getEvaluationConfig() - { - return $this->evaluation_config; - } - - public function hasEvaluationConfig() - { - return isset($this->evaluation_config); - } - - public function clearEvaluationConfig() - { - unset($this->evaluation_config); - } - - /** - * Optional. The configuration of the evaluation task. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig evaluation_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\EvaluationConfig $var - * @return $this - */ - public function setEvaluationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EvaluationConfig::class); - $this->evaluation_config = $var; - - return $this; - } - - /** - * Output only. Creation time of this model. - * - * 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. Creation time of this model. - * - * 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. Only available when model is for smart reply. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SmartReplyMetrics smart_reply_metrics = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\SmartReplyMetrics|null - */ - public function getSmartReplyMetrics() - { - return $this->readOneof(5); - } - - public function hasSmartReplyMetrics() - { - return $this->hasOneof(5); - } - - /** - * Output only. Only available when model is for smart reply. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SmartReplyMetrics smart_reply_metrics = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\SmartReplyMetrics $var - * @return $this - */ - public function setSmartReplyMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SmartReplyMetrics::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Output only. Human eval template in csv format. - * It tooks real-world conversations provided through input dataset, generates - * example suggestions for customer to verify quality of the model. - * For Smart Reply, the generated csv file contains columns of - * Context, (Suggestions,Q1,Q2)*3, Actual reply. - * Context contains at most 10 latest messages in the conversation prior to - * the current suggestion. - * Q1: "Would you send it as the next message of agent?" - * Evaluated based on whether the suggest is appropriate to be sent by - * agent in current context. - * Q2: "Does the suggestion move the conversation closer to resolution?" - * Evaluated based on whether the suggestion provide solutions, or answers - * customer's question or collect information from customer to resolve the - * customer's issue. - * Actual reply column contains the actual agent reply sent in the context. - * - * Generated from protobuf field string raw_human_eval_template_csv = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRawHumanEvalTemplateCsv() - { - return $this->raw_human_eval_template_csv; - } - - /** - * Output only. Human eval template in csv format. - * It tooks real-world conversations provided through input dataset, generates - * example suggestions for customer to verify quality of the model. - * For Smart Reply, the generated csv file contains columns of - * Context, (Suggestions,Q1,Q2)*3, Actual reply. - * Context contains at most 10 latest messages in the conversation prior to - * the current suggestion. - * Q1: "Would you send it as the next message of agent?" - * Evaluated based on whether the suggest is appropriate to be sent by - * agent in current context. - * Q2: "Does the suggestion move the conversation closer to resolution?" - * Evaluated based on whether the suggestion provide solutions, or answers - * customer's question or collect information from customer to resolve the - * customer's issue. - * Actual reply column contains the actual agent reply sent in the context. - * - * Generated from protobuf field string raw_human_eval_template_csv = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRawHumanEvalTemplateCsv($var) - { - GPBUtil::checkString($var, True); - $this->raw_human_eval_template_csv = $var; - - return $this; - } - - /** - * @return string - */ - public function getMetrics() - { - return $this->whichOneof("metrics"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_ModelType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_ModelType.php deleted file mode 100644 index e2d40dcac67d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationModel_ModelType.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/CreateConversationModel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets conversation model. - * @param \Google\Cloud\Dialogflow\V2\GetConversationModelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetConversationModel(\Google\Cloud\Dialogflow\V2\GetConversationModelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/GetConversationModel', - $argument, - ['\Google\Cloud\Dialogflow\V2\ConversationModel', 'decode'], - $metadata, $options); - } - - /** - * Lists conversation models. - * @param \Google\Cloud\Dialogflow\V2\ListConversationModelsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListConversationModels(\Google\Cloud\Dialogflow\V2\ListConversationModelsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/ListConversationModels', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListConversationModelsResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes a model. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * @param \Google\Cloud\Dialogflow\V2\DeleteConversationModelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteConversationModel(\Google\Cloud\Dialogflow\V2\DeleteConversationModelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/DeleteConversationModel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deploys a model. If a model is already deployed, deploying it - * has no effect. A model can only serve prediction requests after it gets - * deployed. For article suggestion, custom model will not be used unless - * it is deployed. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * @param \Google\Cloud\Dialogflow\V2\DeployConversationModelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeployConversationModel(\Google\Cloud\Dialogflow\V2\DeployConversationModelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/DeployConversationModel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Undeploys a model. If the model is not deployed this method has no effect. - * If the model is currently being used: - * - For article suggestion, article suggestion will fallback to the default - * model if model is undeployed. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * @param \Google\Cloud\Dialogflow\V2\UndeployConversationModelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UndeployConversationModel(\Google\Cloud\Dialogflow\V2\UndeployConversationModelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/UndeployConversationModel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets an evaluation of conversation model. - * @param \Google\Cloud\Dialogflow\V2\GetConversationModelEvaluationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetConversationModelEvaluation(\Google\Cloud\Dialogflow\V2\GetConversationModelEvaluationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/GetConversationModelEvaluation', - $argument, - ['\Google\Cloud\Dialogflow\V2\ConversationModelEvaluation', 'decode'], - $metadata, $options); - } - - /** - * Lists evaluations of a conversation model. - * @param \Google\Cloud\Dialogflow\V2\ListConversationModelEvaluationsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListConversationModelEvaluations(\Google\Cloud\Dialogflow\V2\ListConversationModelEvaluationsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/ListConversationModelEvaluations', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListConversationModelEvaluationsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates evaluation of a conversation model. - * @param \Google\Cloud\Dialogflow\V2\CreateConversationModelEvaluationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateConversationModelEvaluation(\Google\Cloud\Dialogflow\V2\CreateConversationModelEvaluationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationModels/CreateConversationModelEvaluation', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationPhoneNumber.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationPhoneNumber.php deleted file mode 100644 index 64e096436091..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationPhoneNumber.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dialogflow.v2.ConversationPhoneNumber - */ -class ConversationPhoneNumber extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The phone number to connect to this conversation. - * - * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $phone_number = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $phone_number - * Output only. The phone number to connect to this conversation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The phone number to connect to this conversation. - * - * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPhoneNumber() - { - return $this->phone_number; - } - - /** - * Output only. The phone number to connect to this conversation. - * - * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPhoneNumber($var) - { - GPBUtil::checkString($var, True); - $this->phone_number = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfile.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfile.php deleted file mode 100644 index 339bb74d51a8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfile.php +++ /dev/null @@ -1,651 +0,0 @@ -google.cloud.dialogflow.v2.ConversationProfile - */ -class ConversationProfile extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of this conversation profile. - * Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. Human readable name for this profile. Max length 1024 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Output only. Create time of the conversation profile. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Update time of the conversation profile. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Configuration for an automated agent to use with this profile. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentConfig automated_agent_config = 3; - */ - protected $automated_agent_config = null; - /** - * Configuration for agent assistance to use with this profile. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig human_agent_assistant_config = 4; - */ - protected $human_agent_assistant_config = null; - /** - * Configuration for connecting to a live agent. - * Currently, this feature is not general available, please contact Google - * to get access. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig human_agent_handoff_config = 5; - */ - protected $human_agent_handoff_config = null; - /** - * Configuration for publishing conversation lifecycle events. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 6; - */ - protected $notification_config = null; - /** - * Configuration for logging conversation lifecycle events. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.LoggingConfig logging_config = 7; - */ - protected $logging_config = null; - /** - * Configuration for publishing new message events. Event will be sent in - * format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig new_message_event_notification_config = 8; - */ - protected $new_message_event_notification_config = null; - /** - * Settings for speech transcription. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechToTextConfig stt_config = 9; - */ - protected $stt_config = null; - /** - * Language code for the conversation profile. If not specified, the language - * is en-US. Language at ConversationProfile should be set for all non en-US - * languages. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * - * Generated from protobuf field string language_code = 10; - */ - protected $language_code = ''; - /** - * The time zone of this conversational profile from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. Defaults to America/New_York. - * - * Generated from protobuf field string time_zone = 14; - */ - protected $time_zone = ''; - /** - * Name of the CX SecuritySettings reference for the agent. - * Format: `projects//locations//securitySettings/`. - * - * Generated from protobuf field string security_settings = 13 [(.google.api.resource_reference) = { - */ - protected $security_settings = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of this conversation profile. - * Format: `projects//locations//conversationProfiles/`. - * @type string $display_name - * Required. Human readable name for this profile. Max length 1024 bytes. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create time of the conversation profile. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Update time of the conversation profile. - * @type \Google\Cloud\Dialogflow\V2\AutomatedAgentConfig $automated_agent_config - * Configuration for an automated agent to use with this profile. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig $human_agent_assistant_config - * Configuration for agent assistance to use with this profile. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig $human_agent_handoff_config - * Configuration for connecting to a live agent. - * Currently, this feature is not general available, please contact Google - * to get access. - * @type \Google\Cloud\Dialogflow\V2\NotificationConfig $notification_config - * Configuration for publishing conversation lifecycle events. - * @type \Google\Cloud\Dialogflow\V2\LoggingConfig $logging_config - * Configuration for logging conversation lifecycle events. - * @type \Google\Cloud\Dialogflow\V2\NotificationConfig $new_message_event_notification_config - * Configuration for publishing new message events. Event will be sent in - * format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] - * @type \Google\Cloud\Dialogflow\V2\SpeechToTextConfig $stt_config - * Settings for speech transcription. - * @type string $language_code - * Language code for the conversation profile. If not specified, the language - * is en-US. Language at ConversationProfile should be set for all non en-US - * languages. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * @type string $time_zone - * The time zone of this conversational profile from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. Defaults to America/New_York. - * @type string $security_settings - * Name of the CX SecuritySettings reference for the agent. - * Format: `projects//locations//securitySettings/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of this conversation profile. - * Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of this conversation profile. - * Format: `projects//locations//conversationProfiles/`. - * - * 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; - } - - /** - * Required. Human readable name for this profile. Max length 1024 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Human readable name for this profile. Max length 1024 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Create time of the conversation profile. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. Create time of the conversation profile. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. Update time of the conversation profile. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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. Update time of the conversation profile. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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; - } - - /** - * Configuration for an automated agent to use with this profile. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentConfig automated_agent_config = 3; - * @return \Google\Cloud\Dialogflow\V2\AutomatedAgentConfig|null - */ - public function getAutomatedAgentConfig() - { - return $this->automated_agent_config; - } - - public function hasAutomatedAgentConfig() - { - return isset($this->automated_agent_config); - } - - public function clearAutomatedAgentConfig() - { - unset($this->automated_agent_config); - } - - /** - * Configuration for an automated agent to use with this profile. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentConfig automated_agent_config = 3; - * @param \Google\Cloud\Dialogflow\V2\AutomatedAgentConfig $var - * @return $this - */ - public function setAutomatedAgentConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AutomatedAgentConfig::class); - $this->automated_agent_config = $var; - - return $this; - } - - /** - * Configuration for agent assistance to use with this profile. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig human_agent_assistant_config = 4; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig|null - */ - public function getHumanAgentAssistantConfig() - { - return $this->human_agent_assistant_config; - } - - public function hasHumanAgentAssistantConfig() - { - return isset($this->human_agent_assistant_config); - } - - public function clearHumanAgentAssistantConfig() - { - unset($this->human_agent_assistant_config); - } - - /** - * Configuration for agent assistance to use with this profile. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig human_agent_assistant_config = 4; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig $var - * @return $this - */ - public function setHumanAgentAssistantConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig::class); - $this->human_agent_assistant_config = $var; - - return $this; - } - - /** - * Configuration for connecting to a live agent. - * Currently, this feature is not general available, please contact Google - * to get access. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig human_agent_handoff_config = 5; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig|null - */ - public function getHumanAgentHandoffConfig() - { - return $this->human_agent_handoff_config; - } - - public function hasHumanAgentHandoffConfig() - { - return isset($this->human_agent_handoff_config); - } - - public function clearHumanAgentHandoffConfig() - { - unset($this->human_agent_handoff_config); - } - - /** - * Configuration for connecting to a live agent. - * Currently, this feature is not general available, please contact Google - * to get access. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig human_agent_handoff_config = 5; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig $var - * @return $this - */ - public function setHumanAgentHandoffConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig::class); - $this->human_agent_handoff_config = $var; - - return $this; - } - - /** - * Configuration for publishing conversation lifecycle events. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 6; - * @return \Google\Cloud\Dialogflow\V2\NotificationConfig|null - */ - public function getNotificationConfig() - { - return $this->notification_config; - } - - public function hasNotificationConfig() - { - return isset($this->notification_config); - } - - public function clearNotificationConfig() - { - unset($this->notification_config); - } - - /** - * Configuration for publishing conversation lifecycle events. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 6; - * @param \Google\Cloud\Dialogflow\V2\NotificationConfig $var - * @return $this - */ - public function setNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\NotificationConfig::class); - $this->notification_config = $var; - - return $this; - } - - /** - * Configuration for logging conversation lifecycle events. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.LoggingConfig logging_config = 7; - * @return \Google\Cloud\Dialogflow\V2\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Configuration for logging conversation lifecycle events. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.LoggingConfig logging_config = 7; - * @param \Google\Cloud\Dialogflow\V2\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * Configuration for publishing new message events. Event will be sent in - * format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig new_message_event_notification_config = 8; - * @return \Google\Cloud\Dialogflow\V2\NotificationConfig|null - */ - public function getNewMessageEventNotificationConfig() - { - return $this->new_message_event_notification_config; - } - - public function hasNewMessageEventNotificationConfig() - { - return isset($this->new_message_event_notification_config); - } - - public function clearNewMessageEventNotificationConfig() - { - unset($this->new_message_event_notification_config); - } - - /** - * Configuration for publishing new message events. Event will be sent in - * format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig new_message_event_notification_config = 8; - * @param \Google\Cloud\Dialogflow\V2\NotificationConfig $var - * @return $this - */ - public function setNewMessageEventNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\NotificationConfig::class); - $this->new_message_event_notification_config = $var; - - return $this; - } - - /** - * Settings for speech transcription. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechToTextConfig stt_config = 9; - * @return \Google\Cloud\Dialogflow\V2\SpeechToTextConfig|null - */ - public function getSttConfig() - { - return $this->stt_config; - } - - public function hasSttConfig() - { - return isset($this->stt_config); - } - - public function clearSttConfig() - { - unset($this->stt_config); - } - - /** - * Settings for speech transcription. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechToTextConfig stt_config = 9; - * @param \Google\Cloud\Dialogflow\V2\SpeechToTextConfig $var - * @return $this - */ - public function setSttConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SpeechToTextConfig::class); - $this->stt_config = $var; - - return $this; - } - - /** - * Language code for the conversation profile. If not specified, the language - * is en-US. Language at ConversationProfile should be set for all non en-US - * languages. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * - * Generated from protobuf field string language_code = 10; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Language code for the conversation profile. If not specified, the language - * is en-US. Language at ConversationProfile should be set for all non en-US - * languages. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * - * 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; - } - - /** - * The time zone of this conversational profile from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. Defaults to America/New_York. - * - * Generated from protobuf field string time_zone = 14; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * The time zone of this conversational profile from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. Defaults to America/New_York. - * - * Generated from protobuf field string time_zone = 14; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * Name of the CX SecuritySettings reference for the agent. - * Format: `projects//locations//securitySettings/`. - * - * Generated from protobuf field string security_settings = 13 [(.google.api.resource_reference) = { - * @return string - */ - public function getSecuritySettings() - { - return $this->security_settings; - } - - /** - * Name of the CX SecuritySettings reference for the agent. - * Format: `projects//locations//securitySettings/`. - * - * Generated from protobuf field string security_settings = 13 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSecuritySettings($var) - { - GPBUtil::checkString($var, True); - $this->security_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfilesGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfilesGrpcClient.php deleted file mode 100644 index e192f24bb23f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ConversationProfilesGrpcClient.php +++ /dev/null @@ -1,178 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/ListConversationProfiles', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListConversationProfilesResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified conversation profile. - * @param \Google\Cloud\Dialogflow\V2\GetConversationProfileRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetConversationProfile(\Google\Cloud\Dialogflow\V2\GetConversationProfileRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/GetConversationProfile', - $argument, - ['\Google\Cloud\Dialogflow\V2\ConversationProfile', 'decode'], - $metadata, $options); - } - - /** - * Creates a conversation profile in the specified project. - * - * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] - * aren't populated in the response. You can retrieve them via - * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] - * API. - * @param \Google\Cloud\Dialogflow\V2\CreateConversationProfileRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateConversationProfile(\Google\Cloud\Dialogflow\V2\CreateConversationProfileRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/CreateConversationProfile', - $argument, - ['\Google\Cloud\Dialogflow\V2\ConversationProfile', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified conversation profile. - * - * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] - * aren't populated in the response. You can retrieve them via - * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] - * API. - * @param \Google\Cloud\Dialogflow\V2\UpdateConversationProfileRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateConversationProfile(\Google\Cloud\Dialogflow\V2\UpdateConversationProfileRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/UpdateConversationProfile', - $argument, - ['\Google\Cloud\Dialogflow\V2\ConversationProfile', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified conversation profile. - * @param \Google\Cloud\Dialogflow\V2\DeleteConversationProfileRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteConversationProfile(\Google\Cloud\Dialogflow\V2\DeleteConversationProfileRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/DeleteConversationProfile', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Adds or updates a suggestion feature in a conversation profile. - * If the conversation profile contains the type of suggestion feature for - * the participant role, it will update it. Otherwise it will insert the - * suggestion feature. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata] - * - `response`: - * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] - * - * If a long running operation to add or update suggestion feature - * config for the same conversation profile, participant role and suggestion - * feature type exists, please cancel the existing long running operation - * before sending such request, otherwise the request will be rejected. - * @param \Google\Cloud\Dialogflow\V2\SetSuggestionFeatureConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetSuggestionFeatureConfig(\Google\Cloud\Dialogflow\V2\SetSuggestionFeatureConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/SetSuggestionFeatureConfig', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Clears a suggestion feature from a conversation profile for the given - * participant role. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata] - * - `response`: - * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] - * @param \Google\Cloud\Dialogflow\V2\ClearSuggestionFeatureConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ClearSuggestionFeatureConfig(\Google\Cloud\Dialogflow\V2\ClearSuggestionFeatureConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.ConversationProfiles/ClearSuggestionFeatureConfig', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_ConversationStage.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_ConversationStage.php deleted file mode 100644 index 58067f8bf7d6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Conversation_ConversationStage.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Conversations/CreateConversation', - $argument, - ['\Google\Cloud\Dialogflow\V2\Conversation', 'decode'], - $metadata, $options); - } - - /** - * Returns the list of all conversations in the specified project. - * @param \Google\Cloud\Dialogflow\V2\ListConversationsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListConversations(\Google\Cloud\Dialogflow\V2\ListConversationsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/ListConversations', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListConversationsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specific conversation. - * @param \Google\Cloud\Dialogflow\V2\GetConversationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetConversation(\Google\Cloud\Dialogflow\V2\GetConversationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/GetConversation', - $argument, - ['\Google\Cloud\Dialogflow\V2\Conversation', 'decode'], - $metadata, $options); - } - - /** - * Completes the specified conversation. Finished conversations are purged - * from the database after 30 days. - * @param \Google\Cloud\Dialogflow\V2\CompleteConversationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CompleteConversation(\Google\Cloud\Dialogflow\V2\CompleteConversationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/CompleteConversation', - $argument, - ['\Google\Cloud\Dialogflow\V2\Conversation', 'decode'], - $metadata, $options); - } - - /** - * Lists messages that belong to a given conversation. - * `messages` are ordered by `create_time` in descending order. To fetch - * updates without duplication, send request with filter - * `create_time_epoch_microseconds > - * [first item's create_time of previous request]` and empty page_token. - * @param \Google\Cloud\Dialogflow\V2\ListMessagesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListMessages(\Google\Cloud\Dialogflow\V2\ListMessagesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/ListMessages', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListMessagesResponse', 'decode'], - $metadata, $options); - } - - /** - * Suggests summary for a conversation based on specific historical messages. - * The range of the messages to be used for summary can be specified in the - * request. - * @param \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SuggestConversationSummary(\Google\Cloud\Dialogflow\V2\SuggestConversationSummaryRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Conversations/SuggestConversationSummary', - $argument, - ['\Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateContextRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateContextRequest.php deleted file mode 100644 index 381f163a11e7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateContextRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.dialogflow.v2.CreateContextRequest - */ -class CreateContextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The session to create a context for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The context to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The session to create a context for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @type \Google\Cloud\Dialogflow\V2\Context $context - * Required. The context to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); - parent::__construct($data); - } - - /** - * Required. The session to create a context for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 session to create a context for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 context to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Context|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * Required. The context to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Context $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Context::class); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetOperationMetadata.php deleted file mode 100644 index 2ef96b057c10..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetOperationMetadata.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - */ -class CreateConversationDatasetOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the conversation dataset that will be created. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { - */ - protected $conversation_dataset = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_dataset - * The resource name of the conversation dataset that will be created. Format: - * `projects//locations//conversationDatasets/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the conversation dataset that will be created. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getConversationDataset() - { - return $this->conversation_dataset; - } - - /** - * The resource name of the conversation dataset that will be created. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setConversationDataset($var) - { - GPBUtil::checkString($var, True); - $this->conversation_dataset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetRequest.php deleted file mode 100644 index 0f58113bf857..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationDatasetRequest.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationDatasetRequest - */ -class CreateConversationDatasetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to create conversation dataset for. Format: - * `projects//locations/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The conversation dataset to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationDataset conversation_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation_dataset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to create conversation dataset for. Format: - * `projects//locations/` - * @type \Google\Cloud\Dialogflow\V2\ConversationDataset $conversation_dataset - * Required. The conversation dataset to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to create conversation dataset for. Format: - * `projects//locations/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project to create conversation dataset for. Format: - * `projects//locations/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The conversation dataset to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationDataset conversation_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\ConversationDataset|null - */ - public function getConversationDataset() - { - return $this->conversation_dataset; - } - - public function hasConversationDataset() - { - return isset($this->conversation_dataset); - } - - public function clearConversationDataset() - { - unset($this->conversation_dataset); - } - - /** - * Required. The conversation dataset to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationDataset conversation_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\ConversationDataset $var - * @return $this - */ - public function setConversationDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationDataset::class); - $this->conversation_dataset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata.php deleted file mode 100644 index 1de934923f8f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata - */ -class CreateConversationModelEvaluationOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the conversation model. Format: - * `projects//locations//conversationModels//evaluations/` - * - * Generated from protobuf field string conversation_model_evaluation = 1; - */ - protected $conversation_model_evaluation = ''; - /** - * The resource name of the conversation model. Format: - * `projects//locations//conversationModels/` - * - * Generated from protobuf field string conversation_model = 4; - */ - protected $conversation_model = ''; - /** - * State of CreateConversationModel operation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State state = 2; - */ - protected $state = 0; - /** - * Timestamp when the request to create conversation model was submitted. The - * time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_model_evaluation - * The resource name of the conversation model. Format: - * `projects//locations//conversationModels//evaluations/` - * @type string $conversation_model - * The resource name of the conversation model. Format: - * `projects//locations//conversationModels/` - * @type int $state - * State of CreateConversationModel operation. - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when the request to create conversation model was submitted. The - * time is measured on server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the conversation model. Format: - * `projects//locations//conversationModels//evaluations/` - * - * Generated from protobuf field string conversation_model_evaluation = 1; - * @return string - */ - public function getConversationModelEvaluation() - { - return $this->conversation_model_evaluation; - } - - /** - * The resource name of the conversation model. Format: - * `projects//locations//conversationModels//evaluations/` - * - * Generated from protobuf field string conversation_model_evaluation = 1; - * @param string $var - * @return $this - */ - public function setConversationModelEvaluation($var) - { - GPBUtil::checkString($var, True); - $this->conversation_model_evaluation = $var; - - return $this; - } - - /** - * The resource name of the conversation model. Format: - * `projects//locations//conversationModels/` - * - * Generated from protobuf field string conversation_model = 4; - * @return string - */ - public function getConversationModel() - { - return $this->conversation_model; - } - - /** - * The resource name of the conversation model. Format: - * `projects//locations//conversationModels/` - * - * Generated from protobuf field string conversation_model = 4; - * @param string $var - * @return $this - */ - public function setConversationModel($var) - { - GPBUtil::checkString($var, True); - $this->conversation_model = $var; - - return $this; - } - - /** - * State of CreateConversationModel operation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of CreateConversationModel operation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\CreateConversationModelEvaluationOperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * Timestamp when the request to create conversation model was submitted. The - * time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @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); - } - - /** - * Timestamp when the request to create conversation model was submitted. The - * time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata/State.php deleted file mode 100644 index f4ccf021f2f8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State - */ -class State -{ - /** - * Operation status not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The operation is being prepared. - * - * Generated from protobuf enum INITIALIZING = 1; - */ - const INITIALIZING = 1; - /** - * The operation is running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The operation is cancelled. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The operation has succeeded. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The operation has failed. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::INITIALIZING => 'INITIALIZING', - self::RUNNING => 'RUNNING', - self::CANCELLED => 'CANCELLED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - 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\Dialogflow\V2\CreateConversationModelEvaluationOperationMetadata_State::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata_State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata_State.php deleted file mode 100644 index c126c91cf89b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelEvaluationOperationMetadata_State.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest - */ -class CreateConversationModelEvaluationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation model resource name. Format: - * `projects//locations//conversationModels/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The conversation model evaluation to be created. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation_model_evaluation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The conversation model resource name. Format: - * `projects//locations//conversationModels/` - * @type \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation $conversation_model_evaluation - * Required. The conversation model evaluation to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation model resource name. Format: - * `projects//locations//conversationModels/` - * - * 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 conversation model resource name. Format: - * `projects//locations//conversationModels/` - * - * 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 model evaluation to be created. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation|null - */ - public function getConversationModelEvaluation() - { - return $this->conversation_model_evaluation; - } - - public function hasConversationModelEvaluation() - { - return isset($this->conversation_model_evaluation); - } - - public function clearConversationModelEvaluation() - { - unset($this->conversation_model_evaluation); - } - - /** - * Required. The conversation model evaluation to be created. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation $var - * @return $this - */ - public function setConversationModelEvaluation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation::class); - $this->conversation_model_evaluation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata.php deleted file mode 100644 index 3ec1f691d67a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata - */ -class CreateConversationModelOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - */ - protected $conversation_model = ''; - /** - * State of CreateConversationModel operation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State state = 2; - */ - protected $state = 0; - /** - * Timestamp when the request to create conversation model is submitted. The - * time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_model - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * @type int $state - * State of CreateConversationModel operation. - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when the request to create conversation model is submitted. The - * time is measured on server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - * @return string - */ - public function getConversationModel() - { - return $this->conversation_model; - } - - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - * @param string $var - * @return $this - */ - public function setConversationModel($var) - { - GPBUtil::checkString($var, True); - $this->conversation_model = $var; - - return $this; - } - - /** - * State of CreateConversationModel operation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of CreateConversationModel operation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\CreateConversationModelOperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * Timestamp when the request to create conversation model is submitted. The - * time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @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); - } - - /** - * Timestamp when the request to create conversation model is submitted. The - * time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata/State.php deleted file mode 100644 index 798f8671039b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata/State.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is submitted, but training has not started yet. - * The model may remain in this state until there is enough capacity to - * start training. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The training has succeeded. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The training has succeeded. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The training has been cancelled. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - /** - * The training is in cancelling state. - * - * Generated from protobuf enum CANCELLING = 5; - */ - const CANCELLING = 5; - /** - * Custom model is training. - * - * Generated from protobuf enum TRAINING = 6; - */ - const TRAINING = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - self::CANCELLING => 'CANCELLING', - self::TRAINING => 'TRAINING', - ]; - - 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\Dialogflow\V2\CreateConversationModelOperationMetadata_State::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata_State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata_State.php deleted file mode 100644 index 5f10b51ca1e5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationModelOperationMetadata_State.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationModelRequest - */ -class CreateConversationModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The project to create conversation model for. Format: - * `projects/` - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - /** - * Required. The conversation model to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel conversation_model = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation_model = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The project to create conversation model for. Format: - * `projects/` - * @type \Google\Cloud\Dialogflow\V2\ConversationModel $conversation_model - * Required. The conversation model to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The project to create conversation model for. Format: - * `projects/` - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The project to create conversation model for. Format: - * `projects/` - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The conversation model to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel conversation_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\ConversationModel|null - */ - public function getConversationModel() - { - return $this->conversation_model; - } - - public function hasConversationModel() - { - return isset($this->conversation_model); - } - - public function clearConversationModel() - { - unset($this->conversation_model); - } - - /** - * Required. The conversation model to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel conversation_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\ConversationModel $var - * @return $this - */ - public function setConversationModel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationModel::class); - $this->conversation_model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationProfileRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationProfileRequest.php deleted file mode 100644 index 5366e38f60b4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationProfileRequest.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationProfileRequest - */ -class CreateConversationProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to create a conversation profile for. - * Format: `projects//locations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The conversation profile to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation_profile = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to create a conversation profile for. - * Format: `projects//locations/`. - * @type \Google\Cloud\Dialogflow\V2\ConversationProfile $conversation_profile - * Required. The conversation profile to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to create a conversation profile for. - * Format: `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 project to create a conversation profile for. - * Format: `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 conversation profile to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\ConversationProfile|null - */ - public function getConversationProfile() - { - return $this->conversation_profile; - } - - public function hasConversationProfile() - { - return isset($this->conversation_profile); - } - - public function clearConversationProfile() - { - unset($this->conversation_profile); - } - - /** - * Required. The conversation profile to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\ConversationProfile $var - * @return $this - */ - public function setConversationProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationProfile::class); - $this->conversation_profile = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationRequest.php deleted file mode 100644 index f647fe15b59f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateConversationRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.dialogflow.v2.CreateConversationRequest - */ -class CreateConversationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource identifier of the project creating the conversation. - * Format: `projects//locations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The conversation to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation = null; - /** - * Optional. Identifier of the conversation. Generally it's auto generated by - * Google. Only set it if you cannot wait for the response to return a - * auto-generated one to you. - * The conversation ID must be compliant with the regression fomula - * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. - * If the field is provided, the caller is resposible for - * 1. the uniqueness of the ID, otherwise the request will be rejected. - * 2. the consistency for whether to use custom ID or not under a project to - * better ensure uniqueness. - * - * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $conversation_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource identifier of the project creating the conversation. - * Format: `projects//locations/`. - * @type \Google\Cloud\Dialogflow\V2\Conversation $conversation - * Required. The conversation to create. - * @type string $conversation_id - * Optional. Identifier of the conversation. Generally it's auto generated by - * Google. Only set it if you cannot wait for the response to return a - * auto-generated one to you. - * The conversation ID must be compliant with the regression fomula - * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. - * If the field is provided, the caller is resposible for - * 1. the uniqueness of the ID, otherwise the request will be rejected. - * 2. the consistency for whether to use custom ID or not under a project to - * better ensure uniqueness. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource identifier of the project creating the conversation. - * Format: `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. Resource identifier of the project creating the conversation. - * Format: `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 conversation to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Conversation|null - */ - public function getConversation() - { - return $this->conversation; - } - - public function hasConversation() - { - return isset($this->conversation); - } - - public function clearConversation() - { - unset($this->conversation); - } - - /** - * Required. The conversation to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Conversation $var - * @return $this - */ - public function setConversation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Conversation::class); - $this->conversation = $var; - - return $this; - } - - /** - * Optional. Identifier of the conversation. Generally it's auto generated by - * Google. Only set it if you cannot wait for the response to return a - * auto-generated one to you. - * The conversation ID must be compliant with the regression fomula - * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. - * If the field is provided, the caller is resposible for - * 1. the uniqueness of the ID, otherwise the request will be rejected. - * 2. the consistency for whether to use custom ID or not under a project to - * better ensure uniqueness. - * - * Generated from protobuf field string conversation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getConversationId() - { - return $this->conversation_id; - } - - /** - * Optional. Identifier of the conversation. Generally it's auto generated by - * Google. Only set it if you cannot wait for the response to return a - * auto-generated one to you. - * The conversation ID must be compliant with the regression fomula - * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. - * If the field is provided, the caller is resposible for - * 1. the uniqueness of the ID, otherwise the request will be rejected. - * 2. the consistency for whether to use custom ID or not under a project to - * better ensure uniqueness. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateDocumentRequest.php deleted file mode 100644 index 29adcf74cb60..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateDocumentRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.dialogflow.v2.CreateDocumentRequest - */ -class CreateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The knowledge base to create a document for. - * Format: `projects//locations//knowledgeBases/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The document to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The knowledge base to create a document for. - * Format: `projects//locations//knowledgeBases/`. - * @type \Google\Cloud\Dialogflow\V2\Document $document - * Required. The document to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The knowledge base to create a document for. - * Format: `projects//locations//knowledgeBases/`. - * - * 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 knowledge base to create a document for. - * Format: `projects//locations//knowledgeBases/`. - * - * 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 document to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The document to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Document::class); - $this->document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEntityTypeRequest.php deleted file mode 100644 index 9c80cfb76b73..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEntityTypeRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.dialogflow.v2.CreateEntityTypeRequest - */ -class CreateEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create a entity type for. - * Format: `projects//agent`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The entity type to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity_type = null; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to create a entity type for. - * Format: `projects//agent`. - * @type \Google\Cloud\Dialogflow\V2\EntityType $entity_type - * Required. The entity type to create. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create a entity type for. - * Format: `projects//agent`. - * - * 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 agent to create a entity type for. - * Format: `projects//agent`. - * - * 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 entity type to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\EntityType|null - */ - public function getEntityType() - { - return $this->entity_type; - } - - public function hasEntityType() - { - return isset($this->entity_type); - } - - public function clearEntityType() - { - unset($this->entity_type); - } - - /** - * Required. The entity type to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\EntityType $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EntityType::class); - $this->entity_type = $var; - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEnvironmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEnvironmentRequest.php deleted file mode 100644 index 44e1ccca9286..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateEnvironmentRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.dialogflow.v2.CreateEnvironmentRequest - */ -class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create an environment for. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The environment to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment = null; - /** - * Required. The unique id of the new environment. - * - * Generated from protobuf field string environment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to create an environment for. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * @type \Google\Cloud\Dialogflow\V2\Environment $environment - * Required. The environment to create. - * @type string $environment_id - * Required. The unique id of the new environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create an environment for. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * - * 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 agent to create an environment for. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * - * 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 environment to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Required. The environment to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Required. The unique id of the new environment. - * - * Generated from protobuf field string environment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEnvironmentId() - { - return $this->environment_id; - } - - /** - * Required. The unique id of the new environment. - * - * Generated from protobuf field string environment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEnvironmentId($var) - { - GPBUtil::checkString($var, True); - $this->environment_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateIntentRequest.php deleted file mode 100644 index 1694d3a61ac7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateIntentRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dialogflow.v2.CreateIntentRequest - */ -class CreateIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create a intent for. - * Format: `projects//agent`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The intent to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $intent = null; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $intent_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to create a intent for. - * Format: `projects//agent`. - * @type \Google\Cloud\Dialogflow\V2\Intent $intent - * Required. The intent to create. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type int $intent_view - * Optional. The resource view to apply to the returned intent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create a intent for. - * Format: `projects//agent`. - * - * 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 agent to create a intent for. - * Format: `projects//agent`. - * - * 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 intent to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Intent|null - */ - public function getIntent() - { - return $this->intent; - } - - public function hasIntent() - { - return isset($this->intent); - } - - public function clearIntent() - { - unset($this->intent); - } - - /** - * Required. The intent to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Intent $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent::class); - $this->intent = $var; - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIntentView() - { - return $this->intent_view; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIntentView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); - $this->intent_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateKnowledgeBaseRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateKnowledgeBaseRequest.php deleted file mode 100644 index e5eeb073de18..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateKnowledgeBaseRequest.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest - */ -class CreateKnowledgeBaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to create a knowledge base for. - * Format: `projects//locations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The knowledge base to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $knowledge_base = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to create a knowledge base for. - * Format: `projects//locations/`. - * @type \Google\Cloud\Dialogflow\V2\KnowledgeBase $knowledge_base - * Required. The knowledge base to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to create a knowledge base for. - * Format: `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 project to create a knowledge base for. - * Format: `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 knowledge base to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\KnowledgeBase|null - */ - public function getKnowledgeBase() - { - return $this->knowledge_base; - } - - public function hasKnowledgeBase() - { - return isset($this->knowledge_base); - } - - public function clearKnowledgeBase() - { - unset($this->knowledge_base); - } - - /** - * Required. The knowledge base to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\KnowledgeBase $var - * @return $this - */ - public function setKnowledgeBase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\KnowledgeBase::class); - $this->knowledge_base = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateParticipantRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateParticipantRequest.php deleted file mode 100644 index 8c0b12acfa47..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateParticipantRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.dialogflow.v2.CreateParticipantRequest - */ -class CreateParticipantRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource identifier of the conversation adding the participant. - * Format: `projects//locations//conversations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The participant to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $participant = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource identifier of the conversation adding the participant. - * Format: `projects//locations//conversations/`. - * @type \Google\Cloud\Dialogflow\V2\Participant $participant - * Required. The participant to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource identifier of the conversation adding the participant. - * Format: `projects//locations//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. Resource identifier of the conversation adding the participant. - * Format: `projects//locations//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; - } - - /** - * Required. The participant to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Participant|null - */ - public function getParticipant() - { - return $this->participant; - } - - public function hasParticipant() - { - return isset($this->participant); - } - - public function clearParticipant() - { - unset($this->participant); - } - - /** - * Required. The participant to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Participant $var - * @return $this - */ - public function setParticipant($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Participant::class); - $this->participant = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateSessionEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateSessionEntityTypeRequest.php deleted file mode 100644 index 5c2b2a422583..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateSessionEntityTypeRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest - */ -class CreateSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The session to create a session entity type for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The session entity type to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $session_entity_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The session to create a session entity type for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @type \Google\Cloud\Dialogflow\V2\SessionEntityType $session_entity_type - * Required. The session entity type to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The session to create a session entity type for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 session to create a session entity type for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 session entity type to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\SessionEntityType|null - */ - public function getSessionEntityType() - { - return $this->session_entity_type; - } - - public function hasSessionEntityType() - { - return isset($this->session_entity_type); - } - - public function clearSessionEntityType() - { - unset($this->session_entity_type); - } - - /** - * Required. The session entity type to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\SessionEntityType $var - * @return $this - */ - public function setSessionEntityType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); - $this->session_entity_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateVersionRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateVersionRequest.php deleted file mode 100644 index 3d3c91dffc0c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/CreateVersionRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dialogflow.v2.CreateVersionRequest - */ -class CreateVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create a version for. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The version to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to create a version for. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * @type \Google\Cloud\Dialogflow\V2\Version $version - * Required. The version to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create a version for. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * - * 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 agent to create a version for. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * - * 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 version to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * Required. The version to create. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Version::class); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAgentRequest.php deleted file mode 100644 index 6b1cd54033e9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAgentRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.DeleteAgentRequest - */ -class DeleteAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that the agent to delete is associated with. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project that the agent to delete is associated with. - * Format: `projects/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that the agent to delete is associated with. - * Format: `projects/`. - * - * 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 project that the agent to delete is associated with. - * Format: `projects/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAllContextsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAllContextsRequest.php deleted file mode 100644 index 707d66c4d4cf..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteAllContextsRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.dialogflow.v2.DeleteAllContextsRequest - */ -class DeleteAllContextsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session to delete all contexts from. Format: - * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified we assume default 'draft' environment. - * If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the session to delete all contexts from. Format: - * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified we assume default 'draft' environment. - * If `User ID` is not specified, we assume default '-' user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session to delete all contexts from. Format: - * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified we assume default 'draft' environment. - * If `User ID` is not specified, we assume default '-' user. - * - * 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 name of the session to delete all contexts from. Format: - * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified we assume default 'draft' environment. - * If `User ID` is not specified, we assume default '-' user. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteContextRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteContextRequest.php deleted file mode 100644 index a5e2e38b9056..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteContextRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.dialogflow.v2.DeleteContextRequest - */ -class DeleteContextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the context to delete. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the context to delete. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the context to delete. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 context to delete. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetOperationMetadata.php deleted file mode 100644 index 5fb0b3ce7894..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetOperationMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - */ -class DeleteConversationDatasetOperationMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetRequest.php deleted file mode 100644 index f5524623fac6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationDatasetRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.DeleteConversationDatasetRequest - */ -class DeleteConversationDatasetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation dataset to delete. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The conversation dataset to delete. Format: - * `projects//locations//conversationDatasets/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation dataset to delete. Format: - * `projects//locations//conversationDatasets/` - * - * 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 conversation dataset to delete. Format: - * `projects//locations//conversationDatasets/` - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelOperationMetadata.php deleted file mode 100644 index 30cc0069d1d4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelOperationMetadata.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata - */ -class DeleteConversationModelOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - */ - protected $conversation_model = ''; - /** - * Timestamp when delete conversation model request was created. The time is - * measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_model - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when delete conversation model request was created. The time is - * measured on server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - * @return string - */ - public function getConversationModel() - { - return $this->conversation_model; - } - - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - * @param string $var - * @return $this - */ - public function setConversationModel($var) - { - GPBUtil::checkString($var, True); - $this->conversation_model = $var; - - return $this; - } - - /** - * Timestamp when delete conversation model request was created. The time is - * measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @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); - } - - /** - * Timestamp when delete conversation model request was created. The time is - * measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelRequest.php deleted file mode 100644 index 7545b3cd3cb2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationModelRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.DeleteConversationModelRequest - */ -class DeleteConversationModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation model to delete. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The conversation model to delete. Format: - * `projects//conversationModels/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation model to delete. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The conversation model to delete. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationProfileRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationProfileRequest.php deleted file mode 100644 index 88bef673b252..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteConversationProfileRequest.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dialogflow.v2.DeleteConversationProfileRequest - */ -class DeleteConversationProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the conversation profile to delete. - * Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the conversation profile to delete. - * Format: `projects//locations//conversationProfiles/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the conversation profile to delete. - * Format: `projects//locations//conversationProfiles/`. - * - * 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 profile to delete. - * Format: `projects//locations//conversationProfiles/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteDocumentRequest.php deleted file mode 100644 index f56614d719ef..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteDocumentRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.DeleteDocumentRequest - */ -class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the document to delete. - * Format: `projects//locations//knowledgeBases//documents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the document to delete. - * Format: `projects//locations//knowledgeBases//documents/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the document to delete. - * Format: `projects//locations//knowledgeBases//documents/`. - * - * 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 document to delete. - * Format: `projects//locations//knowledgeBases//documents/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEntityTypeRequest.php deleted file mode 100644 index 3f2bd0508abe..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEntityTypeRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.DeleteEntityTypeRequest - */ -class DeleteEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entity type to delete. - * Format: `projects//agent/entityTypes/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entity type to delete. - * Format: `projects//agent/entityTypes/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entity type to delete. - * Format: `projects//agent/entityTypes/`. - * - * 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 entity type to delete. - * Format: `projects//agent/entityTypes/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEnvironmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEnvironmentRequest.php deleted file mode 100644 index 4ff70b6dccd5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteEnvironmentRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.dialogflow.v2.DeleteEnvironmentRequest - */ -class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the environment to delete. - * / Format: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the environment to delete. - * / Format: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the environment to delete. - * / Format: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * 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 environment to delete. - * / Format: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteIntentRequest.php deleted file mode 100644 index eb30399e5bc9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteIntentRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.DeleteIntentRequest - */ -class DeleteIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the intent to delete. If this intent has direct or - * indirect followup intents, we also delete them. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the intent to delete. If this intent has direct or - * indirect followup intents, we also delete them. - * Format: `projects//agent/intents/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the intent to delete. If this intent has direct or - * indirect followup intents, we also delete them. - * Format: `projects//agent/intents/`. - * - * 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 intent to delete. If this intent has direct or - * indirect followup intents, we also delete them. - * Format: `projects//agent/intents/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteKnowledgeBaseRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteKnowledgeBaseRequest.php deleted file mode 100644 index 7d322f674750..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteKnowledgeBaseRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest - */ -class DeleteKnowledgeBaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the knowledge base to delete. - * Format: `projects//locations//knowledgeBases/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Force deletes the knowledge base. When set to true, any documents - * in the knowledge base are also deleted. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the knowledge base to delete. - * Format: `projects//locations//knowledgeBases/`. - * @type bool $force - * Optional. Force deletes the knowledge base. When set to true, any documents - * in the knowledge base are also deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the knowledge base to delete. - * Format: `projects//locations//knowledgeBases/`. - * - * 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 knowledge base to delete. - * Format: `projects//locations//knowledgeBases/`. - * - * 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; - } - - /** - * Optional. Force deletes the knowledge base. When set to true, any documents - * in the knowledge base are also deleted. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. Force deletes the knowledge base. When set to true, any documents - * in the knowledge base are also deleted. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteSessionEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteSessionEntityTypeRequest.php deleted file mode 100644 index 669b5a3411cb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteSessionEntityTypeRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest - */ -class DeleteSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entity type to delete. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entity type to delete. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entity type to delete. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 entity type to delete. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteVersionRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteVersionRequest.php deleted file mode 100644 index 5c06dd31709c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeleteVersionRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.dialogflow.v2.DeleteVersionRequest - */ -class DeleteVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the version to delete. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the version to delete. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the version to delete. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * 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 version to delete. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelOperationMetadata.php deleted file mode 100644 index fd4a874258f5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelOperationMetadata.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata - */ -class DeployConversationModelOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - */ - protected $conversation_model = ''; - /** - * Timestamp when request to deploy conversation model was submitted. The time - * is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_model - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when request to deploy conversation model was submitted. The time - * is measured on server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - * @return string - */ - public function getConversationModel() - { - return $this->conversation_model; - } - - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - * @param string $var - * @return $this - */ - public function setConversationModel($var) - { - GPBUtil::checkString($var, True); - $this->conversation_model = $var; - - return $this; - } - - /** - * Timestamp when request to deploy conversation model was submitted. The time - * is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @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); - } - - /** - * Timestamp when request to deploy conversation model was submitted. The time - * is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelRequest.php deleted file mode 100644 index 13c3d0a67d6d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DeployConversationModelRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.DeployConversationModelRequest - */ -class DeployConversationModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation model to deploy. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The conversation model to deploy. Format: - * `projects//conversationModels/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation model to deploy. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The conversation model to deploy. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentRequest.php deleted file mode 100644 index c20750031180..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentRequest.php +++ /dev/null @@ -1,389 +0,0 @@ -google.cloud.dialogflow.v2.DetectIntentRequest - */ -class DetectIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session this query is sent to. Format: - * `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment (`Environment ID` might be referred to as - * environment name at some places). If `User ID` is not specified, we are - * using "-". It's up to the API caller to choose an appropriate `Session ID` - * and `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $session = ''; - /** - * The parameters of this query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; - */ - protected $query_params = null; - /** - * Required. The input specification. It can be set to: - * 1. an audio config - * which instructs the speech recognizer how to process the speech audio, - * 2. a conversational query in the form of text, or - * 3. an event that specifies which intent to trigger. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query_input = null; - /** - * Instructs the speech synthesizer how to generate the output - * audio. If this field is not set and agent-level speech synthesizer is not - * configured, no output audio is generated. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 4; - */ - protected $output_audio_config = null; - /** - * Mask for - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * indicating which settings in this request-level config should override - * speech synthesizer settings defined at agent-level. - * If unspecified or empty, - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * replaces the agent-level config in its entirety. - * - * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; - */ - protected $output_audio_config_mask = null; - /** - * The natural language speech audio to be processed. This field - * should be populated iff `query_input` is set to an input audio config. - * A single request can contain up to 1 minute of speech audio data. - * - * Generated from protobuf field bytes input_audio = 5; - */ - protected $input_audio = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $session - * Required. The name of the session this query is sent to. Format: - * `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment (`Environment ID` might be referred to as - * environment name at some places). If `User ID` is not specified, we are - * using "-". It's up to the API caller to choose an appropriate `Session ID` - * and `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * @type \Google\Cloud\Dialogflow\V2\QueryParameters $query_params - * The parameters of this query. - * @type \Google\Cloud\Dialogflow\V2\QueryInput $query_input - * Required. The input specification. It can be set to: - * 1. an audio config - * which instructs the speech recognizer how to process the speech audio, - * 2. a conversational query in the form of text, or - * 3. an event that specifies which intent to trigger. - * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $output_audio_config - * Instructs the speech synthesizer how to generate the output - * audio. If this field is not set and agent-level speech synthesizer is not - * configured, no output audio is generated. - * @type \Google\Protobuf\FieldMask $output_audio_config_mask - * Mask for - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * indicating which settings in this request-level config should override - * speech synthesizer settings defined at agent-level. - * If unspecified or empty, - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * replaces the agent-level config in its entirety. - * @type string $input_audio - * The natural language speech audio to be processed. This field - * should be populated iff `query_input` is set to an input audio config. - * A single request can contain up to 1 minute of speech audio data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session this query is sent to. Format: - * `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment (`Environment ID` might be referred to as - * environment name at some places). If `User ID` is not specified, we are - * using "-". It's up to the API caller to choose an appropriate `Session ID` - * and `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSession() - { - return $this->session; - } - - /** - * Required. The name of the session this query is sent to. Format: - * `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment (`Environment ID` might be referred to as - * environment name at some places). If `User ID` is not specified, we are - * using "-". It's up to the API caller to choose an appropriate `Session ID` - * and `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSession($var) - { - GPBUtil::checkString($var, True); - $this->session = $var; - - return $this; - } - - /** - * The parameters of this query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; - * @return \Google\Cloud\Dialogflow\V2\QueryParameters|null - */ - public function getQueryParams() - { - return $this->query_params; - } - - public function hasQueryParams() - { - return isset($this->query_params); - } - - public function clearQueryParams() - { - unset($this->query_params); - } - - /** - * The parameters of this query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; - * @param \Google\Cloud\Dialogflow\V2\QueryParameters $var - * @return $this - */ - public function setQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class); - $this->query_params = $var; - - return $this; - } - - /** - * Required. The input specification. It can be set to: - * 1. an audio config - * which instructs the speech recognizer how to process the speech audio, - * 2. a conversational query in the form of text, or - * 3. an event that specifies which intent to trigger. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\QueryInput|null - */ - public function getQueryInput() - { - return $this->query_input; - } - - public function hasQueryInput() - { - return isset($this->query_input); - } - - public function clearQueryInput() - { - unset($this->query_input); - } - - /** - * Required. The input specification. It can be set to: - * 1. an audio config - * which instructs the speech recognizer how to process the speech audio, - * 2. a conversational query in the form of text, or - * 3. an event that specifies which intent to trigger. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\QueryInput $var - * @return $this - */ - public function setQueryInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryInput::class); - $this->query_input = $var; - - return $this; - } - - /** - * Instructs the speech synthesizer how to generate the output - * audio. If this field is not set and agent-level speech synthesizer is not - * configured, no output audio is generated. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 4; - * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null - */ - public function getOutputAudioConfig() - { - return $this->output_audio_config; - } - - public function hasOutputAudioConfig() - { - return isset($this->output_audio_config); - } - - public function clearOutputAudioConfig() - { - unset($this->output_audio_config); - } - - /** - * Instructs the speech synthesizer how to generate the output - * audio. If this field is not set and agent-level speech synthesizer is not - * configured, no output audio is generated. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 4; - * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var - * @return $this - */ - public function setOutputAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); - $this->output_audio_config = $var; - - return $this; - } - - /** - * Mask for - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * indicating which settings in this request-level config should override - * speech synthesizer settings defined at agent-level. - * If unspecified or empty, - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * replaces the agent-level config in its entirety. - * - * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; - * @return \Google\Protobuf\FieldMask|null - */ - public function getOutputAudioConfigMask() - { - return $this->output_audio_config_mask; - } - - public function hasOutputAudioConfigMask() - { - return isset($this->output_audio_config_mask); - } - - public function clearOutputAudioConfigMask() - { - unset($this->output_audio_config_mask); - } - - /** - * Mask for - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * indicating which settings in this request-level config should override - * speech synthesizer settings defined at agent-level. - * If unspecified or empty, - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * replaces the agent-level config in its entirety. - * - * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setOutputAudioConfigMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->output_audio_config_mask = $var; - - return $this; - } - - /** - * The natural language speech audio to be processed. This field - * should be populated iff `query_input` is set to an input audio config. - * A single request can contain up to 1 minute of speech audio data. - * - * Generated from protobuf field bytes input_audio = 5; - * @return string - */ - public function getInputAudio() - { - return $this->input_audio; - } - - /** - * The natural language speech audio to be processed. This field - * should be populated iff `query_input` is set to an input audio config. - * A single request can contain up to 1 minute of speech audio data. - * - * Generated from protobuf field bytes input_audio = 5; - * @param string $var - * @return $this - */ - public function setInputAudio($var) - { - GPBUtil::checkString($var, False); - $this->input_audio = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentResponse.php deleted file mode 100644 index 8c07c511577f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DetectIntentResponse.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.dialogflow.v2.DetectIntentResponse - */ -class DetectIntentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the response. It can be used to - * locate a response in the training example set or for reporting issues. - * - * Generated from protobuf field string response_id = 1; - */ - protected $response_id = ''; - /** - * The selected results of the conversational query or event processing. - * See `alternative_query_results` for additional potential results. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; - */ - protected $query_result = null; - /** - * Specifies the status of the webhook request. - * - * Generated from protobuf field .google.rpc.Status webhook_status = 3; - */ - protected $webhook_status = null; - /** - * The audio data bytes encoded as specified in the request. - * Note: The output audio is generated based on the values of default platform - * text responses found in the `query_result.fulfillment_messages` field. If - * multiple default text responses exist, they will be concatenated when - * generating audio. If no default platform text responses exist, the - * generated audio content will be empty. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field bytes output_audio = 4; - */ - protected $output_audio = ''; - /** - * The config used by the speech synthesizer to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; - */ - protected $output_audio_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $response_id - * The unique identifier of the response. It can be used to - * locate a response in the training example set or for reporting issues. - * @type \Google\Cloud\Dialogflow\V2\QueryResult $query_result - * The selected results of the conversational query or event processing. - * See `alternative_query_results` for additional potential results. - * @type \Google\Rpc\Status $webhook_status - * Specifies the status of the webhook request. - * @type string $output_audio - * The audio data bytes encoded as specified in the request. - * Note: The output audio is generated based on the values of default platform - * text responses found in the `query_result.fulfillment_messages` field. If - * multiple default text responses exist, they will be concatenated when - * generating audio. If no default platform text responses exist, the - * generated audio content will be empty. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $output_audio_config - * The config used by the speech synthesizer to generate the output audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the response. It can be used to - * locate a response in the training example set or for reporting issues. - * - * Generated from protobuf field string response_id = 1; - * @return string - */ - public function getResponseId() - { - return $this->response_id; - } - - /** - * The unique identifier of the response. It can be used to - * locate a response in the training example set or for reporting issues. - * - * Generated from protobuf field string response_id = 1; - * @param string $var - * @return $this - */ - public function setResponseId($var) - { - GPBUtil::checkString($var, True); - $this->response_id = $var; - - return $this; - } - - /** - * The selected results of the conversational query or event processing. - * See `alternative_query_results` for additional potential results. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; - * @return \Google\Cloud\Dialogflow\V2\QueryResult|null - */ - public function getQueryResult() - { - return $this->query_result; - } - - public function hasQueryResult() - { - return isset($this->query_result); - } - - public function clearQueryResult() - { - unset($this->query_result); - } - - /** - * The selected results of the conversational query or event processing. - * See `alternative_query_results` for additional potential results. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; - * @param \Google\Cloud\Dialogflow\V2\QueryResult $var - * @return $this - */ - public function setQueryResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryResult::class); - $this->query_result = $var; - - return $this; - } - - /** - * Specifies the status of the webhook request. - * - * Generated from protobuf field .google.rpc.Status webhook_status = 3; - * @return \Google\Rpc\Status|null - */ - public function getWebhookStatus() - { - return $this->webhook_status; - } - - public function hasWebhookStatus() - { - return isset($this->webhook_status); - } - - public function clearWebhookStatus() - { - unset($this->webhook_status); - } - - /** - * Specifies the status of the webhook request. - * - * Generated from protobuf field .google.rpc.Status webhook_status = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setWebhookStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->webhook_status = $var; - - return $this; - } - - /** - * The audio data bytes encoded as specified in the request. - * Note: The output audio is generated based on the values of default platform - * text responses found in the `query_result.fulfillment_messages` field. If - * multiple default text responses exist, they will be concatenated when - * generating audio. If no default platform text responses exist, the - * generated audio content will be empty. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field bytes output_audio = 4; - * @return string - */ - public function getOutputAudio() - { - return $this->output_audio; - } - - /** - * The audio data bytes encoded as specified in the request. - * Note: The output audio is generated based on the values of default platform - * text responses found in the `query_result.fulfillment_messages` field. If - * multiple default text responses exist, they will be concatenated when - * generating audio. If no default platform text responses exist, the - * generated audio content will be empty. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field bytes output_audio = 4; - * @param string $var - * @return $this - */ - public function setOutputAudio($var) - { - GPBUtil::checkString($var, False); - $this->output_audio = $var; - - return $this; - } - - /** - * The config used by the speech synthesizer to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; - * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null - */ - public function getOutputAudioConfig() - { - return $this->output_audio_config; - } - - public function hasOutputAudioConfig() - { - return isset($this->output_audio_config); - } - - public function clearOutputAudioConfig() - { - unset($this->output_audio_config); - } - - /** - * The config used by the speech synthesizer to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; - * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var - * @return $this - */ - public function setOutputAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); - $this->output_audio_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document.php deleted file mode 100644 index f7222ebf90e6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document.php +++ /dev/null @@ -1,500 +0,0 @@ -google.cloud.dialogflow.v2.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The document resource name. - * The name must be empty when creating a document. - * Format: `projects//locations//knowledgeBases//documents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Required. The display name of the document. The name must be 1024 bytes or - * less; otherwise, the creation request fails. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Required. The MIME type of this document. - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mime_type = ''; - /** - * Required. The knowledge type of document content. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $knowledge_types; - /** - * Optional. If true, we try to automatically reload the document every day - * (at a time picked by the system). If false or unspecified, we don't try - * to automatically reload the document. - * Currently you can only enable automatic reload for documents sourced from - * a public url, see `source` field for the source types. - * Reload status can be tracked in `latest_reload_status`. If a reload - * fails, we will keep the document unchanged. - * If a reload fails with internal errors, the system will try to reload the - * document on the next day. - * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the - * system will not try to reload the document anymore. You need to manually - * reload the document successfully by calling `ReloadDocument` and clear the - * errors. - * - * Generated from protobuf field bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_auto_reload = false; - /** - * Output only. The time and status of the latest reload. - * This reload may have been triggered automatically or manually - * and may not have succeeded. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_reload_status = null; - /** - * Optional. Metadata for the document. The metadata supports arbitrary - * key-value pairs. Suggested use cases include storing a document's title, - * an external URL distinct from the document's content_uri, etc. - * The max size of a `key` or a `value` of the metadata is 1024 bytes. - * - * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $metadata; - /** - * Output only. The current state of the document. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. The document resource name. - * The name must be empty when creating a document. - * Format: `projects//locations//knowledgeBases//documents/`. - * @type string $display_name - * Required. The display name of the document. The name must be 1024 bytes or - * less; otherwise, the creation request fails. - * @type string $mime_type - * Required. The MIME type of this document. - * @type array|\Google\Protobuf\Internal\RepeatedField $knowledge_types - * Required. The knowledge type of document content. - * @type string $content_uri - * The URI where the file content is located. - * For documents stored in Google Cloud Storage, these URIs must have - * the form `gs:///`. - * NOTE: External URLs must correspond to public webpages, i.e., they must - * be indexed by Google Search. In particular, URLs for showing documents in - * Google Cloud Storage (i.e. the URL in your browser) are not supported. - * Instead use the `gs://` format URI described above. - * @type string $raw_content - * The raw content of the document. This field is only permitted for - * EXTRACTIVE_QA and FAQ knowledge types. - * @type bool $enable_auto_reload - * Optional. If true, we try to automatically reload the document every day - * (at a time picked by the system). If false or unspecified, we don't try - * to automatically reload the document. - * Currently you can only enable automatic reload for documents sourced from - * a public url, see `source` field for the source types. - * Reload status can be tracked in `latest_reload_status`. If a reload - * fails, we will keep the document unchanged. - * If a reload fails with internal errors, the system will try to reload the - * document on the next day. - * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the - * system will not try to reload the document anymore. You need to manually - * reload the document successfully by calling `ReloadDocument` and clear the - * errors. - * @type \Google\Cloud\Dialogflow\V2\Document\ReloadStatus $latest_reload_status - * Output only. The time and status of the latest reload. - * This reload may have been triggered automatically or manually - * and may not have succeeded. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Optional. Metadata for the document. The metadata supports arbitrary - * key-value pairs. Suggested use cases include storing a document's title, - * an external URL distinct from the document's content_uri, etc. - * The max size of a `key` or a `value` of the metadata is 1024 bytes. - * @type int $state - * Output only. The current state of the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The document resource name. - * The name must be empty when creating a document. - * Format: `projects//locations//knowledgeBases//documents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. The document resource name. - * The name must be empty when creating a document. - * Format: `projects//locations//knowledgeBases//documents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The display name of the document. The name must be 1024 bytes or - * less; otherwise, the creation request fails. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The display name of the document. The name must be 1024 bytes or - * less; otherwise, the creation request fails. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. The MIME type of this document. - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Required. The MIME type of this document. - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Required. The knowledge type of document content. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKnowledgeTypes() - { - return $this->knowledge_types; - } - - /** - * Required. The knowledge type of document content. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKnowledgeTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\Document\KnowledgeType::class); - $this->knowledge_types = $arr; - - return $this; - } - - /** - * The URI where the file content is located. - * For documents stored in Google Cloud Storage, these URIs must have - * the form `gs:///`. - * NOTE: External URLs must correspond to public webpages, i.e., they must - * be indexed by Google Search. In particular, URLs for showing documents in - * Google Cloud Storage (i.e. the URL in your browser) are not supported. - * Instead use the `gs://` format URI described above. - * - * Generated from protobuf field string content_uri = 5; - * @return string - */ - public function getContentUri() - { - return $this->readOneof(5); - } - - public function hasContentUri() - { - return $this->hasOneof(5); - } - - /** - * The URI where the file content is located. - * For documents stored in Google Cloud Storage, these URIs must have - * the form `gs:///`. - * NOTE: External URLs must correspond to public webpages, i.e., they must - * be indexed by Google Search. In particular, URLs for showing documents in - * Google Cloud Storage (i.e. the URL in your browser) are not supported. - * Instead use the `gs://` format URI described above. - * - * Generated from protobuf field string content_uri = 5; - * @param string $var - * @return $this - */ - public function setContentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The raw content of the document. This field is only permitted for - * EXTRACTIVE_QA and FAQ knowledge types. - * - * Generated from protobuf field bytes raw_content = 9; - * @return string - */ - public function getRawContent() - { - return $this->readOneof(9); - } - - public function hasRawContent() - { - return $this->hasOneof(9); - } - - /** - * The raw content of the document. This field is only permitted for - * EXTRACTIVE_QA and FAQ knowledge types. - * - * Generated from protobuf field bytes raw_content = 9; - * @param string $var - * @return $this - */ - public function setRawContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Optional. If true, we try to automatically reload the document every day - * (at a time picked by the system). If false or unspecified, we don't try - * to automatically reload the document. - * Currently you can only enable automatic reload for documents sourced from - * a public url, see `source` field for the source types. - * Reload status can be tracked in `latest_reload_status`. If a reload - * fails, we will keep the document unchanged. - * If a reload fails with internal errors, the system will try to reload the - * document on the next day. - * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the - * system will not try to reload the document anymore. You need to manually - * reload the document successfully by calling `ReloadDocument` and clear the - * errors. - * - * Generated from protobuf field bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableAutoReload() - { - return $this->enable_auto_reload; - } - - /** - * Optional. If true, we try to automatically reload the document every day - * (at a time picked by the system). If false or unspecified, we don't try - * to automatically reload the document. - * Currently you can only enable automatic reload for documents sourced from - * a public url, see `source` field for the source types. - * Reload status can be tracked in `latest_reload_status`. If a reload - * fails, we will keep the document unchanged. - * If a reload fails with internal errors, the system will try to reload the - * document on the next day. - * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the - * system will not try to reload the document anymore. You need to manually - * reload the document successfully by calling `ReloadDocument` and clear the - * errors. - * - * Generated from protobuf field bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableAutoReload($var) - { - GPBUtil::checkBool($var); - $this->enable_auto_reload = $var; - - return $this; - } - - /** - * Output only. The time and status of the latest reload. - * This reload may have been triggered automatically or manually - * and may not have succeeded. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\Document\ReloadStatus|null - */ - public function getLatestReloadStatus() - { - return $this->latest_reload_status; - } - - public function hasLatestReloadStatus() - { - return isset($this->latest_reload_status); - } - - public function clearLatestReloadStatus() - { - unset($this->latest_reload_status); - } - - /** - * Output only. The time and status of the latest reload. - * This reload may have been triggered automatically or manually - * and may not have succeeded. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\Document\ReloadStatus $var - * @return $this - */ - public function setLatestReloadStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Document\ReloadStatus::class); - $this->latest_reload_status = $var; - - return $this; - } - - /** - * Optional. Metadata for the document. The metadata supports arbitrary - * key-value pairs. Suggested use cases include storing a document's title, - * an external URL distinct from the document's content_uri, etc. - * The max size of a `key` or a `value` of the metadata is 1024 bytes. - * - * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Optional. Metadata for the document. The metadata supports arbitrary - * key-value pairs. Suggested use cases include storing a document's title, - * an external URL distinct from the document's content_uri, etc. - * The max size of a `key` or a `value` of the metadata is 1024 bytes. - * - * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Output only. The current state of the document. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the document. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Document\State::class); - $this->state = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/KnowledgeType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/KnowledgeType.php deleted file mode 100644 index 4e8437ac0670..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/KnowledgeType.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.dialogflow.v2.Document.KnowledgeType - */ -class KnowledgeType -{ - /** - * The type is unspecified or arbitrary. - * - * Generated from protobuf enum KNOWLEDGE_TYPE_UNSPECIFIED = 0; - */ - const KNOWLEDGE_TYPE_UNSPECIFIED = 0; - /** - * The document content contains question and answer pairs as either HTML or - * CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats - * may fail to be parsed. - * CSV must have questions in the first column and answers in the second, - * with no header. Because of this explicit format, they are always parsed - * accurately. - * - * Generated from protobuf enum FAQ = 1; - */ - const FAQ = 1; - /** - * Documents for which unstructured text is extracted and used for - * question answering. - * - * Generated from protobuf enum EXTRACTIVE_QA = 2; - */ - const EXTRACTIVE_QA = 2; - /** - * The entire document content as a whole can be used for query results. - * Only for Contact Center Solutions on Dialogflow. - * - * Generated from protobuf enum ARTICLE_SUGGESTION = 3; - */ - const ARTICLE_SUGGESTION = 3; - /** - * The document contains agent-facing Smart Reply entries. - * - * Generated from protobuf enum AGENT_FACING_SMART_REPLY = 4; - */ - const AGENT_FACING_SMART_REPLY = 4; - - private static $valueToName = [ - self::KNOWLEDGE_TYPE_UNSPECIFIED => 'KNOWLEDGE_TYPE_UNSPECIFIED', - self::FAQ => 'FAQ', - self::EXTRACTIVE_QA => 'EXTRACTIVE_QA', - self::ARTICLE_SUGGESTION => 'ARTICLE_SUGGESTION', - self::AGENT_FACING_SMART_REPLY => 'AGENT_FACING_SMART_REPLY', - ]; - - 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(KnowledgeType::class, \Google\Cloud\Dialogflow\V2\Document_KnowledgeType::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/ReloadStatus.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/ReloadStatus.php deleted file mode 100644 index d54cc82076fb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/ReloadStatus.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.dialogflow.v2.Document.ReloadStatus - */ -class ReloadStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The time of a reload attempt. - * This reload may have been triggered automatically or manually and may - * not have succeeded. - * - * Generated from protobuf field .google.protobuf.Timestamp time = 1; - */ - protected $time = null; - /** - * The status of a reload attempt or the initial load. - * - * Generated from protobuf field .google.rpc.Status status = 2; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $time - * The time of a reload attempt. - * This reload may have been triggered automatically or manually and may - * not have succeeded. - * @type \Google\Rpc\Status $status - * The status of a reload attempt or the initial load. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * The time of a reload attempt. - * This reload may have been triggered automatically or manually and may - * not have succeeded. - * - * Generated from protobuf field .google.protobuf.Timestamp time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTime() - { - return $this->time; - } - - public function hasTime() - { - return isset($this->time); - } - - public function clearTime() - { - unset($this->time); - } - - /** - * The time of a reload attempt. - * This reload may have been triggered automatically or manually and may - * not have succeeded. - * - * Generated from protobuf field .google.protobuf.Timestamp time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time = $var; - - return $this; - } - - /** - * The status of a reload attempt or the initial load. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The status of a reload attempt or the initial load. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReloadStatus::class, \Google\Cloud\Dialogflow\V2\Document_ReloadStatus::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/State.php deleted file mode 100644 index ec19452cb6b1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.dialogflow.v2.Document.State - */ -class State -{ - /** - * The document state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The document creation is in progress. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The document is active and ready to use. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The document updation is in progress. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The document is reloading. - * - * Generated from protobuf enum RELOADING = 4; - */ - const RELOADING = 4; - /** - * The document deletion is in progress. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::UPDATING => 'UPDATING', - self::RELOADING => 'RELOADING', - 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\Dialogflow\V2\Document_State::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_KnowledgeType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_KnowledgeType.php deleted file mode 100644 index e514e056999d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Document_KnowledgeType.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Documents/ListDocuments', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListDocumentsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified document. - * @param \Google\Cloud\Dialogflow\V2\GetDocumentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDocument(\Google\Cloud\Dialogflow\V2\GetDocumentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/GetDocument', - $argument, - ['\Google\Cloud\Dialogflow\V2\Document', 'decode'], - $metadata, $options); - } - - /** - * Creates a new document. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [Document][google.cloud.dialogflow.v2.Document] - * @param \Google\Cloud\Dialogflow\V2\CreateDocumentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateDocument(\Google\Cloud\Dialogflow\V2\CreateDocumentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/CreateDocument', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates documents by importing data from external sources. - * Dialogflow supports up to 350 documents in each request. If you try to - * import more, Dialogflow will return an error. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: - * [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse] - * @param \Google\Cloud\Dialogflow\V2\ImportDocumentsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ImportDocuments(\Google\Cloud\Dialogflow\V2\ImportDocumentsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/ImportDocuments', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified document. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * @param \Google\Cloud\Dialogflow\V2\DeleteDocumentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteDocument(\Google\Cloud\Dialogflow\V2\DeleteDocumentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/DeleteDocument', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified document. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [Document][google.cloud.dialogflow.v2.Document] - * @param \Google\Cloud\Dialogflow\V2\UpdateDocumentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateDocument(\Google\Cloud\Dialogflow\V2\UpdateDocumentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/UpdateDocument', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Reloads the specified document from its specified source, content_uri or - * content. The previously loaded content of the document will be deleted. - * Note: Even when the content of the document has not changed, there still - * may be side effects because of internal implementation changes. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [Document][google.cloud.dialogflow.v2.Document] - * - * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - * only use `projects.knowledgeBases.documents`. - * @param \Google\Cloud\Dialogflow\V2\ReloadDocumentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ReloadDocument(\Google\Cloud\Dialogflow\V2\ReloadDocumentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/ReloadDocument', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Exports a smart messaging candidate document into the specified - * destination. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [Document][google.cloud.dialogflow.v2.Document] - * @param \Google\Cloud\Dialogflow\V2\ExportDocumentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ExportDocument(\Google\Cloud\Dialogflow\V2\ExportDocumentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Documents/ExportDocument', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DtmfParameters.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DtmfParameters.php deleted file mode 100644 index be68501e748b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/DtmfParameters.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.v2.DtmfParameters - */ -class DtmfParameters extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates whether DTMF input can be handled in the next request. - * - * Generated from protobuf field bool accepts_dtmf_input = 1; - */ - protected $accepts_dtmf_input = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $accepts_dtmf_input - * Indicates whether DTMF input can be handled in the next request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Indicates whether DTMF input can be handled in the next request. - * - * Generated from protobuf field bool accepts_dtmf_input = 1; - * @return bool - */ - public function getAcceptsDtmfInput() - { - return $this->accepts_dtmf_input; - } - - /** - * Indicates whether DTMF input can be handled in the next request. - * - * Generated from protobuf field bool accepts_dtmf_input = 1; - * @param bool $var - * @return $this - */ - public function setAcceptsDtmfInput($var) - { - GPBUtil::checkBool($var); - $this->accepts_dtmf_input = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType.php deleted file mode 100644 index 2c3f5a2d924b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType.php +++ /dev/null @@ -1,274 +0,0 @@ -google.cloud.dialogflow.v2.EntityType - */ -class EntityType extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the entity type. - * Required for - * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] - * and - * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] - * methods. Format: `projects//agent/entityTypes/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The name of the entity type. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Required. Indicates the kind of entity type. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kind = 0; - /** - * Optional. Indicates whether the entity type can be automatically - * expanded. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $auto_expansion_mode = 0; - /** - * Optional. The collection of entity entries associated with the entity type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $entities; - /** - * Optional. Enables fuzzy entity extraction during classification. - * - * Generated from protobuf field bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_fuzzy_extraction = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the entity type. - * Required for - * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] - * and - * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] - * methods. Format: `projects//agent/entityTypes/`. - * @type string $display_name - * Required. The name of the entity type. - * @type int $kind - * Required. Indicates the kind of entity type. - * @type int $auto_expansion_mode - * Optional. Indicates whether the entity type can be automatically - * expanded. - * @type array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Optional. The collection of entity entries associated with the entity type. - * @type bool $enable_fuzzy_extraction - * Optional. Enables fuzzy entity extraction during classification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the entity type. - * Required for - * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] - * and - * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] - * methods. Format: `projects//agent/entityTypes/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the entity type. - * Required for - * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] - * and - * [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] - * methods. Format: `projects//agent/entityTypes/`. - * - * 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; - } - - /** - * Required. The name of the entity type. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The name of the entity type. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. Indicates the kind of entity type. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Required. Indicates the kind of entity type. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\EntityType\Kind::class); - $this->kind = $var; - - return $this; - } - - /** - * Optional. Indicates whether the entity type can be automatically - * expanded. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAutoExpansionMode() - { - return $this->auto_expansion_mode; - } - - /** - * Optional. Indicates whether the entity type can be automatically - * expanded. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAutoExpansionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\EntityType\AutoExpansionMode::class); - $this->auto_expansion_mode = $var; - - return $this; - } - - /** - * Optional. The collection of entity entries associated with the entity type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Optional. The collection of entity entries associated with the entity type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * Optional. Enables fuzzy entity extraction during classification. - * - * Generated from protobuf field bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableFuzzyExtraction() - { - return $this->enable_fuzzy_extraction; - } - - /** - * Optional. Enables fuzzy entity extraction during classification. - * - * Generated from protobuf field bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableFuzzyExtraction($var) - { - GPBUtil::checkBool($var); - $this->enable_fuzzy_extraction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/AutoExpansionMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/AutoExpansionMode.php deleted file mode 100644 index 77ac68085257..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/AutoExpansionMode.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.dialogflow.v2.EntityType.AutoExpansionMode - */ -class AutoExpansionMode -{ - /** - * Auto expansion disabled for the entity. - * - * Generated from protobuf enum AUTO_EXPANSION_MODE_UNSPECIFIED = 0; - */ - const AUTO_EXPANSION_MODE_UNSPECIFIED = 0; - /** - * Allows an agent to recognize values that have not been explicitly - * listed in the entity. - * - * Generated from protobuf enum AUTO_EXPANSION_MODE_DEFAULT = 1; - */ - const AUTO_EXPANSION_MODE_DEFAULT = 1; - - private static $valueToName = [ - self::AUTO_EXPANSION_MODE_UNSPECIFIED => 'AUTO_EXPANSION_MODE_UNSPECIFIED', - self::AUTO_EXPANSION_MODE_DEFAULT => 'AUTO_EXPANSION_MODE_DEFAULT', - ]; - - 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(AutoExpansionMode::class, \Google\Cloud\Dialogflow\V2\EntityType_AutoExpansionMode::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Entity.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Entity.php deleted file mode 100644 index 80fe15446286..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Entity.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dialogflow.v2.EntityType.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The primary value associated with this entity entry. - * For example, if the entity type is *vegetable*, the value could be - * *scallions*. - * For `KIND_MAP` entity types: - * * A reference value to be used in place of synonyms. - * For `KIND_LIST` entity types: - * * A string that can contain references to other entity types (with or - * without aliases). - * - * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - /** - * Required. A collection of value synonyms. For example, if the entity type - * is *vegetable*, and `value` is *scallions*, a synonym could be *green - * onions*. - * For `KIND_LIST` entity types: - * * This collection must contain exactly one synonym equal to `value`. - * - * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $synonyms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $value - * Required. The primary value associated with this entity entry. - * For example, if the entity type is *vegetable*, the value could be - * *scallions*. - * For `KIND_MAP` entity types: - * * A reference value to be used in place of synonyms. - * For `KIND_LIST` entity types: - * * A string that can contain references to other entity types (with or - * without aliases). - * @type array|\Google\Protobuf\Internal\RepeatedField $synonyms - * Required. A collection of value synonyms. For example, if the entity type - * is *vegetable*, and `value` is *scallions*, a synonym could be *green - * onions*. - * For `KIND_LIST` entity types: - * * This collection must contain exactly one synonym equal to `value`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The primary value associated with this entity entry. - * For example, if the entity type is *vegetable*, the value could be - * *scallions*. - * For `KIND_MAP` entity types: - * * A reference value to be used in place of synonyms. - * For `KIND_LIST` entity types: - * * A string that can contain references to other entity types (with or - * without aliases). - * - * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. The primary value associated with this entity entry. - * For example, if the entity type is *vegetable*, the value could be - * *scallions*. - * For `KIND_MAP` entity types: - * * A reference value to be used in place of synonyms. - * For `KIND_LIST` entity types: - * * A string that can contain references to other entity types (with or - * without aliases). - * - * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Required. A collection of value synonyms. For example, if the entity type - * is *vegetable*, and `value` is *scallions*, a synonym could be *green - * onions*. - * For `KIND_LIST` entity types: - * * This collection must contain exactly one synonym equal to `value`. - * - * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSynonyms() - { - return $this->synonyms; - } - - /** - * Required. A collection of value synonyms. For example, if the entity type - * is *vegetable*, and `value` is *scallions*, a synonym could be *green - * onions*. - * For `KIND_LIST` entity types: - * * This collection must contain exactly one synonym equal to `value`. - * - * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSynonyms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->synonyms = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Entity::class, \Google\Cloud\Dialogflow\V2\EntityType_Entity::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Kind.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Kind.php deleted file mode 100644 index 51d8c6f0d4e1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType/Kind.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dialogflow.v2.EntityType.Kind - */ -class Kind -{ - /** - * Not specified. This value should be never used. - * - * Generated from protobuf enum KIND_UNSPECIFIED = 0; - */ - const KIND_UNSPECIFIED = 0; - /** - * Map entity types allow mapping of a group of synonyms to a reference - * value. - * - * Generated from protobuf enum KIND_MAP = 1; - */ - const KIND_MAP = 1; - /** - * List entity types contain a set of entries that do not map to reference - * values. However, list entity types can contain references to other entity - * types (with or without aliases). - * - * Generated from protobuf enum KIND_LIST = 2; - */ - const KIND_LIST = 2; - /** - * Regexp entity types allow to specify regular expressions in entries - * values. - * - * Generated from protobuf enum KIND_REGEXP = 3; - */ - const KIND_REGEXP = 3; - - private static $valueToName = [ - self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', - self::KIND_MAP => 'KIND_MAP', - self::KIND_LIST => 'KIND_LIST', - self::KIND_REGEXP => 'KIND_REGEXP', - ]; - - 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(Kind::class, \Google\Cloud\Dialogflow\V2\EntityType_Kind::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypeBatch.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypeBatch.php deleted file mode 100644 index 290c6bec564e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityTypeBatch.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.v2.EntityTypeBatch - */ -class EntityTypeBatch extends \Google\Protobuf\Internal\Message -{ - /** - * A collection of entity types. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; - */ - private $entity_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types - * A collection of entity types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * A collection of entity types. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityTypes() - { - return $this->entity_types; - } - - /** - * A collection of entity types. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; - * @param array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType::class); - $this->entity_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_AutoExpansionMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_AutoExpansionMode.php deleted file mode 100644 index 941ed2f062d1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EntityType_AutoExpansionMode.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/ListEntityTypes', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListEntityTypesResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified entity type. - * @param \Google\Cloud\Dialogflow\V2\GetEntityTypeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetEntityType(\Google\Cloud\Dialogflow\V2\GetEntityTypeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/GetEntityType', - $argument, - ['\Google\Cloud\Dialogflow\V2\EntityType', 'decode'], - $metadata, $options); - } - - /** - * Creates an entity type in the specified agent. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\CreateEntityTypeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateEntityType(\Google\Cloud\Dialogflow\V2\CreateEntityTypeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/CreateEntityType', - $argument, - ['\Google\Cloud\Dialogflow\V2\EntityType', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified entity type. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\UpdateEntityTypeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateEntityType(\Google\Cloud\Dialogflow\V2\UpdateEntityTypeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/UpdateEntityType', - $argument, - ['\Google\Cloud\Dialogflow\V2\EntityType', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified entity type. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\DeleteEntityTypeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteEntityType(\Google\Cloud\Dialogflow\V2\DeleteEntityTypeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/DeleteEntityType', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates/Creates multiple entity types in the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: - * [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse] - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\BatchUpdateEntityTypesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchUpdateEntityTypes(\Google\Cloud\Dialogflow\V2\BatchUpdateEntityTypesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchUpdateEntityTypes', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes entity types in the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\BatchDeleteEntityTypesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchDeleteEntityTypes(\Google\Cloud\Dialogflow\V2\BatchDeleteEntityTypesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntityTypes', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates multiple new entities in the specified entity type. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\BatchCreateEntitiesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchCreateEntities(\Google\Cloud\Dialogflow\V2\BatchCreateEntitiesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchCreateEntities', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates or creates multiple entities in the specified entity type. This - * method does not affect entities in the entity type that aren't explicitly - * specified in the request. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * @param \Google\Cloud\Dialogflow\V2\BatchUpdateEntitiesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchUpdateEntities(\Google\Cloud\Dialogflow\V2\BatchUpdateEntitiesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchUpdateEntities', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes entities in the specified entity type. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\BatchDeleteEntitiesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchDeleteEntities(\Google\Cloud\Dialogflow\V2\BatchDeleteEntitiesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntities', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment.php deleted file mode 100644 index 89d14a767203..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment.php +++ /dev/null @@ -1,362 +0,0 @@ -google.cloud.dialogflow.v2.Environment - */ -class Environment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique identifier of this agent environment. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. The developer-provided description for this environment. - * The maximum length is 500 characters. If exceeded, the request is rejected. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. The agent version loaded into this environment. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $agent_version = ''; - /** - * Output only. The state of this environment. This field is read-only, i.e., - * it cannot be set by create and update methods. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The last update time of this environment. This field is - * read-only, i.e., it cannot be set by create and update methods. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Text to speech settings for this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $text_to_speech_settings = null; - /** - * Optional. The fulfillment settings to use for this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $fulfillment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique identifier of this agent environment. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * @type string $description - * Optional. The developer-provided description for this environment. - * The maximum length is 500 characters. If exceeded, the request is rejected. - * @type string $agent_version - * Optional. The agent version loaded into this environment. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * @type int $state - * Output only. The state of this environment. This field is read-only, i.e., - * it cannot be set by create and update methods. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update time of this environment. This field is - * read-only, i.e., it cannot be set by create and update methods. - * @type \Google\Cloud\Dialogflow\V2\TextToSpeechSettings $text_to_speech_settings - * Optional. Text to speech settings for this environment. - * @type \Google\Cloud\Dialogflow\V2\Fulfillment $fulfillment - * Optional. The fulfillment settings to use for this environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique identifier of this agent environment. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique identifier of this agent environment. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The developer-provided description for this environment. - * The maximum length is 500 characters. If exceeded, the request is rejected. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The developer-provided description for this environment. - * The maximum length is 500 characters. If exceeded, the request is rejected. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. The agent version loaded into this environment. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getAgentVersion() - { - return $this->agent_version; - } - - /** - * Optional. The agent version loaded into this environment. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAgentVersion($var) - { - GPBUtil::checkString($var, True); - $this->agent_version = $var; - - return $this; - } - - /** - * Output only. The state of this environment. This field is read-only, i.e., - * it cannot be set by create and update methods. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of this environment. This field is read-only, i.e., - * it cannot be set by create and update methods. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Environment\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The last update time of this environment. This field is - * read-only, i.e., it cannot be set by create and update methods. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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 last update time of this environment. This field is - * read-only, i.e., it cannot be set by create and update methods. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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; - } - - /** - * Optional. Text to speech settings for this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\TextToSpeechSettings|null - */ - public function getTextToSpeechSettings() - { - return $this->text_to_speech_settings; - } - - public function hasTextToSpeechSettings() - { - return isset($this->text_to_speech_settings); - } - - public function clearTextToSpeechSettings() - { - unset($this->text_to_speech_settings); - } - - /** - * Optional. Text to speech settings for this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\TextToSpeechSettings $var - * @return $this - */ - public function setTextToSpeechSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextToSpeechSettings::class); - $this->text_to_speech_settings = $var; - - return $this; - } - - /** - * Optional. The fulfillment settings to use for this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\Fulfillment|null - */ - public function getFulfillment() - { - return $this->fulfillment; - } - - public function hasFulfillment() - { - return isset($this->fulfillment); - } - - public function clearFulfillment() - { - unset($this->fulfillment); - } - - /** - * Optional. The fulfillment settings to use for this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\Fulfillment $var - * @return $this - */ - public function setFulfillment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Fulfillment::class); - $this->fulfillment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment/State.php deleted file mode 100644 index 6e41c7c1bc9b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Environment/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dialogflow.v2.Environment.State - */ -class State -{ - /** - * Not specified. This value is not used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Stopped. - * - * Generated from protobuf enum STOPPED = 1; - */ - const STOPPED = 1; - /** - * Loading. - * - * Generated from protobuf enum LOADING = 2; - */ - const LOADING = 2; - /** - * Running. - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STOPPED => 'STOPPED', - self::LOADING => 'LOADING', - self::RUNNING => 'RUNNING', - ]; - - 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\Dialogflow\V2\Environment_State::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory.php deleted file mode 100644 index 103f60872d39..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dialogflow.v2.EnvironmentHistory - */ -class EnvironmentHistory extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the environment this history is for. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $parent = ''; - /** - * Output only. The list of agent environments. There will be a maximum number - * of items returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $entries; - /** - * Output only. Token to retrieve the next page of results, or empty if there - * are no more results in the list. - * - * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Output only. The name of the environment this history is for. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * @type array<\Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry>|\Google\Protobuf\Internal\RepeatedField $entries - * Output only. The list of agent environments. There will be a maximum number - * of items returned based on the page_size field in the request. - * @type string $next_page_token - * Output only. Token to retrieve the next page of results, or empty if there - * are no more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the environment this history is for. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Output only. The name of the environment this history is for. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Output only. The list of agent environments. There will be a maximum number - * of items returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Output only. The list of agent environments. There will be a maximum number - * of items returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry::class); - $this->entries = $arr; - - return $this; - } - - /** - * Output only. Token to retrieve the next page of results, or empty if there - * are no more results in the list. - * - * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. Token to retrieve the next page of results, or empty if there - * are no more results in the list. - * - * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory/Entry.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory/Entry.php deleted file mode 100644 index 4f71c3339858..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory/Entry.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dialogflow.v2.EnvironmentHistory.Entry - */ -class Entry extends \Google\Protobuf\Internal\Message -{ - /** - * The agent version loaded into this environment history entry. - * - * Generated from protobuf field string agent_version = 1; - */ - protected $agent_version = ''; - /** - * The developer-provided description for this environment history entry. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The creation time of this environment history entry. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $agent_version - * The agent version loaded into this environment history entry. - * @type string $description - * The developer-provided description for this environment history entry. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of this environment history entry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The agent version loaded into this environment history entry. - * - * Generated from protobuf field string agent_version = 1; - * @return string - */ - public function getAgentVersion() - { - return $this->agent_version; - } - - /** - * The agent version loaded into this environment history entry. - * - * Generated from protobuf field string agent_version = 1; - * @param string $var - * @return $this - */ - public function setAgentVersion($var) - { - GPBUtil::checkString($var, True); - $this->agent_version = $var; - - return $this; - } - - /** - * The developer-provided description for this environment history entry. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The developer-provided description for this environment history entry. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The creation time of this environment history entry. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @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 creation time of this environment history entry. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Entry::class, \Google\Cloud\Dialogflow\V2\EnvironmentHistory_Entry::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory_Entry.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory_Entry.php deleted file mode 100644 index f7ecb9e7c985..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EnvironmentHistory_Entry.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Environments/ListEnvironments', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListEnvironmentsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified agent environment. - * @param \Google\Cloud\Dialogflow\V2\GetEnvironmentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetEnvironment(\Google\Cloud\Dialogflow\V2\GetEnvironmentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/GetEnvironment', - $argument, - ['\Google\Cloud\Dialogflow\V2\Environment', 'decode'], - $metadata, $options); - } - - /** - * Creates an agent environment. - * @param \Google\Cloud\Dialogflow\V2\CreateEnvironmentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateEnvironment(\Google\Cloud\Dialogflow\V2\CreateEnvironmentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/CreateEnvironment', - $argument, - ['\Google\Cloud\Dialogflow\V2\Environment', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified agent environment. - * - * This method allows you to deploy new agent versions into the environment. - * When an environment is pointed to a new agent version by setting - * `environment.agent_version`, the environment is temporarily set to the - * `LOADING` state. During that time, the environment continues serving the - * previous version of the agent. After the new agent version is done loading, - * the environment is set back to the `RUNNING` state. - * You can use "-" as Environment ID in environment name to update an agent - * version in the default environment. WARNING: this will negate all recent - * changes to the draft agent and can't be undone. You may want to save the - * draft agent to a version before calling this method. - * @param \Google\Cloud\Dialogflow\V2\UpdateEnvironmentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateEnvironment(\Google\Cloud\Dialogflow\V2\UpdateEnvironmentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/UpdateEnvironment', - $argument, - ['\Google\Cloud\Dialogflow\V2\Environment', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified agent environment. - * @param \Google\Cloud\Dialogflow\V2\DeleteEnvironmentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteEnvironment(\Google\Cloud\Dialogflow\V2\DeleteEnvironmentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/DeleteEnvironment', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Gets the history of the specified environment. - * @param \Google\Cloud\Dialogflow\V2\GetEnvironmentHistoryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetEnvironmentHistory(\Google\Cloud\Dialogflow\V2\GetEnvironmentHistoryRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Environments/GetEnvironmentHistory', - $argument, - ['\Google\Cloud\Dialogflow\V2\EnvironmentHistory', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig.php deleted file mode 100644 index 316467a477c0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dialogflow.v2.EvaluationConfig - */ -class EvaluationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Datasets used for evaluation. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $datasets; - protected $model_specific_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $datasets - * Required. Datasets used for evaluation. - * @type \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig $smart_reply_config - * Configuration for smart reply model evalution. - * @type \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig $smart_compose_config - * Configuration for smart compose model evalution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. Datasets used for evaluation. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatasets() - { - return $this->datasets; - } - - /** - * Required. Datasets used for evaluation. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.InputDataset datasets = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatasets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\InputDataset::class); - $this->datasets = $arr; - - return $this; - } - - /** - * Configuration for smart reply model evalution. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig smart_reply_config = 2; - * @return \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig|null - */ - public function getSmartReplyConfig() - { - return $this->readOneof(2); - } - - public function hasSmartReplyConfig() - { - return $this->hasOneof(2); - } - - /** - * Configuration for smart reply model evalution. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig smart_reply_config = 2; - * @param \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig $var - * @return $this - */ - public function setSmartReplyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Configuration for smart compose model evalution. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig smart_compose_config = 4; - * @return \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig|null - */ - public function getSmartComposeConfig() - { - return $this->readOneof(4); - } - - public function hasSmartComposeConfig() - { - return $this->hasOneof(4); - } - - /** - * Configuration for smart compose model evalution. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig smart_compose_config = 4; - * @param \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig $var - * @return $this - */ - public function setSmartComposeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getModelSpecificConfig() - { - return $this->whichOneof("model_specific_config"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartComposeConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartComposeConfig.php deleted file mode 100644 index 1dc54f0c1349..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartComposeConfig.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - */ -class SmartComposeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The allowlist document resource name. - * Format: `projects//knowledgeBases//documents/`. Only used for smart compose model. - * - * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { - */ - protected $allowlist_document = ''; - /** - * Required. The model to be evaluated can return multiple results with - * confidence score on each query. These results will be sorted by the - * descending order of the scores and we only keep the first - * max_result_count results as the final results to evaluate. - * - * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_result_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $allowlist_document - * The allowlist document resource name. - * Format: `projects//knowledgeBases//documents/`. Only used for smart compose model. - * @type int $max_result_count - * Required. The model to be evaluated can return multiple results with - * confidence score on each query. These results will be sorted by the - * descending order of the scores and we only keep the first - * max_result_count results as the final results to evaluate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The allowlist document resource name. - * Format: `projects//knowledgeBases//documents/`. Only used for smart compose model. - * - * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getAllowlistDocument() - { - return $this->allowlist_document; - } - - /** - * The allowlist document resource name. - * Format: `projects//knowledgeBases//documents/`. Only used for smart compose model. - * - * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAllowlistDocument($var) - { - GPBUtil::checkString($var, True); - $this->allowlist_document = $var; - - return $this; - } - - /** - * Required. The model to be evaluated can return multiple results with - * confidence score on each query. These results will be sorted by the - * descending order of the scores and we only keep the first - * max_result_count results as the final results to evaluate. - * - * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMaxResultCount() - { - return $this->max_result_count; - } - - /** - * Required. The model to be evaluated can return multiple results with - * confidence score on each query. These results will be sorted by the - * descending order of the scores and we only keep the first - * max_result_count results as the final results to evaluate. - * - * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMaxResultCount($var) - { - GPBUtil::checkInt32($var); - $this->max_result_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SmartComposeConfig::class, \Google\Cloud\Dialogflow\V2\EvaluationConfig_SmartComposeConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartReplyConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartReplyConfig.php deleted file mode 100644 index 81d493a47cd9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig/SmartReplyConfig.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig - */ -class SmartReplyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The allowlist document resource name. - * Format: `projects//knowledgeBases//documents/`. Only used for smart reply model. - * - * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { - */ - protected $allowlist_document = ''; - /** - * Required. The model to be evaluated can return multiple results with - * confidence score on each query. These results will be sorted by the - * descending order of the scores and we only keep the first - * max_result_count results as the final results to evaluate. - * - * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_result_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $allowlist_document - * The allowlist document resource name. - * Format: `projects//knowledgeBases//documents/`. Only used for smart reply model. - * @type int $max_result_count - * Required. The model to be evaluated can return multiple results with - * confidence score on each query. These results will be sorted by the - * descending order of the scores and we only keep the first - * max_result_count results as the final results to evaluate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The allowlist document resource name. - * Format: `projects//knowledgeBases//documents/`. Only used for smart reply model. - * - * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getAllowlistDocument() - { - return $this->allowlist_document; - } - - /** - * The allowlist document resource name. - * Format: `projects//knowledgeBases//documents/`. Only used for smart reply model. - * - * Generated from protobuf field string allowlist_document = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAllowlistDocument($var) - { - GPBUtil::checkString($var, True); - $this->allowlist_document = $var; - - return $this; - } - - /** - * Required. The model to be evaluated can return multiple results with - * confidence score on each query. These results will be sorted by the - * descending order of the scores and we only keep the first - * max_result_count results as the final results to evaluate. - * - * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMaxResultCount() - { - return $this->max_result_count; - } - - /** - * Required. The model to be evaluated can return multiple results with - * confidence score on each query. These results will be sorted by the - * descending order of the scores and we only keep the first - * max_result_count results as the final results to evaluate. - * - * Generated from protobuf field int32 max_result_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMaxResultCount($var) - { - GPBUtil::checkInt32($var); - $this->max_result_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SmartReplyConfig::class, \Google\Cloud\Dialogflow\V2\EvaluationConfig_SmartReplyConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartComposeConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartComposeConfig.php deleted file mode 100644 index fcd7cd240c81..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/EvaluationConfig_SmartComposeConfig.php +++ /dev/null @@ -1,16 +0,0 @@ -` can trigger a personalized welcome response. - * The parameter `name` may be used by the agent in the response: - * `"Hello #welcome_event.name! What can I do for you today?"`. - * - * Generated from protobuf message google.cloud.dialogflow.v2.EventInput - */ -class EventInput extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier of the event. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The collection of parameters associated with the event. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - */ - protected $parameters = null; - /** - * Required. The language of this query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * This field is ignored when used in the context of a - * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] - * field, because the language was already defined in the originating detect - * intent request. - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique identifier of the event. - * @type \Google\Protobuf\Struct $parameters - * The collection of parameters associated with the event. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * @type string $language_code - * Required. The language of this query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * This field is ignored when used in the context of a - * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] - * field, because the language was already defined in the originating detect - * intent request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier of the event. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique identifier of the event. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The collection of parameters associated with the event. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getParameters() - { - return $this->parameters; - } - - public function hasParameters() - { - return isset($this->parameters); - } - - public function clearParameters() - { - unset($this->parameters); - } - - /** - * The collection of parameters associated with the event. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->parameters = $var; - - return $this; - } - - /** - * Required. The language of this query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * This field is ignored when used in the context of a - * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] - * field, because the language was already defined in the originating detect - * intent request. - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Required. The language of this query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * This field is ignored when used in the context of a - * [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] - * field, because the language was already defined in the originating detect - * intent request. - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentRequest.php deleted file mode 100644 index 020a846c675a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dialogflow.v2.ExportAgentRequest - */ -class ExportAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that the agent to export is associated with. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the agent - * to. The format of this URI must be `gs:///`. If - * left unspecified, the serialized agent is returned inline. - * Dialogflow performs a write operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have write permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * - * Generated from protobuf field string agent_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $agent_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project that the agent to export is associated with. - * Format: `projects/`. - * @type string $agent_uri - * Required. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the agent - * to. The format of this URI must be `gs:///`. If - * left unspecified, the serialized agent is returned inline. - * Dialogflow performs a write operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have write permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that the agent to export is associated with. - * Format: `projects/`. - * - * 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 project that the agent to export is associated with. - * Format: `projects/`. - * - * 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 [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the agent - * to. The format of this URI must be `gs:///`. If - * left unspecified, the serialized agent is returned inline. - * Dialogflow performs a write operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have write permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * - * Generated from protobuf field string agent_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAgentUri() - { - return $this->agent_uri; - } - - /** - * Required. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the agent - * to. The format of this URI must be `gs:///`. If - * left unspecified, the serialized agent is returned inline. - * Dialogflow performs a write operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have write permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * - * Generated from protobuf field string agent_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAgentUri($var) - { - GPBUtil::checkString($var, True); - $this->agent_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentResponse.php deleted file mode 100644 index 0568ef0c383c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportAgentResponse.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dialogflow.v2.ExportAgentResponse - */ -class ExportAgentResponse extends \Google\Protobuf\Internal\Message -{ - protected $agent; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $agent_uri - * The URI to a file containing the exported agent. This field is populated - * only if `agent_uri` is specified in `ExportAgentRequest`. - * @type string $agent_content - * Zip compressed raw byte content for agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * The URI to a file containing the exported agent. This field is populated - * only if `agent_uri` is specified in `ExportAgentRequest`. - * - * Generated from protobuf field string agent_uri = 1; - * @return string - */ - public function getAgentUri() - { - return $this->readOneof(1); - } - - public function hasAgentUri() - { - return $this->hasOneof(1); - } - - /** - * The URI to a file containing the exported agent. This field is populated - * only if `agent_uri` is specified in `ExportAgentRequest`. - * - * Generated from protobuf field string agent_uri = 1; - * @param string $var - * @return $this - */ - public function setAgentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Zip compressed raw byte content for agent. - * - * Generated from protobuf field bytes agent_content = 2; - * @return string - */ - public function getAgentContent() - { - return $this->readOneof(2); - } - - public function hasAgentContent() - { - return $this->hasOneof(2); - } - - /** - * Zip compressed raw byte content for agent. - * - * Generated from protobuf field bytes agent_content = 2; - * @param string $var - * @return $this - */ - public function setAgentContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getAgent() - { - return $this->whichOneof("agent"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportDocumentRequest.php deleted file mode 100644 index 84bd5410682c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportDocumentRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.dialogflow.v2.ExportDocumentRequest - */ -class ExportDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the document to export. - * Format: `projects//locations//knowledgeBases//documents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * When enabled, export the full content of the document including empirical - * probability. - * - * Generated from protobuf field bool export_full_content = 3; - */ - protected $export_full_content = false; - /** - * When enabled, export the smart messaging allowlist document for partial - * update. - * - * Generated from protobuf field bool smart_messaging_partial_update = 5; - */ - protected $smart_messaging_partial_update = false; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the document to export. - * Format: `projects//locations//knowledgeBases//documents/`. - * @type \Google\Cloud\Dialogflow\V2\GcsDestination $gcs_destination - * Cloud Storage file path to export the document. - * @type bool $export_full_content - * When enabled, export the full content of the document including empirical - * probability. - * @type bool $smart_messaging_partial_update - * When enabled, export the smart messaging allowlist document for partial - * update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the document to export. - * Format: `projects//locations//knowledgeBases//documents/`. - * - * 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 document to export. - * Format: `projects//locations//knowledgeBases//documents/`. - * - * 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; - } - - /** - * Cloud Storage file path to export the document. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; - * @return \Google\Cloud\Dialogflow\V2\GcsDestination|null - */ - public function getGcsDestination() - { - return $this->readOneof(2); - } - - public function hasGcsDestination() - { - return $this->hasOneof(2); - } - - /** - * Cloud Storage file path to export the document. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; - * @param \Google\Cloud\Dialogflow\V2\GcsDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsDestination::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * When enabled, export the full content of the document including empirical - * probability. - * - * Generated from protobuf field bool export_full_content = 3; - * @return bool - */ - public function getExportFullContent() - { - return $this->export_full_content; - } - - /** - * When enabled, export the full content of the document including empirical - * probability. - * - * Generated from protobuf field bool export_full_content = 3; - * @param bool $var - * @return $this - */ - public function setExportFullContent($var) - { - GPBUtil::checkBool($var); - $this->export_full_content = $var; - - return $this; - } - - /** - * When enabled, export the smart messaging allowlist document for partial - * update. - * - * Generated from protobuf field bool smart_messaging_partial_update = 5; - * @return bool - */ - public function getSmartMessagingPartialUpdate() - { - return $this->smart_messaging_partial_update; - } - - /** - * When enabled, export the smart messaging allowlist document for partial - * update. - * - * Generated from protobuf field bool smart_messaging_partial_update = 5; - * @param bool $var - * @return $this - */ - public function setSmartMessagingPartialUpdate($var) - { - GPBUtil::checkBool($var); - $this->smart_messaging_partial_update = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportOperationMetadata.php deleted file mode 100644 index 146257008327..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ExportOperationMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.dialogflow.v2.ExportOperationMetadata - */ -class ExportOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Storage file path of the exported data. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination exported_gcs_destination = 1; - */ - protected $exported_gcs_destination = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\GcsDestination $exported_gcs_destination - * Cloud Storage file path of the exported data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage file path of the exported data. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination exported_gcs_destination = 1; - * @return \Google\Cloud\Dialogflow\V2\GcsDestination|null - */ - public function getExportedGcsDestination() - { - return $this->exported_gcs_destination; - } - - public function hasExportedGcsDestination() - { - return isset($this->exported_gcs_destination); - } - - public function clearExportedGcsDestination() - { - unset($this->exported_gcs_destination); - } - - /** - * Cloud Storage file path of the exported data. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination exported_gcs_destination = 1; - * @param \Google\Cloud\Dialogflow\V2\GcsDestination $var - * @return $this - */ - public function setExportedGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsDestination::class); - $this->exported_gcs_destination = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FaqAnswer.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FaqAnswer.php deleted file mode 100644 index c8d2453ee36a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/FaqAnswer.php +++ /dev/null @@ -1,269 +0,0 @@ -google.cloud.dialogflow.v2.FaqAnswer - */ -class FaqAnswer 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 Knowledge answer is a good match - * for this conversational query, range from 0.0 (completely uncertain) - * to 1.0 (completely certain). - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * The corresponding FAQ question. - * - * Generated from protobuf field string question = 3; - */ - protected $question = ''; - /** - * Indicates which Knowledge Document this answer was extracted - * from. - * Format: `projects//locations//agent/knowledgeBases//documents/`. - * - * Generated from protobuf field string source = 4; - */ - protected $source = ''; - /** - * A map that contains metadata about the answer and the - * document from which it originates. - * - * Generated from protobuf field map metadata = 5; - */ - private $metadata; - /** - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * - * Generated from protobuf field string answer_record = 6; - */ - protected $answer_record = ''; - - /** - * 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 - * The system's confidence score that this Knowledge answer is a good match - * for this conversational query, range from 0.0 (completely uncertain) - * to 1.0 (completely certain). - * @type string $question - * The corresponding FAQ question. - * @type string $source - * Indicates which Knowledge Document this answer was extracted - * from. - * Format: `projects//locations//agent/knowledgeBases//documents/`. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * A map that contains metadata about the answer and the - * document from which it originates. - * @type string $answer_record - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::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 Knowledge answer is a good match - * for this conversational query, range 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 system's confidence score that this Knowledge answer is a good match - * for this conversational query, range 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; - } - - /** - * 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; - } - - /** - * Indicates which Knowledge Document this answer was extracted - * from. - * Format: `projects//locations//agent/knowledgeBases//documents/`. - * - * Generated from protobuf field string source = 4; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Indicates which Knowledge Document this answer was extracted - * from. - * Format: `projects//locations//agent/knowledgeBases//documents/`. - * - * Generated from protobuf field string source = 4; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * A map that contains metadata about the answer and the - * document from which it originates. - * - * Generated from protobuf field map metadata = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * A map that contains metadata about the answer and the - * document from which it originates. - * - * Generated from protobuf field map metadata = 5; - * @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 answer record, in the format of - * "projects//locations//answerRecords/" - * - * Generated from protobuf field string answer_record = 6; - * @return string - */ - public function getAnswerRecord() - { - return $this->answer_record; - } - - /** - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * - * Generated from protobuf field string answer_record = 6; - * @param string $var - * @return $this - */ - public function setAnswerRecord($var) - { - GPBUtil::checkString($var, True); - $this->answer_record = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment.php deleted file mode 100644 index 5284053b6d8f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.dialogflow.v2.Fulfillment - */ -class Fulfillment extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier of the fulfillment. - * Supported formats: - * - `projects//agent/fulfillment` - * - `projects//locations//agent/fulfillment` - * This field is not used for Fulfillment in an Environment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. The human-readable name of the fulfillment, unique within the - * agent. - * This field is not used for Fulfillment in an Environment. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. Whether fulfillment is enabled. - * - * Generated from protobuf field bool enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - /** - * Optional. The field defines whether the fulfillment is enabled for certain - * features. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $features; - protected $fulfillment; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique identifier of the fulfillment. - * Supported formats: - * - `projects//agent/fulfillment` - * - `projects//locations//agent/fulfillment` - * This field is not used for Fulfillment in an Environment. - * @type string $display_name - * Optional. The human-readable name of the fulfillment, unique within the - * agent. - * This field is not used for Fulfillment in an Environment. - * @type \Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService $generic_web_service - * Configuration for a generic web service. - * @type bool $enabled - * Optional. Whether fulfillment is enabled. - * @type array<\Google\Cloud\Dialogflow\V2\Fulfillment\Feature>|\Google\Protobuf\Internal\RepeatedField $features - * Optional. The field defines whether the fulfillment is enabled for certain - * features. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier of the fulfillment. - * Supported formats: - * - `projects//agent/fulfillment` - * - `projects//locations//agent/fulfillment` - * This field is not used for Fulfillment in an Environment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique identifier of the fulfillment. - * Supported formats: - * - `projects//agent/fulfillment` - * - `projects//locations//agent/fulfillment` - * This field is not used for Fulfillment in an Environment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The human-readable name of the fulfillment, unique within the - * agent. - * This field is not used for Fulfillment in an Environment. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. The human-readable name of the fulfillment, unique within the - * agent. - * This field is not used for Fulfillment in an Environment. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Configuration for a generic web service. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.GenericWebService generic_web_service = 3; - * @return \Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService|null - */ - public function getGenericWebService() - { - return $this->readOneof(3); - } - - public function hasGenericWebService() - { - return $this->hasOneof(3); - } - - /** - * Configuration for a generic web service. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.GenericWebService generic_web_service = 3; - * @param \Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService $var - * @return $this - */ - public function setGenericWebService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Whether fulfillment is enabled. - * - * Generated from protobuf field bool enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. Whether fulfillment is enabled. - * - * Generated from protobuf field bool enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. The field defines whether the fulfillment is enabled for certain - * features. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFeatures() - { - return $this->features; - } - - /** - * Optional. The field defines whether the fulfillment is enabled for certain - * features. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Fulfillment\Feature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Fulfillment\Feature::class); - $this->features = $arr; - - return $this; - } - - /** - * @return string - */ - public function getFulfillment() - { - return $this->whichOneof("fulfillment"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature.php deleted file mode 100644 index 727ce7d8bfde..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.v2.Fulfillment.Feature - */ -class Feature extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the feature that enabled for fulfillment. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.Feature.Type type = 1; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The type of the feature that enabled for fulfillment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * The type of the feature that enabled for fulfillment. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.Feature.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the feature that enabled for fulfillment. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.Feature.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Fulfillment\Feature\Type::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Feature::class, \Google\Cloud\Dialogflow\V2\Fulfillment_Feature::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature/Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature/Type.php deleted file mode 100644 index b516d100f4e8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/Feature/Type.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dialogflow.v2.Fulfillment.Feature.Type - */ -class Type -{ - /** - * Feature type not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Fulfillment is enabled for SmallTalk. - * - * Generated from protobuf enum SMALLTALK = 1; - */ - const SMALLTALK = 1; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::SMALLTALK => 'SMALLTALK', - ]; - - 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\Dialogflow\V2\Fulfillment_Feature_Type::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/GenericWebService.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/GenericWebService.php deleted file mode 100644 index 3310056f4a7c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment/GenericWebService.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.dialogflow.v2.Fulfillment.GenericWebService - */ -class GenericWebService extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fulfillment URI for receiving POST requests. - * It must use https protocol. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * Optional. The user name for HTTP Basic authentication. - * - * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $username = ''; - /** - * Optional. The password for HTTP Basic authentication. - * - * Generated from protobuf field string password = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $password = ''; - /** - * Optional. The HTTP request headers to send together with fulfillment - * requests. - * - * Generated from protobuf field map request_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $request_headers; - /** - * Optional. Indicates if generic web service is created through Cloud - * Functions integration. Defaults to false. - * is_cloud_function is deprecated. Cloud functions can be configured by - * its uri as a regular web service now. - * - * Generated from protobuf field bool is_cloud_function = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $is_cloud_function = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. The fulfillment URI for receiving POST requests. - * It must use https protocol. - * @type string $username - * Optional. The user name for HTTP Basic authentication. - * @type string $password - * Optional. The password for HTTP Basic authentication. - * @type array|\Google\Protobuf\Internal\MapField $request_headers - * Optional. The HTTP request headers to send together with fulfillment - * requests. - * @type bool $is_cloud_function - * Optional. Indicates if generic web service is created through Cloud - * Functions integration. Defaults to false. - * is_cloud_function is deprecated. Cloud functions can be configured by - * its uri as a regular web service now. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fulfillment URI for receiving POST requests. - * It must use https protocol. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The fulfillment URI for receiving POST requests. - * It must use https protocol. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Optional. The user name for HTTP Basic authentication. - * - * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Optional. The user name for HTTP Basic authentication. - * - * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Optional. The password for HTTP Basic authentication. - * - * Generated from protobuf field string password = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Optional. The password for HTTP Basic authentication. - * - * Generated from protobuf field string password = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * Optional. The HTTP request headers to send together with fulfillment - * requests. - * - * Generated from protobuf field map request_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getRequestHeaders() - { - return $this->request_headers; - } - - /** - * Optional. The HTTP request headers to send together with fulfillment - * requests. - * - * Generated from protobuf field map request_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setRequestHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->request_headers = $arr; - - return $this; - } - - /** - * Optional. Indicates if generic web service is created through Cloud - * Functions integration. Defaults to false. - * is_cloud_function is deprecated. Cloud functions can be configured by - * its uri as a regular web service now. - * - * Generated from protobuf field bool is_cloud_function = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return bool - * @deprecated - */ - public function getIsCloudFunction() - { - @trigger_error('is_cloud_function is deprecated.', E_USER_DEPRECATED); - return $this->is_cloud_function; - } - - /** - * Optional. Indicates if generic web service is created through Cloud - * Functions integration. Defaults to false. - * is_cloud_function is deprecated. Cloud functions can be configured by - * its uri as a regular web service now. - * - * Generated from protobuf field bool is_cloud_function = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setIsCloudFunction($var) - { - @trigger_error('is_cloud_function is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->is_cloud_function = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GenericWebService::class, \Google\Cloud\Dialogflow\V2\Fulfillment_GenericWebService::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature.php deleted file mode 100644 index b277b88a3559..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Fulfillment_Feature.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Fulfillments/GetFulfillment', - $argument, - ['\Google\Cloud\Dialogflow\V2\Fulfillment', 'decode'], - $metadata, $options); - } - - /** - * Updates the fulfillment. - * @param \Google\Cloud\Dialogflow\V2\UpdateFulfillmentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateFulfillment(\Google\Cloud\Dialogflow\V2\UpdateFulfillmentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Fulfillments/UpdateFulfillment', - $argument, - ['\Google\Cloud\Dialogflow\V2\Fulfillment', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsDestination.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsDestination.php deleted file mode 100644 index d98f64a1385a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsDestination.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.dialogflow.v2.GcsDestination - */ -class GcsDestination extends \Google\Protobuf\Internal\Message -{ - /** - * The Google Cloud Storage URIs for the output. A URI is of the - * form: - * gs://bucket/object-prefix-or-name - * Whether a prefix or name is used depends on the use case. The requesting - * user must have "write-permission" to the bucket. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The Google Cloud Storage URIs for the output. A URI is of the - * form: - * gs://bucket/object-prefix-or-name - * Whether a prefix or name is used depends on the use case. The requesting - * user must have "write-permission" to the bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Gcs::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage URIs for the output. A URI is of the - * form: - * gs://bucket/object-prefix-or-name - * Whether a prefix or name is used depends on the use case. The requesting - * user must have "write-permission" to the bucket. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The Google Cloud Storage URIs for the output. A URI is of the - * form: - * gs://bucket/object-prefix-or-name - * Whether a prefix or name is used depends on the use case. The requesting - * user must have "write-permission" to the bucket. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsSources.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsSources.php deleted file mode 100644 index fd50c5a6fcdd..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GcsSources.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dialogflow.v2.GcsSources - */ -class GcsSources extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: - * gs://bucket/object-prefix-or-name - * Whether a prefix or name is used depends on the use case. - * - * Generated from protobuf field repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $uris - * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: - * gs://bucket/object-prefix-or-name - * Whether a prefix or name is used depends on the use case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Gcs::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: - * gs://bucket/object-prefix-or-name - * Whether a prefix or name is used depends on the use case. - * - * Generated from protobuf field repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUris() - { - return $this->uris; - } - - /** - * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: - * gs://bucket/object-prefix-or-name - * Whether a prefix or name is used depends on the use case. - * - * Generated from protobuf field repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->uris = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetAgentRequest.php deleted file mode 100644 index d85fedae4a17..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetAgentRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.GetAgentRequest - */ -class GetAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that the agent to fetch is associated with. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project that the agent to fetch is associated with. - * Format: `projects/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that the agent to fetch is associated with. - * Format: `projects/`. - * - * 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 project that the agent to fetch is associated with. - * Format: `projects/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetContextRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetContextRequest.php deleted file mode 100644 index e5a1883bdae6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetContextRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.dialogflow.v2.GetContextRequest - */ -class GetContextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the context. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the context. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the context. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 context. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationDatasetRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationDatasetRequest.php deleted file mode 100644 index 50aaa6ef04ff..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationDatasetRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.GetConversationDatasetRequest - */ -class GetConversationDatasetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation dataset to retrieve. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The conversation dataset to retrieve. Format: - * `projects//locations//conversationDatasets/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation dataset to retrieve. Format: - * `projects//locations//conversationDatasets/` - * - * 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 conversation dataset to retrieve. Format: - * `projects//locations//conversationDatasets/` - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelEvaluationRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelEvaluationRequest.php deleted file mode 100644 index adcecce6bfa9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelEvaluationRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest - */ -class GetConversationModelEvaluationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation model evaluation resource name. Format: - * `projects//conversationModels//evaluations/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The conversation model evaluation resource name. Format: - * `projects//conversationModels//evaluations/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation model evaluation resource name. Format: - * `projects//conversationModels//evaluations/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The conversation model evaluation resource name. Format: - * `projects//conversationModels//evaluations/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelRequest.php deleted file mode 100644 index 342f5d7ad4a5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationModelRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.GetConversationModelRequest - */ -class GetConversationModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation model to retrieve. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The conversation model to retrieve. Format: - * `projects//conversationModels/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation model to retrieve. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The conversation model to retrieve. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationProfileRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationProfileRequest.php deleted file mode 100644 index 7c1256a0aae4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationProfileRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.GetConversationProfileRequest - */ -class GetConversationProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the conversation profile. - * Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the conversation profile. - * Format: `projects//locations//conversationProfiles/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the conversation profile. - * Format: `projects//locations//conversationProfiles/`. - * - * 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 resource name of the conversation profile. - * Format: `projects//locations//conversationProfiles/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationRequest.php deleted file mode 100644 index 898ef102cbaf..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetConversationRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.GetConversationRequest - */ -class GetConversationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the conversation. Format: - * `projects//locations//conversations/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the conversation. Format: - * `projects//locations//conversations/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the conversation. Format: - * `projects//locations//conversations/`. - * - * 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. Format: - * `projects//locations//conversations/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetDocumentRequest.php deleted file mode 100644 index 3822c86978f9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetDocumentRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.GetDocumentRequest - */ -class GetDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the document to retrieve. - * Format `projects//locations//knowledgeBases//documents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the document to retrieve. - * Format `projects//locations//knowledgeBases//documents/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the document to retrieve. - * Format `projects//locations//knowledgeBases//documents/`. - * - * 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 document to retrieve. - * Format `projects//locations//knowledgeBases//documents/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEntityTypeRequest.php deleted file mode 100644 index 2b1fe5ea5330..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEntityTypeRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.v2.GetEntityTypeRequest - */ -class GetEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entity type. - * Format: `projects//agent/entityTypes/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entity type. - * Format: `projects//agent/entityTypes/`. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entity type. - * Format: `projects//agent/entityTypes/`. - * - * 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 entity type. - * Format: `projects//agent/entityTypes/`. - * - * 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; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentHistoryRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentHistoryRequest.php deleted file mode 100644 index 8df0e1890a1f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentHistoryRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest - */ -class GetEnvironmentHistoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the environment to retrieve history for. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the environment to retrieve history for. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the environment to retrieve history for. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * 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 name of the environment to retrieve history for. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentRequest.php deleted file mode 100644 index 286b2cd6e7ca..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetEnvironmentRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.dialogflow.v2.GetEnvironmentRequest - */ -class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the environment. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the environment. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the environment. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * 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 environment. - * Supported formats: - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * The environment ID for the default environment is `-`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetFulfillmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetFulfillmentRequest.php deleted file mode 100644 index bf0e0d6239ac..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetFulfillmentRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.GetFulfillmentRequest - */ -class GetFulfillmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the fulfillment. - * Format: `projects//agent/fulfillment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the fulfillment. - * Format: `projects//agent/fulfillment`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the fulfillment. - * Format: `projects//agent/fulfillment`. - * - * 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 fulfillment. - * Format: `projects//agent/fulfillment`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetIntentRequest.php deleted file mode 100644 index e2e52c2d86fd..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetIntentRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.dialogflow.v2.GetIntentRequest - */ -class GetIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the intent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $intent_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the intent. - * Format: `projects//agent/intents/`. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type int $intent_view - * Optional. The resource view to apply to the returned intent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the intent. - * Format: `projects//agent/intents/`. - * - * 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 intent. - * Format: `projects//agent/intents/`. - * - * 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; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIntentView() - { - return $this->intent_view; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIntentView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); - $this->intent_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetKnowledgeBaseRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetKnowledgeBaseRequest.php deleted file mode 100644 index 5a6d77bc8a27..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetKnowledgeBaseRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.GetKnowledgeBaseRequest - */ -class GetKnowledgeBaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the knowledge base to retrieve. - * Format `projects//locations//knowledgeBases/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the knowledge base to retrieve. - * Format `projects//locations//knowledgeBases/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the knowledge base to retrieve. - * Format `projects//locations//knowledgeBases/`. - * - * 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 knowledge base to retrieve. - * Format `projects//locations//knowledgeBases/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetParticipantRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetParticipantRequest.php deleted file mode 100644 index 85fa93287fc9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetParticipantRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.GetParticipantRequest - */ -class GetParticipantRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the participant. Format: - * `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the participant. Format: - * `projects//locations//conversations//participants/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the participant. Format: - * `projects//locations//conversations//participants/`. - * - * 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 participant. Format: - * `projects//locations//conversations//participants/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetSessionEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetSessionEntityTypeRequest.php deleted file mode 100644 index 34c98e03c519..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetSessionEntityTypeRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.v2.GetSessionEntityTypeRequest - */ -class GetSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session entity type. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the session entity type. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session entity type. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 session entity type. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetValidationResultRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetValidationResultRequest.php deleted file mode 100644 index 67ee2984cfff..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetValidationResultRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.v2.GetValidationResultRequest - */ -class GetValidationResultRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that the agent is associated with. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The language for which you want a validation result. If not - * specified, the agent's default language is used. [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) - * are supported. Note: languages must be enabled in the agent before they can - * be used. - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project that the agent is associated with. - * Format: `projects/`. - * @type string $language_code - * Optional. The language for which you want a validation result. If not - * specified, the agent's default language is used. [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) - * are supported. Note: languages must be enabled in the agent before they can - * be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that the agent is associated with. - * Format: `projects/`. - * - * 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 project that the agent is associated with. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The language for which you want a validation result. If not - * specified, the agent's default language is used. [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) - * are supported. Note: languages must be enabled in the agent before they can - * be used. - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language for which you want a validation result. If not - * specified, the agent's default language is used. [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) - * are supported. Note: languages must be enabled in the agent before they can - * be used. - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetVersionRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetVersionRequest.php deleted file mode 100644 index 39d649a89cb4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/GetVersionRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.dialogflow.v2.GetVersionRequest - */ -class GetVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the version. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the version. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the version. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * 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 version. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig.php deleted file mode 100644 index 3a0c7664abc3..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig - */ -class HumanAgentAssistantConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Pub/Sub topic on which to publish new agent assistant events. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 2; - */ - protected $notification_config = null; - /** - * Configuration for agent assistance of human agent participant. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig human_agent_suggestion_config = 3; - */ - protected $human_agent_suggestion_config = null; - /** - * Configuration for agent assistance of end user participant. - * Currently, this feature is not general available, please contact Google - * to get access. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig end_user_suggestion_config = 4; - */ - protected $end_user_suggestion_config = null; - /** - * Configuration for message analysis. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig message_analysis_config = 5; - */ - protected $message_analysis_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\NotificationConfig $notification_config - * Pub/Sub topic on which to publish new agent assistant events. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig $human_agent_suggestion_config - * Configuration for agent assistance of human agent participant. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig $end_user_suggestion_config - * Configuration for agent assistance of end user participant. - * Currently, this feature is not general available, please contact Google - * to get access. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\MessageAnalysisConfig $message_analysis_config - * Configuration for message analysis. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Pub/Sub topic on which to publish new agent assistant events. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 2; - * @return \Google\Cloud\Dialogflow\V2\NotificationConfig|null - */ - public function getNotificationConfig() - { - return $this->notification_config; - } - - public function hasNotificationConfig() - { - return isset($this->notification_config); - } - - public function clearNotificationConfig() - { - unset($this->notification_config); - } - - /** - * Pub/Sub topic on which to publish new agent assistant events. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig notification_config = 2; - * @param \Google\Cloud\Dialogflow\V2\NotificationConfig $var - * @return $this - */ - public function setNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\NotificationConfig::class); - $this->notification_config = $var; - - return $this; - } - - /** - * Configuration for agent assistance of human agent participant. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig human_agent_suggestion_config = 3; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig|null - */ - public function getHumanAgentSuggestionConfig() - { - return $this->human_agent_suggestion_config; - } - - public function hasHumanAgentSuggestionConfig() - { - return isset($this->human_agent_suggestion_config); - } - - public function clearHumanAgentSuggestionConfig() - { - unset($this->human_agent_suggestion_config); - } - - /** - * Configuration for agent assistance of human agent participant. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig human_agent_suggestion_config = 3; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig $var - * @return $this - */ - public function setHumanAgentSuggestionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig::class); - $this->human_agent_suggestion_config = $var; - - return $this; - } - - /** - * Configuration for agent assistance of end user participant. - * Currently, this feature is not general available, please contact Google - * to get access. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig end_user_suggestion_config = 4; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig|null - */ - public function getEndUserSuggestionConfig() - { - return $this->end_user_suggestion_config; - } - - public function hasEndUserSuggestionConfig() - { - return isset($this->end_user_suggestion_config); - } - - public function clearEndUserSuggestionConfig() - { - unset($this->end_user_suggestion_config); - } - - /** - * Configuration for agent assistance of end user participant. - * Currently, this feature is not general available, please contact Google - * to get access. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig end_user_suggestion_config = 4; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig $var - * @return $this - */ - public function setEndUserSuggestionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionConfig::class); - $this->end_user_suggestion_config = $var; - - return $this; - } - - /** - * Configuration for message analysis. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig message_analysis_config = 5; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\MessageAnalysisConfig|null - */ - public function getMessageAnalysisConfig() - { - return $this->message_analysis_config; - } - - public function hasMessageAnalysisConfig() - { - return isset($this->message_analysis_config); - } - - public function clearMessageAnalysisConfig() - { - unset($this->message_analysis_config); - } - - /** - * Configuration for message analysis. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig message_analysis_config = 5; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\MessageAnalysisConfig $var - * @return $this - */ - public function setMessageAnalysisConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\MessageAnalysisConfig::class); - $this->message_analysis_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationModelConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationModelConfig.php deleted file mode 100644 index 913c711f5571..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationModelConfig.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - */ -class ConversationModelConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Conversation model resource name. Format: `projects//conversationModels/`. - * - * Generated from protobuf field string model = 1 [(.google.api.resource_reference) = { - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $model - * Conversation model resource name. Format: `projects//conversationModels/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Conversation model resource name. Format: `projects//conversationModels/`. - * - * Generated from protobuf field string model = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Conversation model resource name. Format: `projects//conversationModels/`. - * - * Generated from protobuf field string model = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConversationModelConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_ConversationModelConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationProcessConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationProcessConfig.php deleted file mode 100644 index 5aaf665a8da9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/ConversationProcessConfig.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - */ -class ConversationProcessConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Number of recent non-small-talk sentences to use as context for article - * and FAQ suggestion - * - * Generated from protobuf field int32 recent_sentences_count = 2; - */ - protected $recent_sentences_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $recent_sentences_count - * Number of recent non-small-talk sentences to use as context for article - * and FAQ suggestion - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Number of recent non-small-talk sentences to use as context for article - * and FAQ suggestion - * - * Generated from protobuf field int32 recent_sentences_count = 2; - * @return int - */ - public function getRecentSentencesCount() - { - return $this->recent_sentences_count; - } - - /** - * Number of recent non-small-talk sentences to use as context for article - * and FAQ suggestion - * - * Generated from protobuf field int32 recent_sentences_count = 2; - * @param int $var - * @return $this - */ - public function setRecentSentencesCount($var) - { - GPBUtil::checkInt32($var); - $this->recent_sentences_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConversationProcessConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_ConversationProcessConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php deleted file mode 100644 index 961e99d29168..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/MessageAnalysisConfig.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - */ -class MessageAnalysisConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Enable entity extraction in conversation messages on [agent assist - * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - * If unspecified, defaults to false. - * Currently, this feature is not general available, please contact Google - * to get access. - * - * Generated from protobuf field bool enable_entity_extraction = 2; - */ - protected $enable_entity_extraction = false; - /** - * Enable sentiment analysis in conversation messages on [agent assist - * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - * If unspecified, defaults to false. Sentiment analysis inspects user input - * and identifies the prevailing subjective opinion, especially to determine - * a user's attitude as positive, negative, or neutral: - * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - * For - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] - * method, result will be in - * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. - * For - * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] - * method, result will be in - * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] - * For - * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] - * method, result will be in - * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] - * If Pub/Sub notification is configured, result will be in - * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. - * - * Generated from protobuf field bool enable_sentiment_analysis = 3; - */ - protected $enable_sentiment_analysis = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_entity_extraction - * Enable entity extraction in conversation messages on [agent assist - * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - * If unspecified, defaults to false. - * Currently, this feature is not general available, please contact Google - * to get access. - * @type bool $enable_sentiment_analysis - * Enable sentiment analysis in conversation messages on [agent assist - * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - * If unspecified, defaults to false. Sentiment analysis inspects user input - * and identifies the prevailing subjective opinion, especially to determine - * a user's attitude as positive, negative, or neutral: - * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - * For - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] - * method, result will be in - * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. - * For - * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] - * method, result will be in - * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] - * For - * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] - * method, result will be in - * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] - * If Pub/Sub notification is configured, result will be in - * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Enable entity extraction in conversation messages on [agent assist - * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - * If unspecified, defaults to false. - * Currently, this feature is not general available, please contact Google - * to get access. - * - * Generated from protobuf field bool enable_entity_extraction = 2; - * @return bool - */ - public function getEnableEntityExtraction() - { - return $this->enable_entity_extraction; - } - - /** - * Enable entity extraction in conversation messages on [agent assist - * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - * If unspecified, defaults to false. - * Currently, this feature is not general available, please contact Google - * to get access. - * - * Generated from protobuf field bool enable_entity_extraction = 2; - * @param bool $var - * @return $this - */ - public function setEnableEntityExtraction($var) - { - GPBUtil::checkBool($var); - $this->enable_entity_extraction = $var; - - return $this; - } - - /** - * Enable sentiment analysis in conversation messages on [agent assist - * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - * If unspecified, defaults to false. Sentiment analysis inspects user input - * and identifies the prevailing subjective opinion, especially to determine - * a user's attitude as positive, negative, or neutral: - * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - * For - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] - * method, result will be in - * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. - * For - * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] - * method, result will be in - * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] - * For - * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] - * method, result will be in - * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] - * If Pub/Sub notification is configured, result will be in - * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. - * - * Generated from protobuf field bool enable_sentiment_analysis = 3; - * @return bool - */ - public function getEnableSentimentAnalysis() - { - return $this->enable_sentiment_analysis; - } - - /** - * Enable sentiment analysis in conversation messages on [agent assist - * stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - * If unspecified, defaults to false. Sentiment analysis inspects user input - * and identifies the prevailing subjective opinion, especially to determine - * a user's attitude as positive, negative, or neutral: - * https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - * For - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] - * method, result will be in - * [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. - * For - * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] - * method, result will be in - * [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] - * For - * [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] - * method, result will be in - * [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] - * If Pub/Sub notification is configured, result will be in - * [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. - * - * Generated from protobuf field bool enable_sentiment_analysis = 3; - * @param bool $var - * @return $this - */ - public function setEnableSentimentAnalysis($var) - { - GPBUtil::checkBool($var); - $this->enable_sentiment_analysis = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MessageAnalysisConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_MessageAnalysisConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionConfig.php deleted file mode 100644 index 5a572f34db48..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionConfig.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - */ -class SuggestionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration of different suggestion features. One feature can have only - * one config. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig feature_configs = 2; - */ - private $feature_configs; - /** - * If `group_suggestion_responses` is false, and there are multiple - * `feature_configs` in `event based suggestion` or - * StreamingAnalyzeContent, we will try to deliver suggestions to customers - * as soon as we get new suggestion. Different type of suggestions based on - * the same context will be in separate Pub/Sub event or - * `StreamingAnalyzeContentResponse`. - * If `group_suggestion_responses` set to true. All the suggestions to the - * same participant based on the same context will be grouped into a single - * Pub/Sub event or StreamingAnalyzeContentResponse. - * - * Generated from protobuf field bool group_suggestion_responses = 3; - */ - protected $group_suggestion_responses = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig>|\Google\Protobuf\Internal\RepeatedField $feature_configs - * Configuration of different suggestion features. One feature can have only - * one config. - * @type bool $group_suggestion_responses - * If `group_suggestion_responses` is false, and there are multiple - * `feature_configs` in `event based suggestion` or - * StreamingAnalyzeContent, we will try to deliver suggestions to customers - * as soon as we get new suggestion. Different type of suggestions based on - * the same context will be in separate Pub/Sub event or - * `StreamingAnalyzeContentResponse`. - * If `group_suggestion_responses` set to true. All the suggestions to the - * same participant based on the same context will be grouped into a single - * Pub/Sub event or StreamingAnalyzeContentResponse. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Configuration of different suggestion features. One feature can have only - * one config. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig feature_configs = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFeatureConfigs() - { - return $this->feature_configs; - } - - /** - * Configuration of different suggestion features. One feature can have only - * one config. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig feature_configs = 2; - * @param array<\Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFeatureConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig::class); - $this->feature_configs = $arr; - - return $this; - } - - /** - * If `group_suggestion_responses` is false, and there are multiple - * `feature_configs` in `event based suggestion` or - * StreamingAnalyzeContent, we will try to deliver suggestions to customers - * as soon as we get new suggestion. Different type of suggestions based on - * the same context will be in separate Pub/Sub event or - * `StreamingAnalyzeContentResponse`. - * If `group_suggestion_responses` set to true. All the suggestions to the - * same participant based on the same context will be grouped into a single - * Pub/Sub event or StreamingAnalyzeContentResponse. - * - * Generated from protobuf field bool group_suggestion_responses = 3; - * @return bool - */ - public function getGroupSuggestionResponses() - { - return $this->group_suggestion_responses; - } - - /** - * If `group_suggestion_responses` is false, and there are multiple - * `feature_configs` in `event based suggestion` or - * StreamingAnalyzeContent, we will try to deliver suggestions to customers - * as soon as we get new suggestion. Different type of suggestions based on - * the same context will be in separate Pub/Sub event or - * `StreamingAnalyzeContentResponse`. - * If `group_suggestion_responses` set to true. All the suggestions to the - * same participant based on the same context will be grouped into a single - * Pub/Sub event or StreamingAnalyzeContentResponse. - * - * Generated from protobuf field bool group_suggestion_responses = 3; - * @param bool $var - * @return $this - */ - public function setGroupSuggestionResponses($var) - { - GPBUtil::checkBool($var); - $this->group_suggestion_responses = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SuggestionConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionFeatureConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionFeatureConfig.php deleted file mode 100644 index c1050336bb55..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionFeatureConfig.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - */ -class SuggestionFeatureConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The suggestion feature. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature suggestion_feature = 5; - */ - protected $suggestion_feature = null; - /** - * Automatically iterates all participants and tries to compile - * suggestions. - * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. - * - * Generated from protobuf field bool enable_event_based_suggestion = 3; - */ - protected $enable_event_based_suggestion = false; - /** - * Settings of suggestion trigger. - * Currently, only ARTICLE_SUGGESTION and FAQ will use this field. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings suggestion_trigger_settings = 10; - */ - protected $suggestion_trigger_settings = null; - /** - * Configs of query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig query_config = 6; - */ - protected $query_config = null; - /** - * Configs of custom conversation model. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig conversation_model_config = 7; - */ - protected $conversation_model_config = null; - /** - * Configs for processing conversation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig conversation_process_config = 8; - */ - protected $conversation_process_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\SuggestionFeature $suggestion_feature - * The suggestion feature. - * @type bool $enable_event_based_suggestion - * Automatically iterates all participants and tries to compile - * suggestions. - * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionTriggerSettings $suggestion_trigger_settings - * Settings of suggestion trigger. - * Currently, only ARTICLE_SUGGESTION and FAQ will use this field. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig $query_config - * Configs of query. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationModelConfig $conversation_model_config - * Configs of custom conversation model. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationProcessConfig $conversation_process_config - * Configs for processing conversation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * The suggestion feature. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature suggestion_feature = 5; - * @return \Google\Cloud\Dialogflow\V2\SuggestionFeature|null - */ - public function getSuggestionFeature() - { - return $this->suggestion_feature; - } - - public function hasSuggestionFeature() - { - return isset($this->suggestion_feature); - } - - public function clearSuggestionFeature() - { - unset($this->suggestion_feature); - } - - /** - * The suggestion feature. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature suggestion_feature = 5; - * @param \Google\Cloud\Dialogflow\V2\SuggestionFeature $var - * @return $this - */ - public function setSuggestionFeature($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature::class); - $this->suggestion_feature = $var; - - return $this; - } - - /** - * Automatically iterates all participants and tries to compile - * suggestions. - * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. - * - * Generated from protobuf field bool enable_event_based_suggestion = 3; - * @return bool - */ - public function getEnableEventBasedSuggestion() - { - return $this->enable_event_based_suggestion; - } - - /** - * Automatically iterates all participants and tries to compile - * suggestions. - * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. - * - * Generated from protobuf field bool enable_event_based_suggestion = 3; - * @param bool $var - * @return $this - */ - public function setEnableEventBasedSuggestion($var) - { - GPBUtil::checkBool($var); - $this->enable_event_based_suggestion = $var; - - return $this; - } - - /** - * Settings of suggestion trigger. - * Currently, only ARTICLE_SUGGESTION and FAQ will use this field. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings suggestion_trigger_settings = 10; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionTriggerSettings|null - */ - public function getSuggestionTriggerSettings() - { - return $this->suggestion_trigger_settings; - } - - public function hasSuggestionTriggerSettings() - { - return isset($this->suggestion_trigger_settings); - } - - public function clearSuggestionTriggerSettings() - { - unset($this->suggestion_trigger_settings); - } - - /** - * Settings of suggestion trigger. - * Currently, only ARTICLE_SUGGESTION and FAQ will use this field. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings suggestion_trigger_settings = 10; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionTriggerSettings $var - * @return $this - */ - public function setSuggestionTriggerSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionTriggerSettings::class); - $this->suggestion_trigger_settings = $var; - - return $this; - } - - /** - * Configs of query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig query_config = 6; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig|null - */ - public function getQueryConfig() - { - return $this->query_config; - } - - public function hasQueryConfig() - { - return isset($this->query_config); - } - - public function clearQueryConfig() - { - unset($this->query_config); - } - - /** - * Configs of query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig query_config = 6; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig $var - * @return $this - */ - public function setQueryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig::class); - $this->query_config = $var; - - return $this; - } - - /** - * Configs of custom conversation model. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig conversation_model_config = 7; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationModelConfig|null - */ - public function getConversationModelConfig() - { - return $this->conversation_model_config; - } - - public function hasConversationModelConfig() - { - return isset($this->conversation_model_config); - } - - public function clearConversationModelConfig() - { - unset($this->conversation_model_config); - } - - /** - * Configs of custom conversation model. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig conversation_model_config = 7; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationModelConfig $var - * @return $this - */ - public function setConversationModelConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationModelConfig::class); - $this->conversation_model_config = $var; - - return $this; - } - - /** - * Configs for processing conversation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig conversation_process_config = 8; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationProcessConfig|null - */ - public function getConversationProcessConfig() - { - return $this->conversation_process_config; - } - - public function hasConversationProcessConfig() - { - return isset($this->conversation_process_config); - } - - public function clearConversationProcessConfig() - { - unset($this->conversation_process_config); - } - - /** - * Configs for processing conversation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig conversation_process_config = 8; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationProcessConfig $var - * @return $this - */ - public function setConversationProcessConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\ConversationProcessConfig::class); - $this->conversation_process_config = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SuggestionFeatureConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionFeatureConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php deleted file mode 100644 index 7b597b177014..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php +++ /dev/null @@ -1,322 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - */ -class SuggestionQueryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Maximum number of results to return. Currently, if unset, defaults to 10. - * And the max number is 20. - * - * Generated from protobuf field int32 max_results = 4; - */ - protected $max_results = 0; - /** - * Confidence threshold of query result. - * Agent Assist gives each suggestion a score in the range [0.0, 1.0], based - * on the relevance between the suggestion and the current conversation - * context. A score of 0.0 has no relevance, while a score of 1.0 has high - * relevance. Only suggestions with a score greater than or equal to the - * value of this field are included in the results. - * For a baseline model (the default), the recommended value is in the range - * [0.05, 0.1]. - * For a custom model, there is no recommended value. Tune this value by - * starting from a very low value and slowly increasing until you have - * desired results. - * If this field is not set, it defaults to 0.0, which means that all - * suggestions are returned. - * Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. - * - * Generated from protobuf field float confidence_threshold = 5; - */ - protected $confidence_threshold = 0.0; - /** - * Determines how recent conversation context is filtered when generating - * suggestions. If unspecified, no messages will be dropped. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings context_filter_settings = 7; - */ - protected $context_filter_settings = null; - protected $query_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource $knowledge_base_query_source - * Query from knowledgebase. It is used by: - * ARTICLE_SUGGESTION, FAQ. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource $document_query_source - * Query from knowledge base document. It is used by: - * SMART_REPLY, SMART_COMPOSE. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource $dialogflow_query_source - * Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. - * @type int $max_results - * Maximum number of results to return. Currently, if unset, defaults to 10. - * And the max number is 20. - * @type float $confidence_threshold - * Confidence threshold of query result. - * Agent Assist gives each suggestion a score in the range [0.0, 1.0], based - * on the relevance between the suggestion and the current conversation - * context. A score of 0.0 has no relevance, while a score of 1.0 has high - * relevance. Only suggestions with a score greater than or equal to the - * value of this field are included in the results. - * For a baseline model (the default), the recommended value is in the range - * [0.05, 0.1]. - * For a custom model, there is no recommended value. Tune this value by - * starting from a very low value and slowly increasing until you have - * desired results. - * If this field is not set, it defaults to 0.0, which means that all - * suggestions are returned. - * Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings $context_filter_settings - * Determines how recent conversation context is filtered when generating - * suggestions. If unspecified, no messages will be dropped. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Query from knowledgebase. It is used by: - * ARTICLE_SUGGESTION, FAQ. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource knowledge_base_query_source = 1; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource|null - */ - public function getKnowledgeBaseQuerySource() - { - return $this->readOneof(1); - } - - public function hasKnowledgeBaseQuerySource() - { - return $this->hasOneof(1); - } - - /** - * Query from knowledgebase. It is used by: - * ARTICLE_SUGGESTION, FAQ. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource knowledge_base_query_source = 1; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource $var - * @return $this - */ - public function setKnowledgeBaseQuerySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Query from knowledge base document. It is used by: - * SMART_REPLY, SMART_COMPOSE. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource document_query_source = 2; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource|null - */ - public function getDocumentQuerySource() - { - return $this->readOneof(2); - } - - public function hasDocumentQuerySource() - { - return $this->hasOneof(2); - } - - /** - * Query from knowledge base document. It is used by: - * SMART_REPLY, SMART_COMPOSE. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource document_query_source = 2; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource $var - * @return $this - */ - public function setDocumentQuerySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource dialogflow_query_source = 3; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource|null - */ - public function getDialogflowQuerySource() - { - return $this->readOneof(3); - } - - public function hasDialogflowQuerySource() - { - return $this->hasOneof(3); - } - - /** - * Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource dialogflow_query_source = 3; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource $var - * @return $this - */ - public function setDialogflowQuerySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Maximum number of results to return. Currently, if unset, defaults to 10. - * And the max number is 20. - * - * Generated from protobuf field int32 max_results = 4; - * @return int - */ - public function getMaxResults() - { - return $this->max_results; - } - - /** - * Maximum number of results to return. Currently, if unset, defaults to 10. - * And the max number is 20. - * - * Generated from protobuf field int32 max_results = 4; - * @param int $var - * @return $this - */ - public function setMaxResults($var) - { - GPBUtil::checkInt32($var); - $this->max_results = $var; - - return $this; - } - - /** - * Confidence threshold of query result. - * Agent Assist gives each suggestion a score in the range [0.0, 1.0], based - * on the relevance between the suggestion and the current conversation - * context. A score of 0.0 has no relevance, while a score of 1.0 has high - * relevance. Only suggestions with a score greater than or equal to the - * value of this field are included in the results. - * For a baseline model (the default), the recommended value is in the range - * [0.05, 0.1]. - * For a custom model, there is no recommended value. Tune this value by - * starting from a very low value and slowly increasing until you have - * desired results. - * If this field is not set, it defaults to 0.0, which means that all - * suggestions are returned. - * Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. - * - * Generated from protobuf field float confidence_threshold = 5; - * @return float - */ - public function getConfidenceThreshold() - { - return $this->confidence_threshold; - } - - /** - * Confidence threshold of query result. - * Agent Assist gives each suggestion a score in the range [0.0, 1.0], based - * on the relevance between the suggestion and the current conversation - * context. A score of 0.0 has no relevance, while a score of 1.0 has high - * relevance. Only suggestions with a score greater than or equal to the - * value of this field are included in the results. - * For a baseline model (the default), the recommended value is in the range - * [0.05, 0.1]. - * For a custom model, there is no recommended value. Tune this value by - * starting from a very low value and slowly increasing until you have - * desired results. - * If this field is not set, it defaults to 0.0, which means that all - * suggestions are returned. - * Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. - * - * Generated from protobuf field float confidence_threshold = 5; - * @param float $var - * @return $this - */ - public function setConfidenceThreshold($var) - { - GPBUtil::checkFloat($var); - $this->confidence_threshold = $var; - - return $this; - } - - /** - * Determines how recent conversation context is filtered when generating - * suggestions. If unspecified, no messages will be dropped. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings context_filter_settings = 7; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings|null - */ - public function getContextFilterSettings() - { - return $this->context_filter_settings; - } - - public function hasContextFilterSettings() - { - return isset($this->context_filter_settings); - } - - public function clearContextFilterSettings() - { - unset($this->context_filter_settings); - } - - /** - * Determines how recent conversation context is filtered when generating - * suggestions. If unspecified, no messages will be dropped. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings context_filter_settings = 7; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings $var - * @return $this - */ - public function setContextFilterSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings::class); - $this->context_filter_settings = $var; - - return $this; - } - - /** - * @return string - */ - public function getQuerySource() - { - return $this->whichOneof("query_source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SuggestionQueryConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/ContextFilterSettings.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/ContextFilterSettings.php deleted file mode 100644 index dba5d8e3a3cb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/ContextFilterSettings.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - */ -class ContextFilterSettings extends \Google\Protobuf\Internal\Message -{ - /** - * If set to true, the last message from virtual agent (hand off message) - * and the message before it (trigger message of hand off) are dropped. - * - * Generated from protobuf field bool drop_handoff_messages = 1; - */ - protected $drop_handoff_messages = false; - /** - * If set to true, all messages from virtual agent are dropped. - * - * Generated from protobuf field bool drop_virtual_agent_messages = 2; - */ - protected $drop_virtual_agent_messages = false; - /** - * If set to true, all messages from ivr stage are dropped. - * - * Generated from protobuf field bool drop_ivr_messages = 3; - */ - protected $drop_ivr_messages = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $drop_handoff_messages - * If set to true, the last message from virtual agent (hand off message) - * and the message before it (trigger message of hand off) are dropped. - * @type bool $drop_virtual_agent_messages - * If set to true, all messages from virtual agent are dropped. - * @type bool $drop_ivr_messages - * If set to true, all messages from ivr stage are dropped. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * If set to true, the last message from virtual agent (hand off message) - * and the message before it (trigger message of hand off) are dropped. - * - * Generated from protobuf field bool drop_handoff_messages = 1; - * @return bool - */ - public function getDropHandoffMessages() - { - return $this->drop_handoff_messages; - } - - /** - * If set to true, the last message from virtual agent (hand off message) - * and the message before it (trigger message of hand off) are dropped. - * - * Generated from protobuf field bool drop_handoff_messages = 1; - * @param bool $var - * @return $this - */ - public function setDropHandoffMessages($var) - { - GPBUtil::checkBool($var); - $this->drop_handoff_messages = $var; - - return $this; - } - - /** - * If set to true, all messages from virtual agent are dropped. - * - * Generated from protobuf field bool drop_virtual_agent_messages = 2; - * @return bool - */ - public function getDropVirtualAgentMessages() - { - return $this->drop_virtual_agent_messages; - } - - /** - * If set to true, all messages from virtual agent are dropped. - * - * Generated from protobuf field bool drop_virtual_agent_messages = 2; - * @param bool $var - * @return $this - */ - public function setDropVirtualAgentMessages($var) - { - GPBUtil::checkBool($var); - $this->drop_virtual_agent_messages = $var; - - return $this; - } - - /** - * If set to true, all messages from ivr stage are dropped. - * - * Generated from protobuf field bool drop_ivr_messages = 3; - * @return bool - */ - public function getDropIvrMessages() - { - return $this->drop_ivr_messages; - } - - /** - * If set to true, all messages from ivr stage are dropped. - * - * Generated from protobuf field bool drop_ivr_messages = 3; - * @param bool $var - * @return $this - */ - public function setDropIvrMessages($var) - { - GPBUtil::checkBool($var); - $this->drop_ivr_messages = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContextFilterSettings::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php deleted file mode 100644 index 017650e5fad0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DialogflowQuerySource.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - */ -class DialogflowQuerySource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of a Dialogflow virtual agent used for end user side - * intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in - * the same Dialogflow project. - * - * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $agent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $agent - * Required. The name of a Dialogflow virtual agent used for end user side - * intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in - * the same Dialogflow project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of a Dialogflow virtual agent used for end user side - * intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in - * the same Dialogflow project. - * - * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAgent() - { - return $this->agent; - } - - /** - * Required. The name of a Dialogflow virtual agent used for end user side - * intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in - * the same Dialogflow project. - * - * Generated from protobuf field string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAgent($var) - { - GPBUtil::checkString($var, True); - $this->agent = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DialogflowQuerySource::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DocumentQuerySource.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DocumentQuerySource.php deleted file mode 100644 index fc256b2de3e4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/DocumentQuerySource.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - */ -class DocumentQuerySource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Knowledge documents to query from. Format: - * `projects//locations//knowledgeBases//documents/`. - * Currently, at most 5 documents are supported. - * - * Generated from protobuf field repeated string documents = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $documents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $documents - * Required. Knowledge documents to query from. Format: - * `projects//locations//knowledgeBases//documents/`. - * Currently, at most 5 documents are supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. Knowledge documents to query from. Format: - * `projects//locations//knowledgeBases//documents/`. - * Currently, at most 5 documents are supported. - * - * Generated from protobuf field repeated string documents = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * Required. Knowledge documents to query from. Format: - * `projects//locations//knowledgeBases//documents/`. - * Currently, at most 5 documents are supported. - * - * Generated from protobuf field repeated string documents = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DocumentQuerySource::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/KnowledgeBaseQuerySource.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/KnowledgeBaseQuerySource.php deleted file mode 100644 index c525c1941b75..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionQueryConfig/KnowledgeBaseQuerySource.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - */ -class KnowledgeBaseQuerySource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Knowledge bases to query. Format: - * `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge - * bases are supported. - * - * Generated from protobuf field repeated string knowledge_bases = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $knowledge_bases; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $knowledge_bases - * Required. Knowledge bases to query. Format: - * `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge - * bases are supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. Knowledge bases to query. Format: - * `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge - * bases are supported. - * - * Generated from protobuf field repeated string knowledge_bases = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKnowledgeBases() - { - return $this->knowledge_bases; - } - - /** - * Required. Knowledge bases to query. Format: - * `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge - * bases are supported. - * - * Generated from protobuf field repeated string knowledge_bases = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKnowledgeBases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->knowledge_bases = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KnowledgeBaseQuerySource::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionTriggerSettings.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionTriggerSettings.php deleted file mode 100644 index c53a6921ed42..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig/SuggestionTriggerSettings.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - */ -class SuggestionTriggerSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Do not trigger if last utterance is small talk. - * - * Generated from protobuf field bool no_smalltalk = 1; - */ - protected $no_smalltalk = false; - /** - * Only trigger suggestion if participant role of last utterance is - * END_USER. - * - * Generated from protobuf field bool only_end_user = 2; - */ - protected $only_end_user = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $no_smalltalk - * Do not trigger if last utterance is small talk. - * @type bool $only_end_user - * Only trigger suggestion if participant role of last utterance is - * END_USER. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Do not trigger if last utterance is small talk. - * - * Generated from protobuf field bool no_smalltalk = 1; - * @return bool - */ - public function getNoSmalltalk() - { - return $this->no_smalltalk; - } - - /** - * Do not trigger if last utterance is small talk. - * - * Generated from protobuf field bool no_smalltalk = 1; - * @param bool $var - * @return $this - */ - public function setNoSmalltalk($var) - { - GPBUtil::checkBool($var); - $this->no_smalltalk = $var; - - return $this; - } - - /** - * Only trigger suggestion if participant role of last utterance is - * END_USER. - * - * Generated from protobuf field bool only_end_user = 2; - * @return bool - */ - public function getOnlyEndUser() - { - return $this->only_end_user; - } - - /** - * Only trigger suggestion if participant role of last utterance is - * END_USER. - * - * Generated from protobuf field bool only_end_user = 2; - * @param bool $var - * @return $this - */ - public function setOnlyEndUser($var) - { - GPBUtil::checkBool($var); - $this->only_end_user = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SuggestionTriggerSettings::class, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig_SuggestionTriggerSettings::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationModelConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationModelConfig.php deleted file mode 100644 index 28da7bb1ba42..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentAssistantConfig_ConversationModelConfig.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentAssistantEvent - */ -class HumanAgentAssistantEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The conversation this notification refers to. - * Format: `projects//conversations/`. - * - * Generated from protobuf field string conversation = 1; - */ - protected $conversation = ''; - /** - * The participant that the suggestion is compiled for. - * Format: `projects//conversations//participants/`. It will not be set in legacy workflow. - * - * Generated from protobuf field string participant = 3; - */ - protected $participant = ''; - /** - * The suggestion results payload that this notification refers to. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult suggestion_results = 5; - */ - private $suggestion_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation - * The conversation this notification refers to. - * Format: `projects//conversations/`. - * @type string $participant - * The participant that the suggestion is compiled for. - * Format: `projects//conversations//participants/`. It will not be set in legacy workflow. - * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $suggestion_results - * The suggestion results payload that this notification refers to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\HumanAgentAssistantEvent::initOnce(); - parent::__construct($data); - } - - /** - * The conversation this notification refers to. - * Format: `projects//conversations/`. - * - * Generated from protobuf field string conversation = 1; - * @return string - */ - public function getConversation() - { - return $this->conversation; - } - - /** - * The conversation this notification refers to. - * Format: `projects//conversations/`. - * - * Generated from protobuf field string conversation = 1; - * @param string $var - * @return $this - */ - public function setConversation($var) - { - GPBUtil::checkString($var, True); - $this->conversation = $var; - - return $this; - } - - /** - * The participant that the suggestion is compiled for. - * Format: `projects//conversations//participants/`. It will not be set in legacy workflow. - * - * Generated from protobuf field string participant = 3; - * @return string - */ - public function getParticipant() - { - return $this->participant; - } - - /** - * The participant that the suggestion is compiled for. - * Format: `projects//conversations//participants/`. It will not be set in legacy workflow. - * - * Generated from protobuf field string participant = 3; - * @param string $var - * @return $this - */ - public function setParticipant($var) - { - GPBUtil::checkString($var, True); - $this->participant = $var; - - return $this; - } - - /** - * The suggestion results payload that this notification refers to. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult suggestion_results = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSuggestionResults() - { - return $this->suggestion_results; - } - - /** - * The suggestion results payload that this notification refers to. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult suggestion_results = 5; - * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSuggestionResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); - $this->suggestion_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig.php deleted file mode 100644 index 63924ddc8d81..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentHandoffConfig - */ -class HumanAgentHandoffConfig extends \Google\Protobuf\Internal\Message -{ - protected $agent_service; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig $live_person_config - * Uses LivePerson (https://www.liveperson.com). - * @type \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig $salesforce_live_agent_config - * Uses Salesforce Live Agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Uses LivePerson (https://www.liveperson.com). - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig live_person_config = 1; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig|null - */ - public function getLivePersonConfig() - { - return $this->readOneof(1); - } - - public function hasLivePersonConfig() - { - return $this->hasOneof(1); - } - - /** - * Uses LivePerson (https://www.liveperson.com). - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig live_person_config = 1; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig $var - * @return $this - */ - public function setLivePersonConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Uses Salesforce Live Agent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig salesforce_live_agent_config = 2; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig|null - */ - public function getSalesforceLiveAgentConfig() - { - return $this->readOneof(2); - } - - public function hasSalesforceLiveAgentConfig() - { - return $this->hasOneof(2); - } - - /** - * Uses Salesforce Live Agent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig salesforce_live_agent_config = 2; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig $var - * @return $this - */ - public function setSalesforceLiveAgentConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getAgentService() - { - return $this->whichOneof("agent_service"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/LivePersonConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/LivePersonConfig.php deleted file mode 100644 index 6e6f2dac5c30..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/LivePersonConfig.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - */ -class LivePersonConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Account number of the LivePerson account to connect. This is - * the account number you input at the login page. - * - * Generated from protobuf field string account_number = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $account_number = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $account_number - * Required. Account number of the LivePerson account to connect. This is - * the account number you input at the login page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. Account number of the LivePerson account to connect. This is - * the account number you input at the login page. - * - * Generated from protobuf field string account_number = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAccountNumber() - { - return $this->account_number; - } - - /** - * Required. Account number of the LivePerson account to connect. This is - * the account number you input at the login page. - * - * Generated from protobuf field string account_number = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAccountNumber($var) - { - GPBUtil::checkString($var, True); - $this->account_number = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LivePersonConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig_LivePersonConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/SalesforceLiveAgentConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/SalesforceLiveAgentConfig.php deleted file mode 100644 index 8bc5641bf77b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig/SalesforceLiveAgentConfig.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - */ -class SalesforceLiveAgentConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The organization ID of the Salesforce account. - * - * Generated from protobuf field string organization_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $organization_id = ''; - /** - * Required. Live Agent deployment ID. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment_id = ''; - /** - * Required. Live Agent chat button ID. - * - * Generated from protobuf field string button_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $button_id = ''; - /** - * Required. Domain of the Live Agent endpoint for this agent. You can find - * the endpoint URL in the `Live Agent settings` page. For example if URL - * has the form https://d.la4-c2-phx.salesforceliveagent.com/..., - * you should fill in d.la4-c2-phx.salesforceliveagent.com. - * - * Generated from protobuf field string endpoint_domain = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint_domain = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $organization_id - * Required. The organization ID of the Salesforce account. - * @type string $deployment_id - * Required. Live Agent deployment ID. - * @type string $button_id - * Required. Live Agent chat button ID. - * @type string $endpoint_domain - * Required. Domain of the Live Agent endpoint for this agent. You can find - * the endpoint URL in the `Live Agent settings` page. For example if URL - * has the form https://d.la4-c2-phx.salesforceliveagent.com/..., - * you should fill in d.la4-c2-phx.salesforceliveagent.com. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. The organization ID of the Salesforce account. - * - * Generated from protobuf field string organization_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOrganizationId() - { - return $this->organization_id; - } - - /** - * Required. The organization ID of the Salesforce account. - * - * Generated from protobuf field string organization_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOrganizationId($var) - { - GPBUtil::checkString($var, True); - $this->organization_id = $var; - - return $this; - } - - /** - * Required. Live Agent deployment ID. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDeploymentId() - { - return $this->deployment_id; - } - - /** - * Required. Live Agent deployment ID. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDeploymentId($var) - { - GPBUtil::checkString($var, True); - $this->deployment_id = $var; - - return $this; - } - - /** - * Required. Live Agent chat button ID. - * - * Generated from protobuf field string button_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getButtonId() - { - return $this->button_id; - } - - /** - * Required. Live Agent chat button ID. - * - * Generated from protobuf field string button_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setButtonId($var) - { - GPBUtil::checkString($var, True); - $this->button_id = $var; - - return $this; - } - - /** - * Required. Domain of the Live Agent endpoint for this agent. You can find - * the endpoint URL in the `Live Agent settings` page. For example if URL - * has the form https://d.la4-c2-phx.salesforceliveagent.com/..., - * you should fill in d.la4-c2-phx.salesforceliveagent.com. - * - * Generated from protobuf field string endpoint_domain = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEndpointDomain() - { - return $this->endpoint_domain; - } - - /** - * Required. Domain of the Live Agent endpoint for this agent. You can find - * the endpoint URL in the `Live Agent settings` page. For example if URL - * has the form https://d.la4-c2-phx.salesforceliveagent.com/..., - * you should fill in d.la4-c2-phx.salesforceliveagent.com. - * - * Generated from protobuf field string endpoint_domain = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEndpointDomain($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_domain = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SalesforceLiveAgentConfig::class, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig_SalesforceLiveAgentConfig::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_LivePersonConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_LivePersonConfig.php deleted file mode 100644 index 3578f1fc1aad..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/HumanAgentHandoffConfig_LivePersonConfig.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.ImportAgentRequest - */ -class ImportAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that the agent to import is associated with. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - protected $agent; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project that the agent to import is associated with. - * Format: `projects/`. - * @type string $agent_uri - * The URI to a Google Cloud Storage file containing the agent to import. - * Note: The URI must start with "gs://". - * Dialogflow performs a read operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have read permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * @type string $agent_content - * Zip compressed raw byte content for agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that the agent to import is associated with. - * Format: `projects/`. - * - * 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 project that the agent to import is associated with. - * Format: `projects/`. - * - * 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 URI to a Google Cloud Storage file containing the agent to import. - * Note: The URI must start with "gs://". - * Dialogflow performs a read operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have read permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * - * Generated from protobuf field string agent_uri = 2; - * @return string - */ - public function getAgentUri() - { - return $this->readOneof(2); - } - - public function hasAgentUri() - { - return $this->hasOneof(2); - } - - /** - * The URI to a Google Cloud Storage file containing the agent to import. - * Note: The URI must start with "gs://". - * Dialogflow performs a read operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have read permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * - * Generated from protobuf field string agent_uri = 2; - * @param string $var - * @return $this - */ - public function setAgentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Zip compressed raw byte content for agent. - * - * Generated from protobuf field bytes agent_content = 3; - * @return string - */ - public function getAgentContent() - { - return $this->readOneof(3); - } - - public function hasAgentContent() - { - return $this->hasOneof(3); - } - - /** - * Zip compressed raw byte content for agent. - * - * Generated from protobuf field bytes agent_content = 3; - * @param string $var - * @return $this - */ - public function setAgentContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getAgent() - { - return $this->whichOneof("agent"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationMetadata.php deleted file mode 100644 index fd0fdeede7ef..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationMetadata.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata - */ -class ImportConversationDataOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the imported conversation dataset. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { - */ - protected $conversation_dataset = ''; - /** - * Partial failures are failures that don't fail the whole long running - * operation, e.g. single files that couldn't be read. - * - * Generated from protobuf field repeated .google.rpc.Status partial_failures = 2; - */ - private $partial_failures; - /** - * Timestamp when import conversation data request was created. The time is - * measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_dataset - * The resource name of the imported conversation dataset. Format: - * `projects//locations//conversationDatasets/` - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_failures - * Partial failures are failures that don't fail the whole long running - * operation, e.g. single files that couldn't be read. - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when import conversation data request was created. The time is - * measured on server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the imported conversation dataset. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getConversationDataset() - { - return $this->conversation_dataset; - } - - /** - * The resource name of the imported conversation dataset. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setConversationDataset($var) - { - GPBUtil::checkString($var, True); - $this->conversation_dataset = $var; - - return $this; - } - - /** - * Partial failures are failures that don't fail the whole long running - * operation, e.g. single files that couldn't be read. - * - * Generated from protobuf field repeated .google.rpc.Status partial_failures = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartialFailures() - { - return $this->partial_failures; - } - - /** - * Partial failures are failures that don't fail the whole long running - * operation, e.g. single files that couldn't be read. - * - * Generated from protobuf field repeated .google.rpc.Status partial_failures = 2; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartialFailures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->partial_failures = $arr; - - return $this; - } - - /** - * Timestamp when import conversation data request was created. The time is - * measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @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); - } - - /** - * Timestamp when import conversation data request was created. The time is - * measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationResponse.php deleted file mode 100644 index 9e946c081918..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataOperationResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.dialogflow.v2.ImportConversationDataOperationResponse - */ -class ImportConversationDataOperationResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the imported conversation dataset. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { - */ - protected $conversation_dataset = ''; - /** - * Number of conversations imported successfully. - * - * Generated from protobuf field int32 import_count = 3; - */ - protected $import_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_dataset - * The resource name of the imported conversation dataset. Format: - * `projects//locations//conversationDatasets/` - * @type int $import_count - * Number of conversations imported successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the imported conversation dataset. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getConversationDataset() - { - return $this->conversation_dataset; - } - - /** - * The resource name of the imported conversation dataset. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setConversationDataset($var) - { - GPBUtil::checkString($var, True); - $this->conversation_dataset = $var; - - return $this; - } - - /** - * Number of conversations imported successfully. - * - * Generated from protobuf field int32 import_count = 3; - * @return int - */ - public function getImportCount() - { - return $this->import_count; - } - - /** - * Number of conversations imported successfully. - * - * Generated from protobuf field int32 import_count = 3; - * @param int $var - * @return $this - */ - public function setImportCount($var) - { - GPBUtil::checkInt32($var); - $this->import_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataRequest.php deleted file mode 100644 index 4dbfc9178c1c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportConversationDataRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.dialogflow.v2.ImportConversationDataRequest - */ -class ImportConversationDataRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Dataset resource name. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Configuration describing where to import data from. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Dataset resource name. Format: - * `projects//locations//conversationDatasets/` - * @type \Google\Cloud\Dialogflow\V2\InputConfig $input_config - * Required. Configuration describing where to import data from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * Required. Dataset resource name. Format: - * `projects//locations//conversationDatasets/` - * - * 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. Dataset resource name. Format: - * `projects//locations//conversationDatasets/` - * - * 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; - } - - /** - * Required. Configuration describing where to import data from. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. Configuration describing where to import data from. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputConfig::class); - $this->input_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentTemplate.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentTemplate.php deleted file mode 100644 index 674d0140d28e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentTemplate.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.dialogflow.v2.ImportDocumentTemplate - */ -class ImportDocumentTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The MIME type of the document. - * - * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mime_type = ''; - /** - * Required. The knowledge type of document content. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $knowledge_types; - /** - * Metadata for the document. The metadata supports arbitrary - * key-value pairs. Suggested use cases include storing a document's title, - * an external URL distinct from the document's content_uri, etc. - * The max size of a `key` or a `value` of the metadata is 1024 bytes. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mime_type - * Required. The MIME type of the document. - * @type array|\Google\Protobuf\Internal\RepeatedField $knowledge_types - * Required. The knowledge type of document content. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Metadata for the document. The metadata supports arbitrary - * key-value pairs. Suggested use cases include storing a document's title, - * an external URL distinct from the document's content_uri, etc. - * The max size of a `key` or a `value` of the metadata is 1024 bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The MIME type of the document. - * - * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Required. The MIME type of the document. - * - * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Required. The knowledge type of document content. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKnowledgeTypes() - { - return $this->knowledge_types; - } - - /** - * Required. The knowledge type of document content. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKnowledgeTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\Document\KnowledgeType::class); - $this->knowledge_types = $arr; - - return $this; - } - - /** - * Metadata for the document. The metadata supports arbitrary - * key-value pairs. Suggested use cases include storing a document's title, - * an external URL distinct from the document's content_uri, etc. - * The max size of a `key` or a `value` of the metadata is 1024 bytes. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Metadata for the document. The metadata supports arbitrary - * key-value pairs. Suggested use cases include storing a document's title, - * an external URL distinct from the document's content_uri, etc. - * The max size of a `key` or a `value` of the metadata is 1024 bytes. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsRequest.php deleted file mode 100644 index 12ac6bfd7ea1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsRequest.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.dialogflow.v2.ImportDocumentsRequest - */ -class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The knowledge base to import documents into. - * Format: `projects//locations//knowledgeBases/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Document template used for importing all the documents. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ImportDocumentTemplate document_template = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document_template = null; - /** - * Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * - * Generated from protobuf field bool import_gcs_custom_metadata = 4; - */ - protected $import_gcs_custom_metadata = false; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The knowledge base to import documents into. - * Format: `projects//locations//knowledgeBases/`. - * @type \Google\Cloud\Dialogflow\V2\GcsSources $gcs_source - * The Google Cloud Storage location for the documents. - * The path can include a wildcard. - * These URIs may have the forms - * `gs:///`. - * `gs:////*.`. - * @type \Google\Cloud\Dialogflow\V2\ImportDocumentTemplate $document_template - * Required. Document template used for importing all the documents. - * @type bool $import_gcs_custom_metadata - * Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The knowledge base to import documents into. - * Format: `projects//locations//knowledgeBases/`. - * - * 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 knowledge base to import documents into. - * Format: `projects//locations//knowledgeBases/`. - * - * 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 Google Cloud Storage location for the documents. - * The path can include a wildcard. - * These URIs may have the forms - * `gs:///`. - * `gs:////*.`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 2; - * @return \Google\Cloud\Dialogflow\V2\GcsSources|null - */ - public function getGcsSource() - { - return $this->readOneof(2); - } - - public function hasGcsSource() - { - return $this->hasOneof(2); - } - - /** - * The Google Cloud Storage location for the documents. - * The path can include a wildcard. - * These URIs may have the forms - * `gs:///`. - * `gs:////*.`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 2; - * @param \Google\Cloud\Dialogflow\V2\GcsSources $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsSources::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. Document template used for importing all the documents. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ImportDocumentTemplate document_template = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\ImportDocumentTemplate|null - */ - public function getDocumentTemplate() - { - return $this->document_template; - } - - public function hasDocumentTemplate() - { - return isset($this->document_template); - } - - public function clearDocumentTemplate() - { - unset($this->document_template); - } - - /** - * Required. Document template used for importing all the documents. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ImportDocumentTemplate document_template = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\ImportDocumentTemplate $var - * @return $this - */ - public function setDocumentTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ImportDocumentTemplate::class); - $this->document_template = $var; - - return $this; - } - - /** - * Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * - * Generated from protobuf field bool import_gcs_custom_metadata = 4; - * @return bool - */ - public function getImportGcsCustomMetadata() - { - return $this->import_gcs_custom_metadata; - } - - /** - * Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * - * Generated from protobuf field bool import_gcs_custom_metadata = 4; - * @param bool $var - * @return $this - */ - public function setImportGcsCustomMetadata($var) - { - GPBUtil::checkBool($var); - $this->import_gcs_custom_metadata = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsResponse.php deleted file mode 100644 index 98f7b7ae4fa6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ImportDocumentsResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dialogflow.v2.ImportDocumentsResponse - */ -class ImportDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Includes details about skipped documents or any other warnings. - * - * Generated from protobuf field repeated .google.rpc.Status warnings = 1; - */ - private $warnings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $warnings - * Includes details about skipped documents or any other warnings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Includes details about skipped documents or any other warnings. - * - * Generated from protobuf field repeated .google.rpc.Status warnings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * Includes details about skipped documents or any other warnings. - * - * Generated from protobuf field repeated .google.rpc.Status warnings = 1; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->warnings = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputAudioConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputAudioConfig.php deleted file mode 100644 index 9e36b434809d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputAudioConfig.php +++ /dev/null @@ -1,570 +0,0 @@ -google.cloud.dialogflow.v2.InputAudioConfig - */ -class InputAudioConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Audio encoding of the audio content to process. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1; - */ - protected $audio_encoding = 0; - /** - * Required. Sample rate (in Hertz) of the audio content sent in the query. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics) for - * more details. - * - * Generated from protobuf field int32 sample_rate_hertz = 2; - */ - protected $sample_rate_hertz = 0; - /** - * Required. The language of the supplied audio. Dialogflow does not do - * translations. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * - * Generated from protobuf field string language_code = 3; - */ - protected $language_code = ''; - /** - * If `true`, Dialogflow returns - * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] - * with information about the recognized speech words, e.g. start and end time - * offsets. If false or unspecified, Speech doesn't return any word-level - * information. - * - * Generated from protobuf field bool enable_word_info = 13; - */ - protected $enable_word_info = false; - /** - * A list of strings containing words and phrases that the speech - * recognizer should recognize with higher likelihood. - * See [the Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - * for more details. - * This field is deprecated. Please use [speech_contexts]() instead. If you - * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will - * treat the [phrase_hints]() as a single additional [SpeechContext](). - * - * Generated from protobuf field repeated string phrase_hints = 4 [deprecated = true]; - * @deprecated - */ - private $phrase_hints; - /** - * Context information to assist speech recognition. - * See [the Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - * for more details. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11; - */ - private $speech_contexts; - /** - * Which Speech model to select for the given request. Select the - * model best suited to your domain to get best results. If a model is not - * explicitly specified, then we auto-select a model based on the parameters - * in the InputAudioConfig. - * If enhanced speech model is enabled for the agent and an enhanced - * version of the specified model for the language does not exist, then the - * speech is recognized using the standard version of the specified model. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - * for more details. - * - * Generated from protobuf field string model = 7; - */ - protected $model = ''; - /** - * Which variant of the [Speech - * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10; - */ - protected $model_variant = 0; - /** - * If `false` (default), recognition does not cease until the - * client closes the stream. - * If `true`, the recognizer will detect a single spoken utterance in input - * audio. Recognition ceases when it detects the audio's voice has - * stopped or paused. In this case, once a detected intent is received, the - * client should close the stream and start a new request with a new stream as - * needed. - * Note: This setting is relevant only for streaming methods. - * Note: When specified, InputAudioConfig.single_utterance takes precedence - * over StreamingDetectIntentRequest.single_utterance. - * - * Generated from protobuf field bool single_utterance = 8; - */ - protected $single_utterance = false; - /** - * Only used in - * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] - * and - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. - * If `false` and recognition doesn't return any result, trigger - * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. - * - * Generated from protobuf field bool disable_no_speech_recognized_event = 14; - */ - protected $disable_no_speech_recognized_event = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $audio_encoding - * Required. Audio encoding of the audio content to process. - * @type int $sample_rate_hertz - * Required. Sample rate (in Hertz) of the audio content sent in the query. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics) for - * more details. - * @type string $language_code - * Required. The language of the supplied audio. Dialogflow does not do - * translations. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * @type bool $enable_word_info - * If `true`, Dialogflow returns - * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] - * with information about the recognized speech words, e.g. start and end time - * offsets. If false or unspecified, Speech doesn't return any word-level - * information. - * @type array|\Google\Protobuf\Internal\RepeatedField $phrase_hints - * A list of strings containing words and phrases that the speech - * recognizer should recognize with higher likelihood. - * See [the Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - * for more details. - * This field is deprecated. Please use [speech_contexts]() instead. If you - * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will - * treat the [phrase_hints]() as a single additional [SpeechContext](). - * @type array<\Google\Cloud\Dialogflow\V2\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $speech_contexts - * Context information to assist speech recognition. - * See [the Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - * for more details. - * @type string $model - * Which Speech model to select for the given request. Select the - * model best suited to your domain to get best results. If a model is not - * explicitly specified, then we auto-select a model based on the parameters - * in the InputAudioConfig. - * If enhanced speech model is enabled for the agent and an enhanced - * version of the specified model for the language does not exist, then the - * speech is recognized using the standard version of the specified model. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - * for more details. - * @type int $model_variant - * Which variant of the [Speech - * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. - * @type bool $single_utterance - * If `false` (default), recognition does not cease until the - * client closes the stream. - * If `true`, the recognizer will detect a single spoken utterance in input - * audio. Recognition ceases when it detects the audio's voice has - * stopped or paused. In this case, once a detected intent is received, the - * client should close the stream and start a new request with a new stream as - * needed. - * Note: This setting is relevant only for streaming methods. - * Note: When specified, InputAudioConfig.single_utterance takes precedence - * over StreamingDetectIntentRequest.single_utterance. - * @type bool $disable_no_speech_recognized_event - * Only used in - * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] - * and - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. - * If `false` and recognition doesn't return any result, trigger - * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. Audio encoding of the audio content to process. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1; - * @return int - */ - public function getAudioEncoding() - { - return $this->audio_encoding; - } - - /** - * Required. Audio encoding of the audio content to process. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1; - * @param int $var - * @return $this - */ - public function setAudioEncoding($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\AudioEncoding::class); - $this->audio_encoding = $var; - - return $this; - } - - /** - * Required. Sample rate (in Hertz) of the audio content sent in the query. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics) for - * more details. - * - * Generated from protobuf field int32 sample_rate_hertz = 2; - * @return int - */ - public function getSampleRateHertz() - { - return $this->sample_rate_hertz; - } - - /** - * Required. Sample rate (in Hertz) of the audio content sent in the query. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics) for - * more details. - * - * Generated from protobuf field int32 sample_rate_hertz = 2; - * @param int $var - * @return $this - */ - public function setSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->sample_rate_hertz = $var; - - return $this; - } - - /** - * Required. The language of the supplied audio. Dialogflow does not do - * translations. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * - * Generated from protobuf field string language_code = 3; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Required. The language of the supplied audio. Dialogflow does not do - * translations. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * - * Generated from protobuf field string language_code = 3; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * If `true`, Dialogflow returns - * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] - * with information about the recognized speech words, e.g. start and end time - * offsets. If false or unspecified, Speech doesn't return any word-level - * information. - * - * Generated from protobuf field bool enable_word_info = 13; - * @return bool - */ - public function getEnableWordInfo() - { - return $this->enable_word_info; - } - - /** - * If `true`, Dialogflow returns - * [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] - * with information about the recognized speech words, e.g. start and end time - * offsets. If false or unspecified, Speech doesn't return any word-level - * information. - * - * Generated from protobuf field bool enable_word_info = 13; - * @param bool $var - * @return $this - */ - public function setEnableWordInfo($var) - { - GPBUtil::checkBool($var); - $this->enable_word_info = $var; - - return $this; - } - - /** - * A list of strings containing words and phrases that the speech - * recognizer should recognize with higher likelihood. - * See [the Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - * for more details. - * This field is deprecated. Please use [speech_contexts]() instead. If you - * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will - * treat the [phrase_hints]() as a single additional [SpeechContext](). - * - * Generated from protobuf field repeated string phrase_hints = 4 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getPhraseHints() - { - @trigger_error('phrase_hints is deprecated.', E_USER_DEPRECATED); - return $this->phrase_hints; - } - - /** - * A list of strings containing words and phrases that the speech - * recognizer should recognize with higher likelihood. - * See [the Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - * for more details. - * This field is deprecated. Please use [speech_contexts]() instead. If you - * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will - * treat the [phrase_hints]() as a single additional [SpeechContext](). - * - * Generated from protobuf field repeated string phrase_hints = 4 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setPhraseHints($var) - { - @trigger_error('phrase_hints is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->phrase_hints = $arr; - - return $this; - } - - /** - * Context information to assist speech recognition. - * See [the Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - * for more details. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpeechContexts() - { - return $this->speech_contexts; - } - - /** - * Context information to assist speech recognition. - * See [the Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - * for more details. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11; - * @param array<\Google\Cloud\Dialogflow\V2\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpeechContexts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SpeechContext::class); - $this->speech_contexts = $arr; - - return $this; - } - - /** - * Which Speech model to select for the given request. Select the - * model best suited to your domain to get best results. If a model is not - * explicitly specified, then we auto-select a model based on the parameters - * in the InputAudioConfig. - * If enhanced speech model is enabled for the agent and an enhanced - * version of the specified model for the language does not exist, then the - * speech is recognized using the standard version of the specified model. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - * for more details. - * - * Generated from protobuf field string model = 7; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Which Speech model to select for the given request. Select the - * model best suited to your domain to get best results. If a model is not - * explicitly specified, then we auto-select a model based on the parameters - * in the InputAudioConfig. - * If enhanced speech model is enabled for the agent and an enhanced - * version of the specified model for the language does not exist, then the - * speech is recognized using the standard version of the specified model. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - * for more details. - * - * Generated from protobuf field string model = 7; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - - /** - * Which variant of the [Speech - * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10; - * @return int - */ - public function getModelVariant() - { - return $this->model_variant; - } - - /** - * Which variant of the [Speech - * model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10; - * @param int $var - * @return $this - */ - public function setModelVariant($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SpeechModelVariant::class); - $this->model_variant = $var; - - return $this; - } - - /** - * If `false` (default), recognition does not cease until the - * client closes the stream. - * If `true`, the recognizer will detect a single spoken utterance in input - * audio. Recognition ceases when it detects the audio's voice has - * stopped or paused. In this case, once a detected intent is received, the - * client should close the stream and start a new request with a new stream as - * needed. - * Note: This setting is relevant only for streaming methods. - * Note: When specified, InputAudioConfig.single_utterance takes precedence - * over StreamingDetectIntentRequest.single_utterance. - * - * Generated from protobuf field bool single_utterance = 8; - * @return bool - */ - public function getSingleUtterance() - { - return $this->single_utterance; - } - - /** - * If `false` (default), recognition does not cease until the - * client closes the stream. - * If `true`, the recognizer will detect a single spoken utterance in input - * audio. Recognition ceases when it detects the audio's voice has - * stopped or paused. In this case, once a detected intent is received, the - * client should close the stream and start a new request with a new stream as - * needed. - * Note: This setting is relevant only for streaming methods. - * Note: When specified, InputAudioConfig.single_utterance takes precedence - * over StreamingDetectIntentRequest.single_utterance. - * - * Generated from protobuf field bool single_utterance = 8; - * @param bool $var - * @return $this - */ - public function setSingleUtterance($var) - { - GPBUtil::checkBool($var); - $this->single_utterance = $var; - - return $this; - } - - /** - * Only used in - * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] - * and - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. - * If `false` and recognition doesn't return any result, trigger - * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. - * - * Generated from protobuf field bool disable_no_speech_recognized_event = 14; - * @return bool - */ - public function getDisableNoSpeechRecognizedEvent() - { - return $this->disable_no_speech_recognized_event; - } - - /** - * Only used in - * [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] - * and - * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. - * If `false` and recognition doesn't return any result, trigger - * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. - * - * Generated from protobuf field bool disable_no_speech_recognized_event = 14; - * @param bool $var - * @return $this - */ - public function setDisableNoSpeechRecognizedEvent($var) - { - GPBUtil::checkBool($var); - $this->disable_no_speech_recognized_event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputConfig.php deleted file mode 100644 index eb1a43005e84..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputConfig.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.dialogflow.v2.InputConfig - */ -class InputConfig extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\GcsSources $gcs_source - * The Cloud Storage URI has the form gs:////agent*.json. Wildcards are allowed and will be expanded into all - * matched JSON files, which will be read as one conversation per file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage URI has the form gs:////agent*.json. Wildcards are allowed and will be expanded into all - * matched JSON files, which will be read as one conversation per file. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 1; - * @return \Google\Cloud\Dialogflow\V2\GcsSources|null - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * The Cloud Storage URI has the form gs:////agent*.json. Wildcards are allowed and will be expanded into all - * matched JSON files, which will be read as one conversation per file. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 1; - * @param \Google\Cloud\Dialogflow\V2\GcsSources $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsSources::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputDataset.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputDataset.php deleted file mode 100644 index 28917cda63a8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputDataset.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.v2.InputDataset - */ -class InputDataset extends \Google\Protobuf\Internal\Message -{ - /** - * Required. ConversationDataset resource name. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $dataset = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset - * Required. ConversationDataset resource name. Format: - * `projects//locations//conversationDatasets/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. ConversationDataset resource name. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * Required. ConversationDataset resource name. Format: - * `projects//locations//conversationDatasets/` - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputTextConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputTextConfig.php deleted file mode 100644 index 13adbca24087..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/InputTextConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dialogflow.v2.InputTextConfig - */ -class InputTextConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The language of this conversational query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * Required. The language of this conversational query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. The language of this conversational query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Required. The language of this conversational query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent.php deleted file mode 100644 index 2fdd45834dc7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent.php +++ /dev/null @@ -1,904 +0,0 @@ -google.cloud.dialogflow.v2.Intent - */ -class Intent extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique identifier of this intent. - * Required for - * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and - * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] - * methods. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Required. The name of this intent. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. Indicates whether webhooks are enabled for the intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $webhook_state = 0; - /** - * Optional. The priority of this intent. Higher numbers represent higher - * priorities. - * - If the supplied value is unspecified or 0, the service - * translates the value to 500,000, which corresponds to the - * `Normal` priority in the console. - * - If the supplied value is negative, the intent is ignored - * in runtime detect intent requests. - * - * Generated from protobuf field int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $priority = 0; - /** - * Optional. Indicates whether this is a fallback intent. - * - * Generated from protobuf field bool is_fallback = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_fallback = false; - /** - * Optional. Indicates whether Machine Learning is disabled for the intent. - * Note: If `ml_disabled` setting is set to true, then this intent is not - * taken into account during inference in `ML ONLY` match mode. Also, - * auto-markup in the UI is turned off. - * - * Generated from protobuf field bool ml_disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ml_disabled = false; - /** - * Optional. Indicates that a live agent should be brought in to handle the - * interaction with the user. In most cases, when you set this flag to true, - * you would also want to set end_interaction to true as well. Default is - * false. - * - * Generated from protobuf field bool live_agent_handoff = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $live_agent_handoff = false; - /** - * Optional. Indicates that this intent ends an interaction. Some integrations - * (e.g., Actions on Google or Dialogflow phone gateway) use this information - * to close interaction with an end user. Default is false. - * - * Generated from protobuf field bool end_interaction = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_interaction = false; - /** - * Optional. The list of context names required for this intent to be - * triggered. - * Format: `projects//agent/sessions/-/contexts/`. - * - * Generated from protobuf field repeated string input_context_names = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $input_context_names; - /** - * Optional. The collection of event names that trigger the intent. - * If the collection of input contexts is not empty, all of the contexts must - * be present in the active user session for an event to trigger this intent. - * Event names are limited to 150 characters. - * - * Generated from protobuf field repeated string events = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $events; - /** - * Optional. The collection of examples that the agent is - * trained on. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $training_phrases; - /** - * Optional. The name of the action associated with the intent. - * Note: The action name must not contain whitespaces. - * - * Generated from protobuf field string action = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $action = ''; - /** - * Optional. The collection of contexts that are activated when the intent - * is matched. Context messages in this collection should not set the - * parameters field. Setting the `lifespan_count` to 0 will reset the context - * when the intent is matched. - * Format: `projects//agent/sessions/-/contexts/`. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $output_contexts; - /** - * Optional. Indicates whether to delete all contexts in the current - * session when this intent is matched. - * - * Generated from protobuf field bool reset_contexts = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reset_contexts = false; - /** - * Optional. The collection of parameters associated with the intent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $parameters; - /** - * Optional. The collection of rich messages corresponding to the - * `Response` field in the Dialogflow console. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $messages; - /** - * Optional. The list of platforms for which the first responses will be - * copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $default_response_platforms; - /** - * Output only. - * Read-only. The unique identifier of the root intent in the chain of - * followup intents. It identifies the correct followup intents chain for - * this intent. We populate this field only in the output. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string root_followup_intent_name = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $root_followup_intent_name = ''; - /** - * Read-only after creation. The unique identifier of the parent intent in the - * chain of followup intents. You can set this field when creating an intent, - * for example with - * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or - * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], - * in order to make this intent a followup intent. - * It identifies the parent followup intent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string parent_followup_intent_name = 17; - */ - protected $parent_followup_intent_name = ''; - /** - * Output only. Read-only. Information about all followup intents that have - * this intent as a direct or indirect parent. We populate this field only in - * the output. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $followup_intent_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. The unique identifier of this intent. - * Required for - * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and - * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] - * methods. - * Format: `projects//agent/intents/`. - * @type string $display_name - * Required. The name of this intent. - * @type int $webhook_state - * Optional. Indicates whether webhooks are enabled for the intent. - * @type int $priority - * Optional. The priority of this intent. Higher numbers represent higher - * priorities. - * - If the supplied value is unspecified or 0, the service - * translates the value to 500,000, which corresponds to the - * `Normal` priority in the console. - * - If the supplied value is negative, the intent is ignored - * in runtime detect intent requests. - * @type bool $is_fallback - * Optional. Indicates whether this is a fallback intent. - * @type bool $ml_disabled - * Optional. Indicates whether Machine Learning is disabled for the intent. - * Note: If `ml_disabled` setting is set to true, then this intent is not - * taken into account during inference in `ML ONLY` match mode. Also, - * auto-markup in the UI is turned off. - * @type bool $live_agent_handoff - * Optional. Indicates that a live agent should be brought in to handle the - * interaction with the user. In most cases, when you set this flag to true, - * you would also want to set end_interaction to true as well. Default is - * false. - * @type bool $end_interaction - * Optional. Indicates that this intent ends an interaction. Some integrations - * (e.g., Actions on Google or Dialogflow phone gateway) use this information - * to close interaction with an end user. Default is false. - * @type array|\Google\Protobuf\Internal\RepeatedField $input_context_names - * Optional. The list of context names required for this intent to be - * triggered. - * Format: `projects//agent/sessions/-/contexts/`. - * @type array|\Google\Protobuf\Internal\RepeatedField $events - * Optional. The collection of event names that trigger the intent. - * If the collection of input contexts is not empty, all of the contexts must - * be present in the active user session for an event to trigger this intent. - * Event names are limited to 150 characters. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase>|\Google\Protobuf\Internal\RepeatedField $training_phrases - * Optional. The collection of examples that the agent is - * trained on. - * @type string $action - * Optional. The name of the action associated with the intent. - * Note: The action name must not contain whitespaces. - * @type array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $output_contexts - * Optional. The collection of contexts that are activated when the intent - * is matched. Context messages in this collection should not set the - * parameters field. Setting the `lifespan_count` to 0 will reset the context - * when the intent is matched. - * Format: `projects//agent/sessions/-/contexts/`. - * @type bool $reset_contexts - * Optional. Indicates whether to delete all contexts in the current - * session when this intent is matched. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Parameter>|\Google\Protobuf\Internal\RepeatedField $parameters - * Optional. The collection of parameters associated with the intent. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $messages - * Optional. The collection of rich messages corresponding to the - * `Response` field in the Dialogflow console. - * @type array|\Google\Protobuf\Internal\RepeatedField $default_response_platforms - * Optional. The list of platforms for which the first responses will be - * copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). - * @type string $root_followup_intent_name - * Output only. - * Read-only. The unique identifier of the root intent in the chain of - * followup intents. It identifies the correct followup intents chain for - * this intent. We populate this field only in the output. - * Format: `projects//agent/intents/`. - * @type string $parent_followup_intent_name - * Read-only after creation. The unique identifier of the parent intent in the - * chain of followup intents. You can set this field when creating an intent, - * for example with - * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or - * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], - * in order to make this intent a followup intent. - * It identifies the parent followup intent. - * Format: `projects//agent/intents/`. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\FollowupIntentInfo>|\Google\Protobuf\Internal\RepeatedField $followup_intent_info - * Output only. Read-only. Information about all followup intents that have - * this intent as a direct or indirect parent. We populate this field only in - * the output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique identifier of this intent. - * Required for - * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and - * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] - * methods. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. The unique identifier of this intent. - * Required for - * [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and - * [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] - * methods. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The name of this intent. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The name of this intent. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Indicates whether webhooks are enabled for the intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getWebhookState() - { - return $this->webhook_state; - } - - /** - * Optional. Indicates whether webhooks are enabled for the intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setWebhookState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\WebhookState::class); - $this->webhook_state = $var; - - return $this; - } - - /** - * Optional. The priority of this intent. Higher numbers represent higher - * priorities. - * - If the supplied value is unspecified or 0, the service - * translates the value to 500,000, which corresponds to the - * `Normal` priority in the console. - * - If the supplied value is negative, the intent is ignored - * in runtime detect intent requests. - * - * Generated from protobuf field int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * Optional. The priority of this intent. Higher numbers represent higher - * priorities. - * - If the supplied value is unspecified or 0, the service - * translates the value to 500,000, which corresponds to the - * `Normal` priority in the console. - * - If the supplied value is negative, the intent is ignored - * in runtime detect intent requests. - * - * Generated from protobuf field int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt32($var); - $this->priority = $var; - - return $this; - } - - /** - * Optional. Indicates whether this is a fallback intent. - * - * Generated from protobuf field bool is_fallback = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsFallback() - { - return $this->is_fallback; - } - - /** - * Optional. Indicates whether this is a fallback intent. - * - * Generated from protobuf field bool is_fallback = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsFallback($var) - { - GPBUtil::checkBool($var); - $this->is_fallback = $var; - - return $this; - } - - /** - * Optional. Indicates whether Machine Learning is disabled for the intent. - * Note: If `ml_disabled` setting is set to true, then this intent is not - * taken into account during inference in `ML ONLY` match mode. Also, - * auto-markup in the UI is turned off. - * - * Generated from protobuf field bool ml_disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getMlDisabled() - { - return $this->ml_disabled; - } - - /** - * Optional. Indicates whether Machine Learning is disabled for the intent. - * Note: If `ml_disabled` setting is set to true, then this intent is not - * taken into account during inference in `ML ONLY` match mode. Also, - * auto-markup in the UI is turned off. - * - * Generated from protobuf field bool ml_disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setMlDisabled($var) - { - GPBUtil::checkBool($var); - $this->ml_disabled = $var; - - return $this; - } - - /** - * Optional. Indicates that a live agent should be brought in to handle the - * interaction with the user. In most cases, when you set this flag to true, - * you would also want to set end_interaction to true as well. Default is - * false. - * - * Generated from protobuf field bool live_agent_handoff = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getLiveAgentHandoff() - { - return $this->live_agent_handoff; - } - - /** - * Optional. Indicates that a live agent should be brought in to handle the - * interaction with the user. In most cases, when you set this flag to true, - * you would also want to set end_interaction to true as well. Default is - * false. - * - * Generated from protobuf field bool live_agent_handoff = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setLiveAgentHandoff($var) - { - GPBUtil::checkBool($var); - $this->live_agent_handoff = $var; - - return $this; - } - - /** - * Optional. Indicates that this intent ends an interaction. Some integrations - * (e.g., Actions on Google or Dialogflow phone gateway) use this information - * to close interaction with an end user. Default is false. - * - * Generated from protobuf field bool end_interaction = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEndInteraction() - { - return $this->end_interaction; - } - - /** - * Optional. Indicates that this intent ends an interaction. Some integrations - * (e.g., Actions on Google or Dialogflow phone gateway) use this information - * to close interaction with an end user. Default is false. - * - * Generated from protobuf field bool end_interaction = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEndInteraction($var) - { - GPBUtil::checkBool($var); - $this->end_interaction = $var; - - return $this; - } - - /** - * Optional. The list of context names required for this intent to be - * triggered. - * Format: `projects//agent/sessions/-/contexts/`. - * - * Generated from protobuf field repeated string input_context_names = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputContextNames() - { - return $this->input_context_names; - } - - /** - * Optional. The list of context names required for this intent to be - * triggered. - * Format: `projects//agent/sessions/-/contexts/`. - * - * Generated from protobuf field repeated string input_context_names = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputContextNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->input_context_names = $arr; - - return $this; - } - - /** - * Optional. The collection of event names that trigger the intent. - * If the collection of input contexts is not empty, all of the contexts must - * be present in the active user session for an event to trigger this intent. - * Event names are limited to 150 characters. - * - * Generated from protobuf field repeated string events = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * Optional. The collection of event names that trigger the intent. - * If the collection of input contexts is not empty, all of the contexts must - * be present in the active user session for an event to trigger this intent. - * Event names are limited to 150 characters. - * - * Generated from protobuf field repeated string events = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->events = $arr; - - return $this; - } - - /** - * Optional. The collection of examples that the agent is - * trained on. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrainingPhrases() - { - return $this->training_phrases; - } - - /** - * Optional. The collection of examples that the agent is - * trained on. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrainingPhrases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase::class); - $this->training_phrases = $arr; - - return $this; - } - - /** - * Optional. The name of the action associated with the intent. - * Note: The action name must not contain whitespaces. - * - * Generated from protobuf field string action = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAction() - { - return $this->action; - } - - /** - * Optional. The name of the action associated with the intent. - * Note: The action name must not contain whitespaces. - * - * Generated from protobuf field string action = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkString($var, True); - $this->action = $var; - - return $this; - } - - /** - * Optional. The collection of contexts that are activated when the intent - * is matched. Context messages in this collection should not set the - * parameters field. Setting the `lifespan_count` to 0 will reset the context - * when the intent is matched. - * Format: `projects//agent/sessions/-/contexts/`. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOutputContexts() - { - return $this->output_contexts; - } - - /** - * Optional. The collection of contexts that are activated when the intent - * is matched. Context messages in this collection should not set the - * parameters field. Setting the `lifespan_count` to 0 will reset the context - * when the intent is matched. - * Format: `projects//agent/sessions/-/contexts/`. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOutputContexts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); - $this->output_contexts = $arr; - - return $this; - } - - /** - * Optional. Indicates whether to delete all contexts in the current - * session when this intent is matched. - * - * Generated from protobuf field bool reset_contexts = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getResetContexts() - { - return $this->reset_contexts; - } - - /** - * Optional. Indicates whether to delete all contexts in the current - * session when this intent is matched. - * - * Generated from protobuf field bool reset_contexts = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setResetContexts($var) - { - GPBUtil::checkBool($var); - $this->reset_contexts = $var; - - return $this; - } - - /** - * Optional. The collection of parameters associated with the intent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Optional. The collection of parameters associated with the intent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Parameter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Parameter::class); - $this->parameters = $arr; - - return $this; - } - - /** - * Optional. The collection of rich messages corresponding to the - * `Response` field in the Dialogflow console. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessages() - { - return $this->messages; - } - - /** - * Optional. The collection of rich messages corresponding to the - * `Response` field in the Dialogflow console. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message::class); - $this->messages = $arr; - - return $this; - } - - /** - * Optional. The list of platforms for which the first responses will be - * copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDefaultResponsePlatforms() - { - return $this->default_response_platforms; - } - - /** - * Optional. The list of platforms for which the first responses will be - * copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDefaultResponsePlatforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\Intent\Message\Platform::class); - $this->default_response_platforms = $arr; - - return $this; - } - - /** - * Output only. - * Read-only. The unique identifier of the root intent in the chain of - * followup intents. It identifies the correct followup intents chain for - * this intent. We populate this field only in the output. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string root_followup_intent_name = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRootFollowupIntentName() - { - return $this->root_followup_intent_name; - } - - /** - * Output only. - * Read-only. The unique identifier of the root intent in the chain of - * followup intents. It identifies the correct followup intents chain for - * this intent. We populate this field only in the output. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string root_followup_intent_name = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRootFollowupIntentName($var) - { - GPBUtil::checkString($var, True); - $this->root_followup_intent_name = $var; - - return $this; - } - - /** - * Read-only after creation. The unique identifier of the parent intent in the - * chain of followup intents. You can set this field when creating an intent, - * for example with - * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or - * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], - * in order to make this intent a followup intent. - * It identifies the parent followup intent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string parent_followup_intent_name = 17; - * @return string - */ - public function getParentFollowupIntentName() - { - return $this->parent_followup_intent_name; - } - - /** - * Read-only after creation. The unique identifier of the parent intent in the - * chain of followup intents. You can set this field when creating an intent, - * for example with - * [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or - * [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], - * in order to make this intent a followup intent. - * It identifies the parent followup intent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string parent_followup_intent_name = 17; - * @param string $var - * @return $this - */ - public function setParentFollowupIntentName($var) - { - GPBUtil::checkString($var, True); - $this->parent_followup_intent_name = $var; - - return $this; - } - - /** - * Output only. Read-only. Information about all followup intents that have - * this intent as a direct or indirect parent. We populate this field only in - * the output. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFollowupIntentInfo() - { - return $this->followup_intent_info; - } - - /** - * Output only. Read-only. Information about all followup intents that have - * this intent as a direct or indirect parent. We populate this field only in - * the output. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\FollowupIntentInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFollowupIntentInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\FollowupIntentInfo::class); - $this->followup_intent_info = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/FollowupIntentInfo.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/FollowupIntentInfo.php deleted file mode 100644 index b7cf0d145f19..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/FollowupIntentInfo.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dialogflow.v2.Intent.FollowupIntentInfo - */ -class FollowupIntentInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the followup intent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string followup_intent_name = 1; - */ - protected $followup_intent_name = ''; - /** - * The unique identifier of the followup intent's parent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string parent_followup_intent_name = 2; - */ - protected $parent_followup_intent_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $followup_intent_name - * The unique identifier of the followup intent. - * Format: `projects//agent/intents/`. - * @type string $parent_followup_intent_name - * The unique identifier of the followup intent's parent. - * Format: `projects//agent/intents/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the followup intent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string followup_intent_name = 1; - * @return string - */ - public function getFollowupIntentName() - { - return $this->followup_intent_name; - } - - /** - * The unique identifier of the followup intent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string followup_intent_name = 1; - * @param string $var - * @return $this - */ - public function setFollowupIntentName($var) - { - GPBUtil::checkString($var, True); - $this->followup_intent_name = $var; - - return $this; - } - - /** - * The unique identifier of the followup intent's parent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string parent_followup_intent_name = 2; - * @return string - */ - public function getParentFollowupIntentName() - { - return $this->parent_followup_intent_name; - } - - /** - * The unique identifier of the followup intent's parent. - * Format: `projects//agent/intents/`. - * - * Generated from protobuf field string parent_followup_intent_name = 2; - * @param string $var - * @return $this - */ - public function setParentFollowupIntentName($var) - { - GPBUtil::checkString($var, True); - $this->parent_followup_intent_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FollowupIntentInfo::class, \Google\Cloud\Dialogflow\V2\Intent_FollowupIntentInfo::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message.php deleted file mode 100644 index 3c509bed6783..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message.php +++ /dev/null @@ -1,545 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message - */ -class Message extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The platform that this message is intended for. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $platform = 0; - protected $message; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Text $text - * The text response. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image - * The image response. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\QuickReplies $quick_replies - * The quick replies response. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Card $card - * The card response. - * @type \Google\Protobuf\Struct $payload - * A custom platform-specific response. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponses $simple_responses - * The voice and text-only responses for Actions on Google. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard $basic_card - * The basic card response for Actions on Google. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestions $suggestions - * The suggestion chips for Actions on Google. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\LinkOutSuggestion $link_out_suggestion - * The link out suggestion chip for Actions on Google. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect $list_select - * The list card response for Actions on Google. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect $carousel_select - * The carousel card response for Actions on Google. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard $browse_carousel_card - * Browse carousel card for Actions on Google. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\TableCard $table_card - * Table card for Actions on Google. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent $media_content - * The media content card for Actions on Google. - * @type int $platform - * Optional. The platform that this message is intended for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * The text response. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Text text = 1; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Text|null - */ - public function getText() - { - return $this->readOneof(1); - } - - public function hasText() - { - return $this->hasOneof(1); - } - - /** - * The text response. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Text text = 1; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Text $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Text::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The image response. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 2; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null - */ - public function getImage() - { - return $this->readOneof(2); - } - - public function hasImage() - { - return $this->hasOneof(2); - } - - /** - * The image response. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 2; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The quick replies response. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\QuickReplies|null - */ - public function getQuickReplies() - { - return $this->readOneof(3); - } - - public function hasQuickReplies() - { - return $this->hasOneof(3); - } - - /** - * The quick replies response. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\QuickReplies $var - * @return $this - */ - public function setQuickReplies($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\QuickReplies::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The card response. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Card card = 4; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Card|null - */ - public function getCard() - { - return $this->readOneof(4); - } - - public function hasCard() - { - return $this->hasOneof(4); - } - - /** - * The card response. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Card card = 4; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Card $var - * @return $this - */ - public function setCard($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Card::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A custom platform-specific response. - * - * Generated from protobuf field .google.protobuf.Struct payload = 5; - * @return \Google\Protobuf\Struct|null - */ - public function getPayload() - { - return $this->readOneof(5); - } - - public function hasPayload() - { - return $this->hasOneof(5); - } - - /** - * A custom platform-specific response. - * - * Generated from protobuf field .google.protobuf.Struct payload = 5; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The voice and text-only responses for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponses|null - */ - public function getSimpleResponses() - { - return $this->readOneof(7); - } - - public function hasSimpleResponses() - { - return $this->hasOneof(7); - } - - /** - * The voice and text-only responses for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponses $var - * @return $this - */ - public function setSimpleResponses($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponses::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The basic card response for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard|null - */ - public function getBasicCard() - { - return $this->readOneof(8); - } - - public function hasBasicCard() - { - return $this->hasOneof(8); - } - - /** - * The basic card response for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard $var - * @return $this - */ - public function setBasicCard($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * The suggestion chips for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestions|null - */ - public function getSuggestions() - { - return $this->readOneof(9); - } - - public function hasSuggestions() - { - return $this->hasOneof(9); - } - - /** - * The suggestion chips for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestions $var - * @return $this - */ - public function setSuggestions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestions::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * The link out suggestion chip for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\LinkOutSuggestion|null - */ - public function getLinkOutSuggestion() - { - return $this->readOneof(10); - } - - public function hasLinkOutSuggestion() - { - return $this->hasOneof(10); - } - - /** - * The link out suggestion chip for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\LinkOutSuggestion $var - * @return $this - */ - public function setLinkOutSuggestion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\LinkOutSuggestion::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * The list card response for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect|null - */ - public function getListSelect() - { - return $this->readOneof(11); - } - - public function hasListSelect() - { - return $this->hasOneof(11); - } - - /** - * The list card response for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect $var - * @return $this - */ - public function setListSelect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * The carousel card response for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect|null - */ - public function getCarouselSelect() - { - return $this->readOneof(12); - } - - public function hasCarouselSelect() - { - return $this->hasOneof(12); - } - - /** - * The carousel card response for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect $var - * @return $this - */ - public function setCarouselSelect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Browse carousel card for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard|null - */ - public function getBrowseCarouselCard() - { - return $this->readOneof(22); - } - - public function hasBrowseCarouselCard() - { - return $this->hasOneof(22); - } - - /** - * Browse carousel card for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard $var - * @return $this - */ - public function setBrowseCarouselCard($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * Table card for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\TableCard|null - */ - public function getTableCard() - { - return $this->readOneof(23); - } - - public function hasTableCard() - { - return $this->hasOneof(23); - } - - /** - * Table card for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\TableCard $var - * @return $this - */ - public function setTableCard($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\TableCard::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * The media content card for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent|null - */ - public function getMediaContent() - { - return $this->readOneof(24); - } - - public function hasMediaContent() - { - return $this->hasOneof(24); - } - - /** - * The media content card for Actions on Google. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent $var - * @return $this - */ - public function setMediaContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent::class); - $this->writeOneof(24, $var); - - return $this; - } - - /** - * Optional. The platform that this message is intended for. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPlatform() - { - return $this->platform; - } - - /** - * Optional. The platform that this message is intended for. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPlatform($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Platform::class); - $this->platform = $var; - - return $this; - } - - /** - * @return string - */ - public function getMessage() - { - return $this->whichOneof("message"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Message::class, \Google\Cloud\Dialogflow\V2\Intent_Message::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard.php deleted file mode 100644 index 8b505949bd21..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.BasicCard - */ -class BasicCard extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The title of the card. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $title = ''; - /** - * Optional. The subtitle of the card. - * - * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subtitle = ''; - /** - * Required, unless image is present. The body text of the card. - * - * Generated from protobuf field string formatted_text = 3; - */ - protected $formatted_text = ''; - /** - * Optional. The image for the card. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image = null; - /** - * Optional. The collection of card buttons. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $buttons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * Optional. The title of the card. - * @type string $subtitle - * Optional. The subtitle of the card. - * @type string $formatted_text - * Required, unless image is present. The body text of the card. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image - * Optional. The image for the card. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>|\Google\Protobuf\Internal\RepeatedField $buttons - * Optional. The collection of card buttons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The title of the card. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Optional. The title of the card. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Optional. The subtitle of the card. - * - * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubtitle() - { - return $this->subtitle; - } - - /** - * Optional. The subtitle of the card. - * - * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubtitle($var) - { - GPBUtil::checkString($var, True); - $this->subtitle = $var; - - return $this; - } - - /** - * Required, unless image is present. The body text of the card. - * - * Generated from protobuf field string formatted_text = 3; - * @return string - */ - public function getFormattedText() - { - return $this->formatted_text; - } - - /** - * Required, unless image is present. The body text of the card. - * - * Generated from protobuf field string formatted_text = 3; - * @param string $var - * @return $this - */ - public function setFormattedText($var) - { - GPBUtil::checkString($var, True); - $this->formatted_text = $var; - - return $this; - } - - /** - * Optional. The image for the card. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * Optional. The image for the card. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); - $this->image = $var; - - return $this; - } - - /** - * Optional. The collection of card buttons. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getButtons() - { - return $this->buttons; - } - - /** - * Optional. The collection of card buttons. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setButtons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button::class); - $this->buttons = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BasicCard::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button.php deleted file mode 100644 index 373c09363fe4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button - */ -class Button extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The title of the button. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * Required. Action to take when a user taps on the button. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $open_uri_action = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * Required. The title of the button. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button\OpenUriAction $open_uri_action - * Required. Action to take when a user taps on the button. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The title of the button. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. The title of the button. - * - * 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; - } - - /** - * Required. Action to take when a user taps on the button. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button\OpenUriAction|null - */ - public function getOpenUriAction() - { - return $this->open_uri_action; - } - - public function hasOpenUriAction() - { - return isset($this->open_uri_action); - } - - public function clearOpenUriAction() - { - unset($this->open_uri_action); - } - - /** - * Required. Action to take when a user taps on the button. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button\OpenUriAction $var - * @return $this - */ - public function setOpenUriAction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button\OpenUriAction::class); - $this->open_uri_action = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Button::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard_Button::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button/OpenUriAction.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button/OpenUriAction.php deleted file mode 100644 index e993a7466cb9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BasicCard/Button/OpenUriAction.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction - */ -class OpenUriAction extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The HTTP or HTTPS scheme URI. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. The HTTP or HTTPS scheme URI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The HTTP or HTTPS scheme URI. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The HTTP or HTTPS scheme URI. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OpenUriAction::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard_Button_OpenUriAction::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard.php deleted file mode 100644 index 9d3fbc34d12c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard - */ -class BrowseCarouselCard extends \Google\Protobuf\Internal\Message -{ - /** - * Required. List of items in the Browse Carousel Card. Minimum of two - * items, maximum of ten. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1; - */ - private $items; - /** - * Optional. Settings for displaying the image. Applies to every image in - * [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_display_options = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem>|\Google\Protobuf\Internal\RepeatedField $items - * Required. List of items in the Browse Carousel Card. Minimum of two - * items, maximum of ten. - * @type int $image_display_options - * Optional. Settings for displaying the image. Applies to every image in - * [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. List of items in the Browse Carousel Card. Minimum of two - * items, maximum of ten. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * Required. List of items in the Browse Carousel Card. Minimum of two - * items, maximum of ten. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem::class); - $this->items = $arr; - - return $this; - } - - /** - * Optional. Settings for displaying the image. Applies to every image in - * [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getImageDisplayOptions() - { - return $this->image_display_options; - } - - /** - * Optional. Settings for displaying the image. Applies to every image in - * [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setImageDisplayOptions($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\ImageDisplayOptions::class); - $this->image_display_options = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BrowseCarouselCard::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem.php deleted file mode 100644 index 7fba0b85fae1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - */ -class BrowseCarouselCardItem extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Action to present to the user. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1; - */ - protected $open_uri_action = null; - /** - * Required. Title of the carousel item. Maximum of two lines of text. - * - * Generated from protobuf field string title = 2; - */ - protected $title = ''; - /** - * Optional. Description of the carousel item. Maximum of four lines of - * text. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Hero image for the carousel item. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image = null; - /** - * Optional. Text that appears at the bottom of the Browse Carousel - * Card. Maximum of one line of text. - * - * Generated from protobuf field string footer = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $footer = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction $open_uri_action - * Required. Action to present to the user. - * @type string $title - * Required. Title of the carousel item. Maximum of two lines of text. - * @type string $description - * Optional. Description of the carousel item. Maximum of four lines of - * text. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image - * Optional. Hero image for the carousel item. - * @type string $footer - * Optional. Text that appears at the bottom of the Browse Carousel - * Card. Maximum of one line of text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Action to present to the user. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction|null - */ - public function getOpenUriAction() - { - return $this->open_uri_action; - } - - public function hasOpenUriAction() - { - return isset($this->open_uri_action); - } - - public function clearOpenUriAction() - { - unset($this->open_uri_action); - } - - /** - * Required. Action to present to the user. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction $var - * @return $this - */ - public function setOpenUriAction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction::class); - $this->open_uri_action = $var; - - return $this; - } - - /** - * Required. Title of the carousel item. Maximum of two lines of text. - * - * Generated from protobuf field string title = 2; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. Title of the carousel item. Maximum of two lines of text. - * - * Generated from protobuf field string title = 2; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Optional. Description of the carousel item. Maximum of four lines of - * text. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the carousel item. Maximum of four lines of - * text. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Hero image for the carousel item. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * Optional. Hero image for the carousel item. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); - $this->image = $var; - - return $this; - } - - /** - * Optional. Text that appears at the bottom of the Browse Carousel - * Card. Maximum of one line of text. - * - * Generated from protobuf field string footer = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFooter() - { - return $this->footer; - } - - /** - * Optional. Text that appears at the bottom of the Browse Carousel - * Card. Maximum of one line of text. - * - * Generated from protobuf field string footer = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFooter($var) - { - GPBUtil::checkString($var, True); - $this->footer = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BrowseCarouselCardItem::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction.php deleted file mode 100644 index 71febe611d3b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - */ -class OpenUrlAction extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URL - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * Optional. Specifies the type of viewer that is used when opening - * the URL. Defaults to opening via web browser. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $url_type_hint = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Required. URL - * @type int $url_type_hint - * Optional. Specifies the type of viewer that is used when opening - * the URL. Defaults to opening via web browser. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. URL - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Required. URL - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * Optional. Specifies the type of viewer that is used when opening - * the URL. Defaults to opening via web browser. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getUrlTypeHint() - { - return $this->url_type_hint; - } - - /** - * Optional. Specifies the type of viewer that is used when opening - * the URL. Defaults to opening via web browser. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setUrlTypeHint($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\BrowseCarouselCard\BrowseCarouselCardItem\OpenUrlAction\UrlTypeHint::class); - $this->url_type_hint = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OpenUrlAction::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction/UrlTypeHint.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction/UrlTypeHint.php deleted file mode 100644 index cd19ba04e43f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction/UrlTypeHint.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint - */ -class UrlTypeHint -{ - /** - * Unspecified - * - * Generated from protobuf enum URL_TYPE_HINT_UNSPECIFIED = 0; - */ - const URL_TYPE_HINT_UNSPECIFIED = 0; - /** - * Url would be an amp action - * - * Generated from protobuf enum AMP_ACTION = 1; - */ - const AMP_ACTION = 1; - /** - * URL that points directly to AMP content, or to a canonical URL - * which refers to AMP content via . - * - * Generated from protobuf enum AMP_CONTENT = 2; - */ - const AMP_CONTENT = 2; - - private static $valueToName = [ - self::URL_TYPE_HINT_UNSPECIFIED => 'URL_TYPE_HINT_UNSPECIFIED', - self::AMP_ACTION => 'AMP_ACTION', - self::AMP_CONTENT => 'AMP_CONTENT', - ]; - - 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(UrlTypeHint::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction_UrlTypeHint::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/ImageDisplayOptions.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/ImageDisplayOptions.php deleted file mode 100644 index 3edd8f5a6dae..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/BrowseCarouselCard/ImageDisplayOptions.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions - */ -class ImageDisplayOptions -{ - /** - * Fill the gaps between the image and the image container with gray - * bars. - * - * Generated from protobuf enum IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; - */ - const IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; - /** - * Fill the gaps between the image and the image container with gray - * bars. - * - * Generated from protobuf enum GRAY = 1; - */ - const GRAY = 1; - /** - * Fill the gaps between the image and the image container with white - * bars. - * - * Generated from protobuf enum WHITE = 2; - */ - const WHITE = 2; - /** - * Image is scaled such that the image width and height match or exceed - * the container dimensions. This may crop the top and bottom of the - * image if the scaled image height is greater than the container - * height, or crop the left and right of the image if the scaled image - * width is greater than the container width. This is similar to "Zoom - * Mode" on a widescreen TV when playing a 4:3 video. - * - * Generated from protobuf enum CROPPED = 3; - */ - const CROPPED = 3; - /** - * Pad the gaps between image and image frame with a blurred copy of the - * same image. - * - * Generated from protobuf enum BLURRED_BACKGROUND = 4; - */ - const BLURRED_BACKGROUND = 4; - - private static $valueToName = [ - self::IMAGE_DISPLAY_OPTIONS_UNSPECIFIED => 'IMAGE_DISPLAY_OPTIONS_UNSPECIFIED', - self::GRAY => 'GRAY', - self::WHITE => 'WHITE', - self::CROPPED => 'CROPPED', - self::BLURRED_BACKGROUND => 'BLURRED_BACKGROUND', - ]; - - 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(ImageDisplayOptions::class, \Google\Cloud\Dialogflow\V2\Intent_Message_BrowseCarouselCard_ImageDisplayOptions::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card.php deleted file mode 100644 index 398ec1eb5c22..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.Card - */ -class Card extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The title of the card. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $title = ''; - /** - * Optional. The subtitle of the card. - * - * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subtitle = ''; - /** - * Optional. The public URI to an image file for the card. - * - * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_uri = ''; - /** - * Optional. The collection of card buttons. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $buttons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * Optional. The title of the card. - * @type string $subtitle - * Optional. The subtitle of the card. - * @type string $image_uri - * Optional. The public URI to an image file for the card. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\Card\Button>|\Google\Protobuf\Internal\RepeatedField $buttons - * Optional. The collection of card buttons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The title of the card. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Optional. The title of the card. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Optional. The subtitle of the card. - * - * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubtitle() - { - return $this->subtitle; - } - - /** - * Optional. The subtitle of the card. - * - * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubtitle($var) - { - GPBUtil::checkString($var, True); - $this->subtitle = $var; - - return $this; - } - - /** - * Optional. The public URI to an image file for the card. - * - * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * Optional. The public URI to an image file for the card. - * - * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * Optional. The collection of card buttons. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getButtons() - { - return $this->buttons; - } - - /** - * Optional. The collection of card buttons. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\Card\Button>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setButtons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\Card\Button::class); - $this->buttons = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Card::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Card::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card/Button.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card/Button.php deleted file mode 100644 index 615e2785bb4d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Card/Button.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.Card.Button - */ -class Button extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The text to show on the button. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $text = ''; - /** - * Optional. The text to send back to the Dialogflow API or a URI to - * open. - * - * Generated from protobuf field string postback = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $postback = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Optional. The text to show on the button. - * @type string $postback - * Optional. The text to send back to the Dialogflow API or a URI to - * open. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The text to show on the button. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Optional. The text to show on the button. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Optional. The text to send back to the Dialogflow API or a URI to - * open. - * - * Generated from protobuf field string postback = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPostback() - { - return $this->postback; - } - - /** - * Optional. The text to send back to the Dialogflow API or a URI to - * open. - * - * Generated from protobuf field string postback = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPostback($var) - { - GPBUtil::checkString($var, True); - $this->postback = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Button::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Card_Button::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect.php deleted file mode 100644 index 3f46c5e840ab..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.CarouselSelect - */ -class CarouselSelect extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Carousel items. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect\Item>|\Google\Protobuf\Internal\RepeatedField $items - * Required. Carousel items. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Carousel items. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * Required. Carousel items. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect\Item>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect\Item::class); - $this->items = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CarouselSelect::class, \Google\Cloud\Dialogflow\V2\Intent_Message_CarouselSelect::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect/Item.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect/Item.php deleted file mode 100644 index a221fe59073c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/CarouselSelect/Item.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item - */ -class Item extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Additional info about the option item. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $info = null; - /** - * Required. Title of the carousel item. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $title = ''; - /** - * Optional. The body text of the card. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. The image to display. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo $info - * Required. Additional info about the option item. - * @type string $title - * Required. Title of the carousel item. - * @type string $description - * Optional. The body text of the card. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image - * Optional. The image to display. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Additional info about the option item. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo|null - */ - public function getInfo() - { - return $this->info; - } - - public function hasInfo() - { - return isset($this->info); - } - - public function clearInfo() - { - unset($this->info); - } - - /** - * Required. Additional info about the option item. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo $var - * @return $this - */ - public function setInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo::class); - $this->info = $var; - - return $this; - } - - /** - * Required. Title of the carousel item. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. Title of the carousel item. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Optional. The body text of the card. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The body text of the card. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. The image to display. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * Optional. The image to display. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); - $this->image = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Item::class, \Google\Cloud\Dialogflow\V2\Intent_Message_CarouselSelect_Item::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties.php deleted file mode 100644 index dd3d274a8f2f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.ColumnProperties - */ -class ColumnProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Column heading. - * - * Generated from protobuf field string header = 1; - */ - protected $header = ''; - /** - * Optional. Defines text alignment for all cells in this column. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $horizontal_alignment = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $header - * Required. Column heading. - * @type int $horizontal_alignment - * Optional. Defines text alignment for all cells in this column. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Column heading. - * - * Generated from protobuf field string header = 1; - * @return string - */ - public function getHeader() - { - return $this->header; - } - - /** - * Required. Column heading. - * - * Generated from protobuf field string header = 1; - * @param string $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkString($var, True); - $this->header = $var; - - return $this; - } - - /** - * Optional. Defines text alignment for all cells in this column. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getHorizontalAlignment() - { - return $this->horizontal_alignment; - } - - /** - * Optional. Defines text alignment for all cells in this column. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setHorizontalAlignment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\ColumnProperties\HorizontalAlignment::class); - $this->horizontal_alignment = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ColumnProperties::class, \Google\Cloud\Dialogflow\V2\Intent_Message_ColumnProperties::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties/HorizontalAlignment.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties/HorizontalAlignment.php deleted file mode 100644 index 96cec8e9be4d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ColumnProperties/HorizontalAlignment.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment - */ -class HorizontalAlignment -{ - /** - * Text is aligned to the leading edge of the column. - * - * Generated from protobuf enum HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; - */ - const HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; - /** - * Text is aligned to the leading edge of the column. - * - * Generated from protobuf enum LEADING = 1; - */ - const LEADING = 1; - /** - * Text is centered in the column. - * - * Generated from protobuf enum CENTER = 2; - */ - const CENTER = 2; - /** - * Text is aligned to the trailing edge of the column. - * - * Generated from protobuf enum TRAILING = 3; - */ - const TRAILING = 3; - - private static $valueToName = [ - self::HORIZONTAL_ALIGNMENT_UNSPECIFIED => 'HORIZONTAL_ALIGNMENT_UNSPECIFIED', - self::LEADING => 'LEADING', - self::CENTER => 'CENTER', - self::TRAILING => 'TRAILING', - ]; - - 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(HorizontalAlignment::class, \Google\Cloud\Dialogflow\V2\Intent_Message_ColumnProperties_HorizontalAlignment::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Image.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Image.php deleted file mode 100644 index 1673b84f25f5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Image.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.Image - */ -class Image extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The public URI to an image file. - * - * Generated from protobuf field string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_uri = ''; - /** - * Optional. A text description of the image to be used for accessibility, - * e.g., screen readers. - * - * Generated from protobuf field string accessibility_text = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $accessibility_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_uri - * Optional. The public URI to an image file. - * @type string $accessibility_text - * Optional. A text description of the image to be used for accessibility, - * e.g., screen readers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The public URI to an image file. - * - * Generated from protobuf field string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * Optional. The public URI to an image file. - * - * Generated from protobuf field string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * Optional. A text description of the image to be used for accessibility, - * e.g., screen readers. - * - * Generated from protobuf field string accessibility_text = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAccessibilityText() - { - return $this->accessibility_text; - } - - /** - * Optional. A text description of the image to be used for accessibility, - * e.g., screen readers. - * - * Generated from protobuf field string accessibility_text = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAccessibilityText($var) - { - GPBUtil::checkString($var, True); - $this->accessibility_text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Image::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Image::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/LinkOutSuggestion.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/LinkOutSuggestion.php deleted file mode 100644 index 6f6730cea584..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/LinkOutSuggestion.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion - */ -class LinkOutSuggestion extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the app or site this chip is linking to. - * - * Generated from protobuf field string destination_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination_name = ''; - /** - * Required. The URI of the app or site to open when the user taps the - * suggestion chip. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $destination_name - * Required. The name of the app or site this chip is linking to. - * @type string $uri - * Required. The URI of the app or site to open when the user taps the - * suggestion chip. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the app or site this chip is linking to. - * - * Generated from protobuf field string destination_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDestinationName() - { - return $this->destination_name; - } - - /** - * Required. The name of the app or site this chip is linking to. - * - * Generated from protobuf field string destination_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDestinationName($var) - { - GPBUtil::checkString($var, True); - $this->destination_name = $var; - - return $this; - } - - /** - * Required. The URI of the app or site to open when the user taps the - * suggestion chip. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The URI of the app or site to open when the user taps the - * suggestion chip. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LinkOutSuggestion::class, \Google\Cloud\Dialogflow\V2\Intent_Message_LinkOutSuggestion::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect.php deleted file mode 100644 index bbfef362bc0e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.ListSelect - */ -class ListSelect extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The overall title of the list. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $title = ''; - /** - * Required. List items. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $items; - /** - * Optional. Subtitle of the list. - * - * Generated from protobuf field string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subtitle = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * Optional. The overall title of the list. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect\Item>|\Google\Protobuf\Internal\RepeatedField $items - * Required. List items. - * @type string $subtitle - * Optional. Subtitle of the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The overall title of the list. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Optional. The overall title of the list. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Required. List items. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * Required. List items. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect\Item>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect\Item::class); - $this->items = $arr; - - return $this; - } - - /** - * Optional. Subtitle of the list. - * - * Generated from protobuf field string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubtitle() - { - return $this->subtitle; - } - - /** - * Optional. Subtitle of the list. - * - * Generated from protobuf field string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubtitle($var) - { - GPBUtil::checkString($var, True); - $this->subtitle = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ListSelect::class, \Google\Cloud\Dialogflow\V2\Intent_Message_ListSelect::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect/Item.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect/Item.php deleted file mode 100644 index fcc7d6847ad5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/ListSelect/Item.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item - */ -class Item extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Additional information about this option. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $info = null; - /** - * Required. The title of the list item. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $title = ''; - /** - * Optional. The main text describing the item. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. The image to display. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo $info - * Required. Additional information about this option. - * @type string $title - * Required. The title of the list item. - * @type string $description - * Optional. The main text describing the item. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image - * Optional. The image to display. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Additional information about this option. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo|null - */ - public function getInfo() - { - return $this->info; - } - - public function hasInfo() - { - return isset($this->info); - } - - public function clearInfo() - { - unset($this->info); - } - - /** - * Required. Additional information about this option. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo $var - * @return $this - */ - public function setInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\SelectItemInfo::class); - $this->info = $var; - - return $this; - } - - /** - * Required. The title of the list item. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. The title of the list item. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Optional. The main text describing the item. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The main text describing the item. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. The image to display. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * Optional. The image to display. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); - $this->image = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Item::class, \Google\Cloud\Dialogflow\V2\Intent_Message_ListSelect_Item::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent.php deleted file mode 100644 index d5430281c7de..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.MediaContent - */ -class MediaContent extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. What type of media is the content (ie "audio"). - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $media_type = 0; - /** - * Required. List of media objects. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2; - */ - private $media_objects; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $media_type - * Optional. What type of media is the content (ie "audio"). - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent\ResponseMediaObject>|\Google\Protobuf\Internal\RepeatedField $media_objects - * Required. List of media objects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. What type of media is the content (ie "audio"). - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMediaType() - { - return $this->media_type; - } - - /** - * Optional. What type of media is the content (ie "audio"). - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMediaType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent\ResponseMediaType::class); - $this->media_type = $var; - - return $this; - } - - /** - * Required. List of media objects. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMediaObjects() - { - return $this->media_objects; - } - - /** - * Required. List of media objects. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent\ResponseMediaObject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMediaObjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent\ResponseMediaObject::class); - $this->media_objects = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MediaContent::class, \Google\Cloud\Dialogflow\V2\Intent_Message_MediaContent::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaObject.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaObject.php deleted file mode 100644 index 59de16e065f6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaObject.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject - */ -class ResponseMediaObject extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of media card. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. Description of media card. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. Url where the media is stored. - * - * Generated from protobuf field string content_url = 5; - */ - protected $content_url = ''; - protected $image; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of media card. - * @type string $description - * Optional. Description of media card. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $large_image - * Optional. Image to display above media content. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $icon - * Optional. Icon to display above media content. - * @type string $content_url - * Required. Url where the media is stored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of media card. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of media card. - * - * 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; - } - - /** - * Optional. Description of media card. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of media card. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Image to display above media content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null - */ - public function getLargeImage() - { - return $this->readOneof(3); - } - - public function hasLargeImage() - { - return $this->hasOneof(3); - } - - /** - * Optional. Image to display above media content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var - * @return $this - */ - public function setLargeImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Icon to display above media content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null - */ - public function getIcon() - { - return $this->readOneof(4); - } - - public function hasIcon() - { - return $this->hasOneof(4); - } - - /** - * Optional. Icon to display above media content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var - * @return $this - */ - public function setIcon($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Required. Url where the media is stored. - * - * Generated from protobuf field string content_url = 5; - * @return string - */ - public function getContentUrl() - { - return $this->content_url; - } - - /** - * Required. Url where the media is stored. - * - * Generated from protobuf field string content_url = 5; - * @param string $var - * @return $this - */ - public function setContentUrl($var) - { - GPBUtil::checkString($var, True); - $this->content_url = $var; - - return $this; - } - - /** - * @return string - */ - public function getImage() - { - return $this->whichOneof("image"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResponseMediaObject::class, \Google\Cloud\Dialogflow\V2\Intent_Message_MediaContent_ResponseMediaObject::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaType.php deleted file mode 100644 index 7ff8438d6ca1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/MediaContent/ResponseMediaType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType - */ -class ResponseMediaType -{ - /** - * Unspecified. - * - * Generated from protobuf enum RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; - */ - const RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; - /** - * Response media type is audio. - * - * Generated from protobuf enum AUDIO = 1; - */ - const AUDIO = 1; - - private static $valueToName = [ - self::RESPONSE_MEDIA_TYPE_UNSPECIFIED => 'RESPONSE_MEDIA_TYPE_UNSPECIFIED', - 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(ResponseMediaType::class, \Google\Cloud\Dialogflow\V2\Intent_Message_MediaContent_ResponseMediaType::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Platform.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Platform.php deleted file mode 100644 index 5da4a44f1522..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Platform.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.Platform - */ -class Platform -{ - /** - * Default platform. - * - * Generated from protobuf enum PLATFORM_UNSPECIFIED = 0; - */ - const PLATFORM_UNSPECIFIED = 0; - /** - * Facebook. - * - * Generated from protobuf enum FACEBOOK = 1; - */ - const FACEBOOK = 1; - /** - * Slack. - * - * Generated from protobuf enum SLACK = 2; - */ - const SLACK = 2; - /** - * Telegram. - * - * Generated from protobuf enum TELEGRAM = 3; - */ - const TELEGRAM = 3; - /** - * Kik. - * - * Generated from protobuf enum KIK = 4; - */ - const KIK = 4; - /** - * Skype. - * - * Generated from protobuf enum SKYPE = 5; - */ - const SKYPE = 5; - /** - * Line. - * - * Generated from protobuf enum LINE = 6; - */ - const LINE = 6; - /** - * Viber. - * - * Generated from protobuf enum VIBER = 7; - */ - const VIBER = 7; - /** - * Google Assistant - * See [Dialogflow webhook - * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) - * - * Generated from protobuf enum ACTIONS_ON_GOOGLE = 8; - */ - const ACTIONS_ON_GOOGLE = 8; - /** - * Google Hangouts. - * - * Generated from protobuf enum GOOGLE_HANGOUTS = 11; - */ - const GOOGLE_HANGOUTS = 11; - - private static $valueToName = [ - self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED', - self::FACEBOOK => 'FACEBOOK', - self::SLACK => 'SLACK', - self::TELEGRAM => 'TELEGRAM', - self::KIK => 'KIK', - self::SKYPE => 'SKYPE', - self::LINE => 'LINE', - self::VIBER => 'VIBER', - self::ACTIONS_ON_GOOGLE => 'ACTIONS_ON_GOOGLE', - self::GOOGLE_HANGOUTS => 'GOOGLE_HANGOUTS', - ]; - - 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(Platform::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Platform::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/QuickReplies.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/QuickReplies.php deleted file mode 100644 index a3d54844bfad..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/QuickReplies.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.QuickReplies - */ -class QuickReplies extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The title of the collection of quick replies. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $title = ''; - /** - * Optional. The collection of quick replies. - * - * Generated from protobuf field repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $quick_replies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * Optional. The title of the collection of quick replies. - * @type array|\Google\Protobuf\Internal\RepeatedField $quick_replies - * Optional. The collection of quick replies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The title of the collection of quick replies. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Optional. The title of the collection of quick replies. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Optional. The collection of quick replies. - * - * Generated from protobuf field repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuickReplies() - { - return $this->quick_replies; - } - - /** - * Optional. The collection of quick replies. - * - * Generated from protobuf field repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuickReplies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->quick_replies = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QuickReplies::class, \Google\Cloud\Dialogflow\V2\Intent_Message_QuickReplies::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SelectItemInfo.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SelectItemInfo.php deleted file mode 100644 index 615e0f22fe57..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SelectItemInfo.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo - */ -class SelectItemInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A unique key that will be sent back to the agent if this - * response is given. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = ''; - /** - * Optional. A list of synonyms that can also be used to trigger this - * item in dialog. - * - * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $synonyms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Required. A unique key that will be sent back to the agent if this - * response is given. - * @type array|\Google\Protobuf\Internal\RepeatedField $synonyms - * Optional. A list of synonyms that can also be used to trigger this - * item in dialog. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. A unique key that will be sent back to the agent if this - * response is given. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Required. A unique key that will be sent back to the agent if this - * response is given. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Optional. A list of synonyms that can also be used to trigger this - * item in dialog. - * - * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSynonyms() - { - return $this->synonyms; - } - - /** - * Optional. A list of synonyms that can also be used to trigger this - * item in dialog. - * - * Generated from protobuf field repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSynonyms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->synonyms = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SelectItemInfo::class, \Google\Cloud\Dialogflow\V2\Intent_Message_SelectItemInfo::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponse.php deleted file mode 100644 index e59d4ce2bbe5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponse.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.SimpleResponse - */ -class SimpleResponse extends \Google\Protobuf\Internal\Message -{ - /** - * One of text_to_speech or ssml must be provided. The plain text of the - * speech output. Mutually exclusive with ssml. - * - * Generated from protobuf field string text_to_speech = 1; - */ - protected $text_to_speech = ''; - /** - * One of text_to_speech or ssml must be provided. Structured spoken - * response to the user in the SSML format. Mutually exclusive with - * text_to_speech. - * - * Generated from protobuf field string ssml = 2; - */ - protected $ssml = ''; - /** - * Optional. The text to display. - * - * Generated from protobuf field string display_text = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text_to_speech - * One of text_to_speech or ssml must be provided. The plain text of the - * speech output. Mutually exclusive with ssml. - * @type string $ssml - * One of text_to_speech or ssml must be provided. Structured spoken - * response to the user in the SSML format. Mutually exclusive with - * text_to_speech. - * @type string $display_text - * Optional. The text to display. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * One of text_to_speech or ssml must be provided. The plain text of the - * speech output. Mutually exclusive with ssml. - * - * Generated from protobuf field string text_to_speech = 1; - * @return string - */ - public function getTextToSpeech() - { - return $this->text_to_speech; - } - - /** - * One of text_to_speech or ssml must be provided. The plain text of the - * speech output. Mutually exclusive with ssml. - * - * Generated from protobuf field string text_to_speech = 1; - * @param string $var - * @return $this - */ - public function setTextToSpeech($var) - { - GPBUtil::checkString($var, True); - $this->text_to_speech = $var; - - return $this; - } - - /** - * One of text_to_speech or ssml must be provided. Structured spoken - * response to the user in the SSML format. Mutually exclusive with - * text_to_speech. - * - * Generated from protobuf field string ssml = 2; - * @return string - */ - public function getSsml() - { - return $this->ssml; - } - - /** - * One of text_to_speech or ssml must be provided. Structured spoken - * response to the user in the SSML format. Mutually exclusive with - * text_to_speech. - * - * Generated from protobuf field string ssml = 2; - * @param string $var - * @return $this - */ - public function setSsml($var) - { - GPBUtil::checkString($var, True); - $this->ssml = $var; - - return $this; - } - - /** - * Optional. The text to display. - * - * Generated from protobuf field string display_text = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayText() - { - return $this->display_text; - } - - /** - * Optional. The text to display. - * - * Generated from protobuf field string display_text = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayText($var) - { - GPBUtil::checkString($var, True); - $this->display_text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SimpleResponse::class, \Google\Cloud\Dialogflow\V2\Intent_Message_SimpleResponse::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponses.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponses.php deleted file mode 100644 index a8d1e0095b9f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/SimpleResponses.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.SimpleResponses - */ -class SimpleResponses extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The list of simple responses. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $simple_responses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponse>|\Google\Protobuf\Internal\RepeatedField $simple_responses - * Required. The list of simple responses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The list of simple responses. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSimpleResponses() - { - return $this->simple_responses; - } - - /** - * Required. The list of simple responses. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSimpleResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponse::class); - $this->simple_responses = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SimpleResponses::class, \Google\Cloud\Dialogflow\V2\Intent_Message_SimpleResponses::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestion.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestion.php deleted file mode 100644 index f5e643dcb598..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestion.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.Suggestion - */ -class Suggestion extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The text shown the in the suggestion chip. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $title = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * Required. The text shown the in the suggestion chip. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The text shown the in the suggestion chip. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. The text shown the in the suggestion chip. - * - * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Suggestion::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Suggestion::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestions.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestions.php deleted file mode 100644 index 49ac588ee861..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Suggestions.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.Suggestions - */ -class Suggestions extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The list of suggested replies. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $suggestions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\Suggestion>|\Google\Protobuf\Internal\RepeatedField $suggestions - * Required. The list of suggested replies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The list of suggested replies. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSuggestions() - { - return $this->suggestions; - } - - /** - * Required. The list of suggested replies. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\Suggestion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSuggestions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestion::class); - $this->suggestions = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Suggestions::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Suggestions::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCard.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCard.php deleted file mode 100644 index daffa040dbc6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCard.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.TableCard - */ -class TableCard extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Title of the card. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * Optional. Subtitle to the title. - * - * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subtitle = ''; - /** - * Optional. Image which should be displayed on the card. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image = null; - /** - * Optional. Display properties for the columns in this table. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $column_properties; - /** - * Optional. Rows in this table of data. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $rows; - /** - * Optional. List of buttons for the card. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $buttons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * Required. Title of the card. - * @type string $subtitle - * Optional. Subtitle to the title. - * @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $image - * Optional. Image which should be displayed on the card. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\ColumnProperties>|\Google\Protobuf\Internal\RepeatedField $column_properties - * Optional. Display properties for the columns in this table. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\TableCardRow>|\Google\Protobuf\Internal\RepeatedField $rows - * Optional. Rows in this table of data. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>|\Google\Protobuf\Internal\RepeatedField $buttons - * Optional. List of buttons for the card. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Title of the card. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. Title of the card. - * - * 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; - } - - /** - * Optional. Subtitle to the title. - * - * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubtitle() - { - return $this->subtitle; - } - - /** - * Optional. Subtitle to the title. - * - * Generated from protobuf field string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubtitle($var) - { - GPBUtil::checkString($var, True); - $this->subtitle = $var; - - return $this; - } - - /** - * Optional. Image which should be displayed on the card. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * Optional. Image which should be displayed on the card. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class); - $this->image = $var; - - return $this; - } - - /** - * Optional. Display properties for the columns in this table. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColumnProperties() - { - return $this->column_properties; - } - - /** - * Optional. Display properties for the columns in this table. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\ColumnProperties>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColumnProperties($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\ColumnProperties::class); - $this->column_properties = $arr; - - return $this; - } - - /** - * Optional. Rows in this table of data. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRows() - { - return $this->rows; - } - - /** - * Optional. Rows in this table of data. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\TableCardRow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\TableCardRow::class); - $this->rows = $arr; - - return $this; - } - - /** - * Optional. List of buttons for the card. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getButtons() - { - return $this->buttons; - } - - /** - * Optional. List of buttons for the card. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setButtons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button::class); - $this->buttons = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableCard::class, \Google\Cloud\Dialogflow\V2\Intent_Message_TableCard::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardCell.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardCell.php deleted file mode 100644 index 80fa26fc55a0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardCell.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.TableCardCell - */ -class TableCardCell extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Text in this cell. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Required. Text in this cell. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Text in this cell. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Required. Text in this cell. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableCardCell::class, \Google\Cloud\Dialogflow\V2\Intent_Message_TableCardCell::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardRow.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardRow.php deleted file mode 100644 index faffa5e21573..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/TableCardRow.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.TableCardRow - */ -class TableCardRow extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. List of cells that make up this row. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $cells; - /** - * Optional. Whether to add a visual divider after this row. - * - * Generated from protobuf field bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $divider_after = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\TableCardCell>|\Google\Protobuf\Internal\RepeatedField $cells - * Optional. List of cells that make up this row. - * @type bool $divider_after - * Optional. Whether to add a visual divider after this row. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. List of cells that make up this row. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCells() - { - return $this->cells; - } - - /** - * Optional. List of cells that make up this row. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\TableCardCell>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCells($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\TableCardCell::class); - $this->cells = $arr; - - return $this; - } - - /** - * Optional. Whether to add a visual divider after this row. - * - * Generated from protobuf field bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDividerAfter() - { - return $this->divider_after; - } - - /** - * Optional. Whether to add a visual divider after this row. - * - * Generated from protobuf field bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDividerAfter($var) - { - GPBUtil::checkBool($var); - $this->divider_after = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableCardRow::class, \Google\Cloud\Dialogflow\V2\Intent_Message_TableCardRow::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Text.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Text.php deleted file mode 100644 index 238bb805c106..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Message/Text.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Message.Text - */ -class Text extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The collection of the agent's responses. - * - * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $text; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $text - * Optional. The collection of the agent's responses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The collection of the agent's responses. - * - * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getText() - { - return $this->text; - } - - /** - * Optional. The collection of the agent's responses. - * - * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setText($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->text = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Text::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Text::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Parameter.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Parameter.php deleted file mode 100644 index dd13566fb368..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/Parameter.php +++ /dev/null @@ -1,360 +0,0 @@ -google.cloud.dialogflow.v2.Intent.Parameter - */ -class Parameter extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of this parameter. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The name of the parameter. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Optional. The definition of the parameter value. It can be: - * - a constant string, - * - a parameter value defined as `$parameter_name`, - * - an original parameter value defined as `$parameter_name.original`, - * - a parameter value from some context defined as - * `#context_name.parameter_name`. - * - * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value = ''; - /** - * Optional. The default value to use when the `value` yields an empty - * result. - * Default values can be extracted from contexts by using the following - * syntax: `#context_name.parameter_name`. - * - * Generated from protobuf field string default_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_value = ''; - /** - * Optional. The name of the entity type, prefixed with `@`, that - * describes values of the parameter. If the parameter is - * required, this must be provided. - * - * Generated from protobuf field string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $entity_type_display_name = ''; - /** - * Optional. Indicates whether the parameter is required. That is, - * whether the intent cannot be completed without collecting the parameter - * value. - * - * Generated from protobuf field bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mandatory = false; - /** - * Optional. The collection of prompts that the agent can present to the - * user in order to collect a value for the parameter. - * - * Generated from protobuf field repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $prompts; - /** - * Optional. Indicates whether the parameter represents a list of values. - * - * Generated from protobuf field bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_list = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of this parameter. - * @type string $display_name - * Required. The name of the parameter. - * @type string $value - * Optional. The definition of the parameter value. It can be: - * - a constant string, - * - a parameter value defined as `$parameter_name`, - * - an original parameter value defined as `$parameter_name.original`, - * - a parameter value from some context defined as - * `#context_name.parameter_name`. - * @type string $default_value - * Optional. The default value to use when the `value` yields an empty - * result. - * Default values can be extracted from contexts by using the following - * syntax: `#context_name.parameter_name`. - * @type string $entity_type_display_name - * Optional. The name of the entity type, prefixed with `@`, that - * describes values of the parameter. If the parameter is - * required, this must be provided. - * @type bool $mandatory - * Optional. Indicates whether the parameter is required. That is, - * whether the intent cannot be completed without collecting the parameter - * value. - * @type array|\Google\Protobuf\Internal\RepeatedField $prompts - * Optional. The collection of prompts that the agent can present to the - * user in order to collect a value for the parameter. - * @type bool $is_list - * Optional. Indicates whether the parameter represents a list of values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of this parameter. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of this parameter. - * - * 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; - } - - /** - * Required. The name of the parameter. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The name of the parameter. - * - * 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; - } - - /** - * Optional. The definition of the parameter value. It can be: - * - a constant string, - * - a parameter value defined as `$parameter_name`, - * - an original parameter value defined as `$parameter_name.original`, - * - a parameter value from some context defined as - * `#context_name.parameter_name`. - * - * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Optional. The definition of the parameter value. It can be: - * - a constant string, - * - a parameter value defined as `$parameter_name`, - * - an original parameter value defined as `$parameter_name.original`, - * - a parameter value from some context defined as - * `#context_name.parameter_name`. - * - * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Optional. The default value to use when the `value` yields an empty - * result. - * Default values can be extracted from contexts by using the following - * syntax: `#context_name.parameter_name`. - * - * Generated from protobuf field string default_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDefaultValue() - { - return $this->default_value; - } - - /** - * Optional. The default value to use when the `value` yields an empty - * result. - * Default values can be extracted from contexts by using the following - * syntax: `#context_name.parameter_name`. - * - * Generated from protobuf field string default_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDefaultValue($var) - { - GPBUtil::checkString($var, True); - $this->default_value = $var; - - return $this; - } - - /** - * Optional. The name of the entity type, prefixed with `@`, that - * describes values of the parameter. If the parameter is - * required, this must be provided. - * - * Generated from protobuf field string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEntityTypeDisplayName() - { - return $this->entity_type_display_name; - } - - /** - * Optional. The name of the entity type, prefixed with `@`, that - * describes values of the parameter. If the parameter is - * required, this must be provided. - * - * Generated from protobuf field string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEntityTypeDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->entity_type_display_name = $var; - - return $this; - } - - /** - * Optional. Indicates whether the parameter is required. That is, - * whether the intent cannot be completed without collecting the parameter - * value. - * - * Generated from protobuf field bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getMandatory() - { - return $this->mandatory; - } - - /** - * Optional. Indicates whether the parameter is required. That is, - * whether the intent cannot be completed without collecting the parameter - * value. - * - * Generated from protobuf field bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setMandatory($var) - { - GPBUtil::checkBool($var); - $this->mandatory = $var; - - return $this; - } - - /** - * Optional. The collection of prompts that the agent can present to the - * user in order to collect a value for the parameter. - * - * Generated from protobuf field repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrompts() - { - return $this->prompts; - } - - /** - * Optional. The collection of prompts that the agent can present to the - * user in order to collect a value for the parameter. - * - * Generated from protobuf field repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrompts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->prompts = $arr; - - return $this; - } - - /** - * Optional. Indicates whether the parameter represents a list of values. - * - * Generated from protobuf field bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsList() - { - return $this->is_list; - } - - /** - * Optional. Indicates whether the parameter represents a list of values. - * - * Generated from protobuf field bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsList($var) - { - GPBUtil::checkBool($var); - $this->is_list = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Parameter::class, \Google\Cloud\Dialogflow\V2\Intent_Parameter::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase.php deleted file mode 100644 index bb0045425c23..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.dialogflow.v2.Intent.TrainingPhrase - */ -class TrainingPhrase extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique identifier of this training phrase. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The type of the training phrase. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. The ordered list of training phrase parts. - * The parts are concatenated in order to form the training phrase. - * Note: The API does not automatically annotate training phrases like the - * Dialogflow Console does. - * Note: Do not forget to include whitespace at part boundaries, - * so the training phrase is well formatted when the parts are concatenated. - * If the training phrase does not need to be annotated with parameters, - * you just need a single part with only the - * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] - * field set. - * If you want to annotate the training phrase, you must create multiple - * parts, where the fields of each part are populated in one of two ways: - * - `Part.text` is set to a part of the phrase that has no parameters. - * - `Part.text` is set to a part of the phrase that you want to annotate, - * and the `entity_type`, `alias`, and `user_defined` fields are all - * set. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $parts; - /** - * Optional. Indicates how many times this example was added to - * the intent. Each time a developer adds an existing sample by editing an - * intent or training, this counter is increased. - * - * Generated from protobuf field int32 times_added_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $times_added_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique identifier of this training phrase. - * @type int $type - * Required. The type of the training phrase. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase\Part>|\Google\Protobuf\Internal\RepeatedField $parts - * Required. The ordered list of training phrase parts. - * The parts are concatenated in order to form the training phrase. - * Note: The API does not automatically annotate training phrases like the - * Dialogflow Console does. - * Note: Do not forget to include whitespace at part boundaries, - * so the training phrase is well formatted when the parts are concatenated. - * If the training phrase does not need to be annotated with parameters, - * you just need a single part with only the - * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] - * field set. - * If you want to annotate the training phrase, you must create multiple - * parts, where the fields of each part are populated in one of two ways: - * - `Part.text` is set to a part of the phrase that has no parameters. - * - `Part.text` is set to a part of the phrase that you want to annotate, - * and the `entity_type`, `alias`, and `user_defined` fields are all - * set. - * @type int $times_added_count - * Optional. Indicates how many times this example was added to - * the intent. Each time a developer adds an existing sample by editing an - * intent or training, this counter is increased. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique identifier of this training phrase. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique identifier of this training phrase. - * - * 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; - } - - /** - * Required. The type of the training phrase. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of the training phrase. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. The ordered list of training phrase parts. - * The parts are concatenated in order to form the training phrase. - * Note: The API does not automatically annotate training phrases like the - * Dialogflow Console does. - * Note: Do not forget to include whitespace at part boundaries, - * so the training phrase is well formatted when the parts are concatenated. - * If the training phrase does not need to be annotated with parameters, - * you just need a single part with only the - * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] - * field set. - * If you want to annotate the training phrase, you must create multiple - * parts, where the fields of each part are populated in one of two ways: - * - `Part.text` is set to a part of the phrase that has no parameters. - * - `Part.text` is set to a part of the phrase that you want to annotate, - * and the `entity_type`, `alias`, and `user_defined` fields are all - * set. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParts() - { - return $this->parts; - } - - /** - * Required. The ordered list of training phrase parts. - * The parts are concatenated in order to form the training phrase. - * Note: The API does not automatically annotate training phrases like the - * Dialogflow Console does. - * Note: Do not forget to include whitespace at part boundaries, - * so the training phrase is well formatted when the parts are concatenated. - * If the training phrase does not need to be annotated with parameters, - * you just need a single part with only the - * [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] - * field set. - * If you want to annotate the training phrase, you must create multiple - * parts, where the fields of each part are populated in one of two ways: - * - `Part.text` is set to a part of the phrase that has no parameters. - * - `Part.text` is set to a part of the phrase that you want to annotate, - * and the `entity_type`, `alias`, and `user_defined` fields are all - * set. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase\Part>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\TrainingPhrase\Part::class); - $this->parts = $arr; - - return $this; - } - - /** - * Optional. Indicates how many times this example was added to - * the intent. Each time a developer adds an existing sample by editing an - * intent or training, this counter is increased. - * - * Generated from protobuf field int32 times_added_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTimesAddedCount() - { - return $this->times_added_count; - } - - /** - * Optional. Indicates how many times this example was added to - * the intent. Each time a developer adds an existing sample by editing an - * intent or training, this counter is increased. - * - * Generated from protobuf field int32 times_added_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTimesAddedCount($var) - { - GPBUtil::checkInt32($var); - $this->times_added_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TrainingPhrase::class, \Google\Cloud\Dialogflow\V2\Intent_TrainingPhrase::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Part.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Part.php deleted file mode 100644 index 4f319d65101f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Part.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part - */ -class Part extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The text for this part. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * Optional. The entity type name prefixed with `@`. - * This field is required for annotated parts of the training phrase. - * - * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $entity_type = ''; - /** - * Optional. The parameter name for the value extracted from the - * annotated part of the example. - * This field is required for annotated parts of the training phrase. - * - * Generated from protobuf field string alias = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alias = ''; - /** - * Optional. Indicates whether the text was manually annotated. - * This field is set to true when the Dialogflow Console is used to - * manually annotate the part. When creating an annotated part with the - * API, you must set this to true. - * - * Generated from protobuf field bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $user_defined = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Required. The text for this part. - * @type string $entity_type - * Optional. The entity type name prefixed with `@`. - * This field is required for annotated parts of the training phrase. - * @type string $alias - * Optional. The parameter name for the value extracted from the - * annotated part of the example. - * This field is required for annotated parts of the training phrase. - * @type bool $user_defined - * Optional. Indicates whether the text was manually annotated. - * This field is set to true when the Dialogflow Console is used to - * manually annotate the part. When creating an annotated part with the - * API, you must set this to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The text for this part. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Required. The text for this part. - * - * 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; - } - - /** - * Optional. The entity type name prefixed with `@`. - * This field is required for annotated parts of the training phrase. - * - * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEntityType() - { - return $this->entity_type; - } - - /** - * Optional. The entity type name prefixed with `@`. - * This field is required for annotated parts of the training phrase. - * - * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkString($var, True); - $this->entity_type = $var; - - return $this; - } - - /** - * Optional. The parameter name for the value extracted from the - * annotated part of the example. - * This field is required for annotated parts of the training phrase. - * - * Generated from protobuf field string alias = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAlias() - { - return $this->alias; - } - - /** - * Optional. The parameter name for the value extracted from the - * annotated part of the example. - * This field is required for annotated parts of the training phrase. - * - * Generated from protobuf field string alias = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAlias($var) - { - GPBUtil::checkString($var, True); - $this->alias = $var; - - return $this; - } - - /** - * Optional. Indicates whether the text was manually annotated. - * This field is set to true when the Dialogflow Console is used to - * manually annotate the part. When creating an annotated part with the - * API, you must set this to true. - * - * Generated from protobuf field bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUserDefined() - { - return $this->user_defined; - } - - /** - * Optional. Indicates whether the text was manually annotated. - * This field is set to true when the Dialogflow Console is used to - * manually annotate the part. When creating an annotated part with the - * API, you must set this to true. - * - * Generated from protobuf field bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUserDefined($var) - { - GPBUtil::checkBool($var); - $this->user_defined = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Part::class, \Google\Cloud\Dialogflow\V2\Intent_TrainingPhrase_Part::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Type.php deleted file mode 100644 index a0a5ef200c1e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/TrainingPhrase/Type.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type - */ -class Type -{ - /** - * Not specified. This value should never be used. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Examples do not contain @-prefixed entity type names, but example parts - * can be annotated with entity types. - * - * Generated from protobuf enum EXAMPLE = 1; - */ - const EXAMPLE = 1; - /** - * Templates are not annotated with entity types, but they can contain - * @-prefixed entity type names as substrings. - * Template mode has been deprecated. Example mode is the only supported - * way to create new training phrases. If you have existing training - * phrases that you've created in template mode, those will continue to - * work. - * - * Generated from protobuf enum TEMPLATE = 2 [deprecated = true]; - */ - const TEMPLATE = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::EXAMPLE => 'EXAMPLE', - self::TEMPLATE => 'TEMPLATE', - ]; - - 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\Dialogflow\V2\Intent_TrainingPhrase_Type::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/WebhookState.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/WebhookState.php deleted file mode 100644 index 7282b5d28d99..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent/WebhookState.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dialogflow.v2.Intent.WebhookState - */ -class WebhookState -{ - /** - * Webhook is disabled in the agent and in the intent. - * - * Generated from protobuf enum WEBHOOK_STATE_UNSPECIFIED = 0; - */ - const WEBHOOK_STATE_UNSPECIFIED = 0; - /** - * Webhook is enabled in the agent and in the intent. - * - * Generated from protobuf enum WEBHOOK_STATE_ENABLED = 1; - */ - const WEBHOOK_STATE_ENABLED = 1; - /** - * Webhook is enabled in the agent and in the intent. Also, each slot - * filling prompt is forwarded to the webhook. - * - * Generated from protobuf enum WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; - */ - const WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; - - private static $valueToName = [ - self::WEBHOOK_STATE_UNSPECIFIED => 'WEBHOOK_STATE_UNSPECIFIED', - self::WEBHOOK_STATE_ENABLED => 'WEBHOOK_STATE_ENABLED', - self::WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING => 'WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING', - ]; - - 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(WebhookState::class, \Google\Cloud\Dialogflow\V2\Intent_WebhookState::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentBatch.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentBatch.php deleted file mode 100644 index 87fcc6a533c2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentBatch.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.v2.IntentBatch - */ -class IntentBatch extends \Google\Protobuf\Internal\Message -{ - /** - * A collection of intents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; - */ - private $intents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents - * A collection of intents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * A collection of intents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntents() - { - return $this->intents; - } - - /** - * A collection of intents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); - $this->intents = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentView.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentView.php deleted file mode 100644 index 916e50e6b7db..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/IntentView.php +++ /dev/null @@ -1,56 +0,0 @@ -google.cloud.dialogflow.v2.IntentView - */ -class IntentView -{ - /** - * Training phrases field is not populated in the response. - * - * Generated from protobuf enum INTENT_VIEW_UNSPECIFIED = 0; - */ - const INTENT_VIEW_UNSPECIFIED = 0; - /** - * All fields are populated. - * - * Generated from protobuf enum INTENT_VIEW_FULL = 1; - */ - const INTENT_VIEW_FULL = 1; - - private static $valueToName = [ - self::INTENT_VIEW_UNSPECIFIED => 'INTENT_VIEW_UNSPECIFIED', - self::INTENT_VIEW_FULL => 'INTENT_VIEW_FULL', - ]; - - 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_FollowupIntentInfo.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_FollowupIntentInfo.php deleted file mode 100644 index 083010bb2beb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Intent_FollowupIntentInfo.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Intents/ListIntents', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListIntentsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified intent. - * @param \Google\Cloud\Dialogflow\V2\GetIntentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetIntent(\Google\Cloud\Dialogflow\V2\GetIntentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/GetIntent', - $argument, - ['\Google\Cloud\Dialogflow\V2\Intent', 'decode'], - $metadata, $options); - } - - /** - * Creates an intent in the specified agent. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\CreateIntentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateIntent(\Google\Cloud\Dialogflow\V2\CreateIntentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/CreateIntent', - $argument, - ['\Google\Cloud\Dialogflow\V2\Intent', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified intent. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\UpdateIntentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateIntent(\Google\Cloud\Dialogflow\V2\UpdateIntentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/UpdateIntent', - $argument, - ['\Google\Cloud\Dialogflow\V2\Intent', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified intent and its direct or indirect followup intents. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\DeleteIntentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteIntent(\Google\Cloud\Dialogflow\V2\DeleteIntentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/DeleteIntent', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates/Creates multiple intents in the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: - * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse] - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\BatchUpdateIntentsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchUpdateIntents(\Google\Cloud\Dialogflow\V2\BatchUpdateIntentsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/BatchUpdateIntents', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes intents in the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * @param \Google\Cloud\Dialogflow\V2\BatchDeleteIntentsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchDeleteIntents(\Google\Cloud\Dialogflow\V2\BatchDeleteIntentsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Intents/BatchDeleteIntents', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBase.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBase.php deleted file mode 100644 index d3753cd6ed8c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBase.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.dialogflow.v2.KnowledgeBase - */ -class KnowledgeBase extends \Google\Protobuf\Internal\Message -{ - /** - * The knowledge base resource name. - * The name must be empty when creating a knowledge base. - * Format: `projects//locations//knowledgeBases/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The display name of the knowledge base. The name must be 1024 - * bytes or less; otherwise, the creation request fails. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Language which represents the KnowledgeBase. When the KnowledgeBase is - * created/updated, expect this to be present for non en-us languages. When - * unspecified, the default language code en-us applies. - * - * Generated from protobuf field string language_code = 4; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The knowledge base resource name. - * The name must be empty when creating a knowledge base. - * Format: `projects//locations//knowledgeBases/`. - * @type string $display_name - * Required. The display name of the knowledge base. The name must be 1024 - * bytes or less; otherwise, the creation request fails. - * @type string $language_code - * Language which represents the KnowledgeBase. When the KnowledgeBase is - * created/updated, expect this to be present for non en-us languages. When - * unspecified, the default language code en-us applies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); - parent::__construct($data); - } - - /** - * The knowledge base resource name. - * The name must be empty when creating a knowledge base. - * Format: `projects//locations//knowledgeBases/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The knowledge base resource name. - * The name must be empty when creating a knowledge base. - * Format: `projects//locations//knowledgeBases/`. - * - * 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; - } - - /** - * Required. The display name of the knowledge base. The name must be 1024 - * bytes or less; otherwise, the creation request fails. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The display name of the knowledge base. The name must be 1024 - * bytes or less; otherwise, the creation request fails. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Language which represents the KnowledgeBase. When the KnowledgeBase is - * created/updated, expect this to be present for non en-us languages. When - * unspecified, the default language code en-us applies. - * - * Generated from protobuf field string language_code = 4; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Language which represents the KnowledgeBase. When the KnowledgeBase is - * created/updated, expect this to be present for non en-us languages. When - * unspecified, the default language code en-us applies. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBasesGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBasesGrpcClient.php deleted file mode 100644 index acd033abdd0f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeBasesGrpcClient.php +++ /dev/null @@ -1,111 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/ListKnowledgeBases', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListKnowledgeBasesResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified knowledge base. - * @param \Google\Cloud\Dialogflow\V2\GetKnowledgeBaseRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetKnowledgeBase(\Google\Cloud\Dialogflow\V2\GetKnowledgeBaseRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/GetKnowledgeBase', - $argument, - ['\Google\Cloud\Dialogflow\V2\KnowledgeBase', 'decode'], - $metadata, $options); - } - - /** - * Creates a knowledge base. - * @param \Google\Cloud\Dialogflow\V2\CreateKnowledgeBaseRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateKnowledgeBase(\Google\Cloud\Dialogflow\V2\CreateKnowledgeBaseRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/CreateKnowledgeBase', - $argument, - ['\Google\Cloud\Dialogflow\V2\KnowledgeBase', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified knowledge base. - * @param \Google\Cloud\Dialogflow\V2\DeleteKnowledgeBaseRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteKnowledgeBase(\Google\Cloud\Dialogflow\V2\DeleteKnowledgeBaseRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/DeleteKnowledgeBase', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified knowledge base. - * @param \Google\Cloud\Dialogflow\V2\UpdateKnowledgeBaseRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateKnowledgeBase(\Google\Cloud\Dialogflow\V2\UpdateKnowledgeBaseRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.KnowledgeBases/UpdateKnowledgeBase', - $argument, - ['\Google\Cloud\Dialogflow\V2\KnowledgeBase', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata.php deleted file mode 100644 index 609ea56307cb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dialogflow.v2.KnowledgeOperationMetadata - */ -class KnowledgeOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of this operation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * The name of the knowledge base interacted with during the operation. - * - * Generated from protobuf field string knowledge_base = 3; - */ - protected $knowledge_base = ''; - protected $operation_metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The current state of this operation. - * @type string $knowledge_base - * The name of the knowledge base interacted with during the operation. - * @type \Google\Cloud\Dialogflow\V2\ExportOperationMetadata $export_operation_metadata - * Metadata for the Export Data Operation such as the destination of export. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of this operation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of this operation. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * The name of the knowledge base interacted with during the operation. - * - * Generated from protobuf field string knowledge_base = 3; - * @return string - */ - public function getKnowledgeBase() - { - return $this->knowledge_base; - } - - /** - * The name of the knowledge base interacted with during the operation. - * - * Generated from protobuf field string knowledge_base = 3; - * @param string $var - * @return $this - */ - public function setKnowledgeBase($var) - { - GPBUtil::checkString($var, True); - $this->knowledge_base = $var; - - return $this; - } - - /** - * Metadata for the Export Data Operation such as the destination of export. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4; - * @return \Google\Cloud\Dialogflow\V2\ExportOperationMetadata|null - */ - public function getExportOperationMetadata() - { - return $this->readOneof(4); - } - - public function hasExportOperationMetadata() - { - return $this->hasOneof(4); - } - - /** - * Metadata for the Export Data Operation such as the destination of export. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4; - * @param \Google\Cloud\Dialogflow\V2\ExportOperationMetadata $var - * @return $this - */ - public function setExportOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ExportOperationMetadata::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getOperationMetadata() - { - return $this->whichOneof("operation_metadata"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata/State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata/State.php deleted file mode 100644 index ea9235bbaf4f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State - */ -class State -{ - /** - * State unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The operation has been created. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The operation is currently running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The operation is done, either cancelled or completed. - * - * Generated from protobuf enum DONE = 3; - */ - const DONE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::RUNNING => 'RUNNING', - self::DONE => 'DONE', - ]; - - 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\Dialogflow\V2\KnowledgeOperationMetadata_State::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata_State.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata_State.php deleted file mode 100644 index a91be8fab151..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/KnowledgeOperationMetadata_State.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.ListAnswerRecordsRequest - */ -class ListAnswerRecordsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to list all answer records for in reverse - * chronological order. Format: `projects//locations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Filters to restrict results to specific answer records. - * Marked deprecated as it hasn't been, and isn't currently, supported. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $filter = ''; - /** - * Optional. The maximum number of records to return in a single page. - * The server may return fewer records than this. If unspecified, we use 10. - * The maximum is 100. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The - * [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] - * value returned from a previous list request used to continue listing on - * the next page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to list all answer records for in reverse - * chronological order. Format: `projects//locations/`. - * @type string $filter - * Optional. Filters to restrict results to specific answer records. - * Marked deprecated as it hasn't been, and isn't currently, supported. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @type int $page_size - * Optional. The maximum number of records to return in a single page. - * The server may return fewer records than this. If unspecified, we use 10. - * The maximum is 100. - * @type string $page_token - * Optional. The - * [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] - * value returned from a previous list request used to continue listing on - * the next page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to list all answer records for in reverse - * chronological order. Format: `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 project to list all answer records for in reverse - * chronological order. Format: `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; - } - - /** - * Optional. Filters to restrict results to specific answer records. - * Marked deprecated as it hasn't been, and isn't currently, supported. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getFilter() - { - @trigger_error('filter is deprecated.', E_USER_DEPRECATED); - return $this->filter; - } - - /** - * Optional. Filters to restrict results to specific answer records. - * Marked deprecated as it hasn't been, and isn't currently, supported. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setFilter($var) - { - @trigger_error('filter is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The maximum number of records to return in a single page. - * The server may return fewer records than this. If unspecified, we use 10. - * The maximum is 100. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of records to return in a single page. - * The server may return fewer records than this. If unspecified, we use 10. - * The maximum is 100. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The - * [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] - * value returned from a previous list request used to continue listing on - * the next page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The - * [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] - * value returned from a previous list request used to continue listing on - * the next page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsResponse.php deleted file mode 100644 index f15328a1c8e0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListAnswerRecordsResponse.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.v2.ListAnswerRecordsResponse - */ -class ListAnswerRecordsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of answer records. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnswerRecord answer_records = 1; - */ - private $answer_records; - /** - * A token to retrieve next page of results. Or empty if there are no more - * results. - * Pass this value in the - * [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] - * field in the subsequent call to `ListAnswerRecords` method to retrieve the - * next page of results. - * - * 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\Dialogflow\V2\AnswerRecord>|\Google\Protobuf\Internal\RepeatedField $answer_records - * The list of answer records. - * @type string $next_page_token - * A token to retrieve next page of results. Or empty if there are no more - * results. - * Pass this value in the - * [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] - * field in the subsequent call to `ListAnswerRecords` method to retrieve the - * next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); - parent::__construct($data); - } - - /** - * The list of answer records. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnswerRecord answer_records = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnswerRecords() - { - return $this->answer_records; - } - - /** - * The list of answer records. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnswerRecord answer_records = 1; - * @param array<\Google\Cloud\Dialogflow\V2\AnswerRecord>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnswerRecords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\AnswerRecord::class); - $this->answer_records = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Or empty if there are no more - * results. - * Pass this value in the - * [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] - * field in the subsequent call to `ListAnswerRecords` method to retrieve the - * next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. Or empty if there are no more - * results. - * Pass this value in the - * [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] - * field in the subsequent call to `ListAnswerRecords` method to retrieve the - * next page of results. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsRequest.php deleted file mode 100644 index 93bf81ba464e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.dialogflow.v2.ListContextsRequest - */ -class ListContextsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The session to list all contexts from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The session to list all contexts from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); - parent::__construct($data); - } - - /** - * Required. The session to list all contexts from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 session to list all contexts from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsResponse.php deleted file mode 100644 index 4441573223fb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListContextsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.ListContextsResponse - */ -class ListContextsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of contexts. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 1; - */ - private $contexts; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $contexts - * The list of contexts. There will be a maximum number of items - * returned based on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); - parent::__construct($data); - } - - /** - * The list of contexts. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContexts() - { - return $this->contexts; - } - - /** - * The list of contexts. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContexts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); - $this->contexts = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsRequest.php deleted file mode 100644 index 4303584764d9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsRequest.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationDatasetsRequest - */ -class ListConversationDatasetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location name to list all conversation datasets - * for. Format: `projects//locations/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of conversation datasets to return in a single - * page. By default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location name to list all conversation datasets - * for. Format: `projects//locations/` - * @type int $page_size - * Optional. Maximum number of conversation datasets to return in a single - * page. By default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location name to list all conversation datasets - * for. Format: `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 project and location name to list all conversation datasets - * for. Format: `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; - } - - /** - * Optional. Maximum number of conversation datasets to return in a single - * page. By default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of conversation datasets to return in a single - * page. By default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsResponse.php deleted file mode 100644 index 5e091819a336..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationDatasetsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationDatasetsResponse - */ -class ListConversationDatasetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of datasets to return. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationDataset conversation_datasets = 1; - */ - private $conversation_datasets; - /** - * The token to use to retrieve the next page of results, or empty if there - * are no more results in the list. - * - * 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\Dialogflow\V2\ConversationDataset>|\Google\Protobuf\Internal\RepeatedField $conversation_datasets - * The list of datasets to return. - * @type string $next_page_token - * The token to use to retrieve the next page of results, or empty if there - * are no more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); - parent::__construct($data); - } - - /** - * The list of datasets to return. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationDataset conversation_datasets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConversationDatasets() - { - return $this->conversation_datasets; - } - - /** - * The list of datasets to return. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationDataset conversation_datasets = 1; - * @param array<\Google\Cloud\Dialogflow\V2\ConversationDataset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConversationDatasets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ConversationDataset::class); - $this->conversation_datasets = $arr; - - return $this; - } - - /** - * The token to use to retrieve the next page of results, or empty if there - * are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token to use to retrieve the next page of results, or empty if there - * are no more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsRequest.php deleted file mode 100644 index 170f34e97eef..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsRequest.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest - */ -class ListConversationModelEvaluationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation model resource name. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. Maximum number of evaluations to return in a - * single page. By default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The conversation model resource name. Format: - * `projects//conversationModels/` - * @type int $page_size - * Optional. Maximum number of evaluations to return in a - * single page. By default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation model resource name. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The conversation model resource name. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of evaluations to return in a - * single page. By default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of evaluations to return in a - * single page. By default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsResponse.php deleted file mode 100644 index f9742668b66b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelEvaluationsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse - */ -class ListConversationModelEvaluationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of evaluations to return. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluations = 1; - */ - private $conversation_model_evaluations; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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\Dialogflow\V2\ConversationModelEvaluation>|\Google\Protobuf\Internal\RepeatedField $conversation_model_evaluations - * The list of evaluations to return. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The list of evaluations to return. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConversationModelEvaluations() - { - return $this->conversation_model_evaluations; - } - - /** - * The list of evaluations to return. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModelEvaluation conversation_model_evaluations = 1; - * @param array<\Google\Cloud\Dialogflow\V2\ConversationModelEvaluation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConversationModelEvaluations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ConversationModelEvaluation::class); - $this->conversation_model_evaluations = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsRequest.php deleted file mode 100644 index 840601c63f19..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsRequest.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationModelsRequest - */ -class ListConversationModelsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to list all conversation models for. - * Format: `projects/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. Maximum number of conversation models to return in a single - * page. By default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to list all conversation models for. - * Format: `projects/` - * @type int $page_size - * Optional. Maximum number of conversation models to return in a single - * page. By default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to list all conversation models for. - * Format: `projects/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project to list all conversation models for. - * Format: `projects/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of conversation models to return in a single - * page. By default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of conversation models to return in a single - * page. By default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsResponse.php deleted file mode 100644 index 1aa84fbac746..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationModelsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationModelsResponse - */ -class ListConversationModelsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of models to return. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModel conversation_models = 1; - */ - private $conversation_models; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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\Dialogflow\V2\ConversationModel>|\Google\Protobuf\Internal\RepeatedField $conversation_models - * The list of models to return. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The list of models to return. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModel conversation_models = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConversationModels() - { - return $this->conversation_models; - } - - /** - * The list of models to return. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationModel conversation_models = 1; - * @param array<\Google\Cloud\Dialogflow\V2\ConversationModel>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConversationModels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ConversationModel::class); - $this->conversation_models = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesRequest.php deleted file mode 100644 index 197fbe96b877..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesRequest.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationProfilesRequest - */ -class ListConversationProfilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to list all conversation profiles from. - * Format: `projects//locations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to list all conversation profiles from. - * Format: `projects//locations/`. - * @type int $page_size - * The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to list all conversation profiles from. - * Format: `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 project to list all conversation profiles from. - * Format: `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; - } - - /** - * The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * 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 next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous list request. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesResponse.php deleted file mode 100644 index b0a8719d5b62..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationProfilesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationProfilesResponse - */ -class ListConversationProfilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of project conversation profiles. There is a maximum number - * of items returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationProfile conversation_profiles = 1; - */ - private $conversation_profiles; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\ConversationProfile>|\Google\Protobuf\Internal\RepeatedField $conversation_profiles - * The list of project conversation profiles. There is a maximum number - * of items returned based on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * The list of project conversation profiles. There is a maximum number - * of items returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationProfile conversation_profiles = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConversationProfiles() - { - return $this->conversation_profiles; - } - - /** - * The list of project conversation profiles. There is a maximum number - * of items returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ConversationProfile conversation_profiles = 1; - * @param array<\Google\Cloud\Dialogflow\V2\ConversationProfile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConversationProfiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ConversationProfile::class); - $this->conversation_profiles = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsRequest.php deleted file mode 100644 index a5149e30e401..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsRequest.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationsRequest - */ -class ListConversationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project from which to list all conversation. - * Format: `projects//locations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * A filter expression that filters conversations listed in the response. In - * general, the expression must specify the field name, a comparison operator, - * and the value to use for filtering: - *
    - *
  • The value must be a string, a number, or a boolean.
  • - *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • - *
  • To filter on multiple expressions, separate the - * expressions with `AND` or `OR` (omitting both implies `AND`).
  • - *
  • For clarity, expressions can be enclosed in parentheses.
  • - *
- * Only `lifecycle_state` can be filtered on in this way. For example, - * the following expression only returns `COMPLETED` conversations: - * `lifecycle_state = "COMPLETED"` - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project from which to list all conversation. - * Format: `projects//locations/`. - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * @type string $filter - * A filter expression that filters conversations listed in the response. In - * general, the expression must specify the field name, a comparison operator, - * and the value to use for filtering: - *
    - *
  • The value must be a string, a number, or a boolean.
  • - *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • - *
  • To filter on multiple expressions, separate the - * expressions with `AND` or `OR` (omitting both implies `AND`).
  • - *
  • For clarity, expressions can be enclosed in parentheses.
  • - *
- * Only `lifecycle_state` can be filtered on in this way. For example, - * the following expression only returns `COMPLETED` conversations: - * `lifecycle_state = "COMPLETED"` - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project from which to list all conversation. - * Format: `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 project from which to list all conversation. - * Format: `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; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter expression that filters conversations listed in the response. In - * general, the expression must specify the field name, a comparison operator, - * and the value to use for filtering: - *
    - *
  • The value must be a string, a number, or a boolean.
  • - *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • - *
  • To filter on multiple expressions, separate the - * expressions with `AND` or `OR` (omitting both implies `AND`).
  • - *
  • For clarity, expressions can be enclosed in parentheses.
  • - *
- * Only `lifecycle_state` can be filtered on in this way. For example, - * the following expression only returns `COMPLETED` conversations: - * `lifecycle_state = "COMPLETED"` - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that filters conversations listed in the response. In - * general, the expression must specify the field name, a comparison operator, - * and the value to use for filtering: - *
    - *
  • The value must be a string, a number, or a boolean.
  • - *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • - *
  • To filter on multiple expressions, separate the - * expressions with `AND` or `OR` (omitting both implies `AND`).
  • - *
  • For clarity, expressions can be enclosed in parentheses.
  • - *
- * Only `lifecycle_state` can be filtered on in this way. For example, - * the following expression only returns `COMPLETED` conversations: - * `lifecycle_state = "COMPLETED"` - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsResponse.php deleted file mode 100644 index f4a0679ed9e2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListConversationsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.ListConversationsResponse - */ -class ListConversationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of conversations. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Conversation conversations = 1; - */ - private $conversations; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\Conversation>|\Google\Protobuf\Internal\RepeatedField $conversations - * The list of conversations. There will be a maximum number of items - * returned based on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); - parent::__construct($data); - } - - /** - * The list of conversations. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Conversation conversations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConversations() - { - return $this->conversations; - } - - /** - * The list of conversations. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Conversation conversations = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Conversation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConversations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Conversation::class); - $this->conversations = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsRequest.php deleted file mode 100644 index 95bae4e54d10..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.dialogflow.v2.ListDocumentsRequest - */ -class ListDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The knowledge base to list all documents for. - * Format: `projects//locations//knowledgeBases/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return in a single page. By - * default 10 and at most 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter expression used to filter documents returned by the list method. - * The expression has the following syntax: - * [AND ] ... - * The following fields and operators are supported: - * * knowledge_types with has(:) operator - * * display_name with has(:) operator - * * state with equals(=) operator - * Examples: - * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. - * * "display_name:customer" matches documents whose display name contains - * "customer". - * * "state=ACTIVE" matches documents with ACTIVE state. - * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The knowledge base to list all documents for. - * Format: `projects//locations//knowledgeBases/`. - * @type int $page_size - * The maximum number of items to return in a single page. By - * default 10 and at most 100. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * @type string $filter - * The filter expression used to filter documents returned by the list method. - * The expression has the following syntax: - * [AND ] ... - * The following fields and operators are supported: - * * knowledge_types with has(:) operator - * * display_name with has(:) operator - * * state with equals(=) operator - * Examples: - * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. - * * "display_name:customer" matches documents whose display name contains - * "customer". - * * "state=ACTIVE" matches documents with ACTIVE state. - * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The knowledge base to list all documents for. - * Format: `projects//locations//knowledgeBases/`. - * - * 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 knowledge base to list all documents for. - * Format: `projects//locations//knowledgeBases/`. - * - * 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 items to return in a single page. By - * default 10 and at most 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return in a single page. By - * default 10 and at most 100. - * - * 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 next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous list request. - * - * 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; - } - - /** - * The filter expression used to filter documents returned by the list method. - * The expression has the following syntax: - * [AND ] ... - * The following fields and operators are supported: - * * knowledge_types with has(:) operator - * * display_name with has(:) operator - * * state with equals(=) operator - * Examples: - * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. - * * "display_name:customer" matches documents whose display name contains - * "customer". - * * "state=ACTIVE" matches documents with ACTIVE state. - * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression used to filter documents returned by the list method. - * The expression has the following syntax: - * [AND ] ... - * The following fields and operators are supported: - * * knowledge_types with has(:) operator - * * display_name with has(:) operator - * * state with equals(=) operator - * Examples: - * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. - * * "display_name:customer" matches documents whose display name contains - * "customer". - * * "state=ACTIVE" matches documents with ACTIVE state. - * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsResponse.php deleted file mode 100644 index 101cf40d5b81..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListDocumentsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.v2.ListDocumentsResponse - */ -class ListDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of documents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document documents = 1; - */ - private $documents; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\Document>|\Google\Protobuf\Internal\RepeatedField $documents - * The list of documents. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * The list of documents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document documents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The list of documents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Document documents = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Document>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Document::class); - $this->documents = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesRequest.php deleted file mode 100644 index 186ef5a8d8a7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.dialogflow.v2.ListEntityTypesRequest - */ -class ListEntityTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to list all entity types from. - * Format: `projects//agent`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to list all entity types from. - * Format: `projects//agent`. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to list all entity types from. - * Format: `projects//agent`. - * - * 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 agent to list all entity types from. - * Format: `projects//agent`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesResponse.php deleted file mode 100644 index 766d0263fd6d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEntityTypesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.ListEntityTypesResponse - */ -class ListEntityTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of agent entity types. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; - */ - private $entity_types; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types - * The list of agent entity types. There will be a maximum number of items - * returned based on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * The list of agent entity types. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityTypes() - { - return $this->entity_types; - } - - /** - * The list of agent entity types. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; - * @param array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType::class); - $this->entity_types = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsRequest.php deleted file mode 100644 index 4af5faab4748..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.dialogflow.v2.ListEnvironmentsRequest - */ -class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to list all environments from. - * Format: - * - `projects//agent` - * - `projects//locations//agent` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to list all environments from. - * Format: - * - `projects//agent` - * - `projects//locations//agent` - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to list all environments from. - * Format: - * - `projects//agent` - * - `projects//locations//agent` - * - * 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 agent to list all environments from. - * Format: - * - `projects//agent` - * - `projects//locations//agent` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsResponse.php deleted file mode 100644 index c5fe88b95df4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListEnvironmentsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.ListEnvironmentsResponse - */ -class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of agent environments. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Environment environments = 1; - */ - private $environments; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\Environment>|\Google\Protobuf\Internal\RepeatedField $environments - * The list of agent environments. There will be a maximum number of items - * returned based on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The list of agent environments. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Environment environments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironments() - { - return $this->environments; - } - - /** - * The list of agent environments. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Environment environments = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Environment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Environment::class); - $this->environments = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsRequest.php deleted file mode 100644 index 97a672820707..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsRequest.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.dialogflow.v2.ListIntentsRequest - */ -class ListIntentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to list all intents from. - * Format: `projects//agent` or `projects//locations//agent`. - * Alternatively, you can specify the environment to list intents for. - * Format: `projects//agent/environments/` - * or `projects//locations//agent/environments/`. - * Note: training phrases of the intents will not be returned for non-draft - * environment. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $intent_view = 0; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to list all intents from. - * Format: `projects//agent` or `projects//locations//agent`. - * Alternatively, you can specify the environment to list intents for. - * Format: `projects//agent/environments/` - * or `projects//locations//agent/environments/`. - * Note: training phrases of the intents will not be returned for non-draft - * environment. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type int $intent_view - * Optional. The resource view to apply to the returned intent. - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to list all intents from. - * Format: `projects//agent` or `projects//locations//agent`. - * Alternatively, you can specify the environment to list intents for. - * Format: `projects//agent/environments/` - * or `projects//locations//agent/environments/`. - * Note: training phrases of the intents will not be returned for non-draft - * environment. - * - * 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 agent to list all intents from. - * Format: `projects//agent` or `projects//locations//agent`. - * Alternatively, you can specify the environment to list intents for. - * Format: `projects//agent/environments/` - * or `projects//locations//agent/environments/`. - * Note: training phrases of the intents will not be returned for non-draft - * environment. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIntentView() - { - return $this->intent_view; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIntentView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); - $this->intent_view = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsResponse.php deleted file mode 100644 index 8d1fe4c0ff55..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListIntentsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.ListIntentsResponse - */ -class ListIntentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of agent intents. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; - */ - private $intents; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents - * The list of agent intents. There will be a maximum number of items - * returned based on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * The list of agent intents. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntents() - { - return $this->intents; - } - - /** - * The list of agent intents. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); - $this->intents = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesRequest.php deleted file mode 100644 index feccac125541..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesRequest.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.dialogflow.v2.ListKnowledgeBasesRequest - */ -class ListKnowledgeBasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to list of knowledge bases for. - * Format: `projects//locations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return in a single page. By - * default 10 and at most 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter expression used to filter knowledge bases returned by the list - * method. The expression has the following syntax: - * [AND ] ... - * The following fields and operators are supported: - * * display_name with has(:) operator - * * language_code with equals(=) operator - * Examples: - * * 'language_code=en-us' matches knowledge bases with en-us language code. - * * 'display_name:articles' matches knowledge bases whose display name - * contains "articles". - * * 'display_name:"Best Articles"' matches knowledge bases whose display - * name contains "Best Articles". - * * 'language_code=en-gb AND display_name=articles' matches all knowledge - * bases whose display name contains "articles" and whose language code is - * "en-gb". - * Note: An empty filter string (i.e. "") is a no-op and will result in no - * filtering. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to list of knowledge bases for. - * Format: `projects//locations/`. - * @type int $page_size - * The maximum number of items to return in a single page. By - * default 10 and at most 100. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * @type string $filter - * The filter expression used to filter knowledge bases returned by the list - * method. The expression has the following syntax: - * [AND ] ... - * The following fields and operators are supported: - * * display_name with has(:) operator - * * language_code with equals(=) operator - * Examples: - * * 'language_code=en-us' matches knowledge bases with en-us language code. - * * 'display_name:articles' matches knowledge bases whose display name - * contains "articles". - * * 'display_name:"Best Articles"' matches knowledge bases whose display - * name contains "Best Articles". - * * 'language_code=en-gb AND display_name=articles' matches all knowledge - * bases whose display name contains "articles" and whose language code is - * "en-gb". - * Note: An empty filter string (i.e. "") is a no-op and will result in no - * filtering. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to list of knowledge bases for. - * Format: `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 project to list of knowledge bases for. - * Format: `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; - } - - /** - * The maximum number of items to return in a single page. By - * default 10 and at most 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return in a single page. By - * default 10 and at most 100. - * - * 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 next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous list request. - * - * 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; - } - - /** - * The filter expression used to filter knowledge bases returned by the list - * method. The expression has the following syntax: - * [AND ] ... - * The following fields and operators are supported: - * * display_name with has(:) operator - * * language_code with equals(=) operator - * Examples: - * * 'language_code=en-us' matches knowledge bases with en-us language code. - * * 'display_name:articles' matches knowledge bases whose display name - * contains "articles". - * * 'display_name:"Best Articles"' matches knowledge bases whose display - * name contains "Best Articles". - * * 'language_code=en-gb AND display_name=articles' matches all knowledge - * bases whose display name contains "articles" and whose language code is - * "en-gb". - * Note: An empty filter string (i.e. "") is a no-op and will result in no - * filtering. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression used to filter knowledge bases returned by the list - * method. The expression has the following syntax: - * [AND ] ... - * The following fields and operators are supported: - * * display_name with has(:) operator - * * language_code with equals(=) operator - * Examples: - * * 'language_code=en-us' matches knowledge bases with en-us language code. - * * 'display_name:articles' matches knowledge bases whose display name - * contains "articles". - * * 'display_name:"Best Articles"' matches knowledge bases whose display - * name contains "Best Articles". - * * 'language_code=en-gb AND display_name=articles' matches all knowledge - * bases whose display name contains "articles" and whose language code is - * "en-gb". - * Note: An empty filter string (i.e. "") is a no-op and will result in no - * filtering. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesResponse.php deleted file mode 100644 index 89838ab5d1fa..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListKnowledgeBasesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.v2.ListKnowledgeBasesResponse - */ -class ListKnowledgeBasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of knowledge bases. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.KnowledgeBase knowledge_bases = 1; - */ - private $knowledge_bases; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $knowledge_bases - * The list of knowledge bases. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); - parent::__construct($data); - } - - /** - * The list of knowledge bases. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.KnowledgeBase knowledge_bases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKnowledgeBases() - { - return $this->knowledge_bases; - } - - /** - * The list of knowledge bases. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.KnowledgeBase knowledge_bases = 1; - * @param array<\Google\Cloud\Dialogflow\V2\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKnowledgeBases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\KnowledgeBase::class); - $this->knowledge_bases = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesRequest.php deleted file mode 100644 index b3b91312218f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.dialogflow.v2.ListMessagesRequest - */ -class ListMessagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the conversation to list messages for. - * Format: `projects//locations//conversations/` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Filter on message fields. Currently predicates on `create_time` - * and `create_time_epoch_microseconds` are supported. `create_time` only - * support milliseconds accuracy. E.g., - * `create_time_epoch_microseconds > 1551790877964485` or - * `create_time > 2017-01-15T01:30:15.01Z`. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the conversation to list messages for. - * Format: `projects//locations//conversations/` - * @type string $filter - * Optional. Filter on message fields. Currently predicates on `create_time` - * and `create_time_epoch_microseconds` are supported. `create_time` only - * support milliseconds accuracy. E.g., - * `create_time_epoch_microseconds > 1551790877964485` or - * `create_time > 2017-01-15T01:30:15.01Z`. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the conversation to list messages for. - * Format: `projects//locations//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 name of the conversation to list messages for. - * Format: `projects//locations//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; - } - - /** - * Optional. Filter on message fields. Currently predicates on `create_time` - * and `create_time_epoch_microseconds` are supported. `create_time` only - * support milliseconds accuracy. E.g., - * `create_time_epoch_microseconds > 1551790877964485` or - * `create_time > 2017-01-15T01:30:15.01Z`. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter on message fields. Currently predicates on `create_time` - * and `create_time_epoch_microseconds` are supported. `create_time` only - * support milliseconds accuracy. E.g., - * `create_time_epoch_microseconds > 1551790877964485` or - * `create_time > 2017-01-15T01:30:15.01Z`. - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesResponse.php deleted file mode 100644 index 694488dc89b7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListMessagesResponse.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dialogflow.v2.ListMessagesResponse - */ -class ListMessagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of messages. There will be a maximum number of items - * returned based on the page_size field in the request. - * `messages` is sorted by `create_time` in descending order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Message messages = 1; - */ - private $messages; - /** - * Token to retrieve the next page of results, or empty if there are - * no more results in the list. - * - * 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\Dialogflow\V2\Message>|\Google\Protobuf\Internal\RepeatedField $messages - * The list of messages. There will be a maximum number of items - * returned based on the page_size field in the request. - * `messages` is sorted by `create_time` in descending order. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are - * no more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); - parent::__construct($data); - } - - /** - * The list of messages. There will be a maximum number of items - * returned based on the page_size field in the request. - * `messages` is sorted by `create_time` in descending order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Message messages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessages() - { - return $this->messages; - } - - /** - * The list of messages. There will be a maximum number of items - * returned based on the page_size field in the request. - * `messages` is sorted by `create_time` in descending order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Message messages = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Message>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Message::class); - $this->messages = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are - * no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are - * no more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsRequest.php deleted file mode 100644 index 3e73d207bed6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsRequest.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dialogflow.v2.ListParticipantsRequest - */ -class ListParticipantsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation to list all participants from. - * Format: `projects//locations//conversations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The conversation to list all participants from. - * Format: `projects//locations//conversations/`. - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation to list all participants from. - * Format: `projects//locations//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 conversation to list all participants from. - * Format: `projects//locations//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; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsResponse.php deleted file mode 100644 index 800b88ac62f5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListParticipantsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.ListParticipantsResponse - */ -class ListParticipantsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of participants. There is a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Participant participants = 1; - */ - private $participants; - /** - * Token to retrieve the next page of results or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\Participant>|\Google\Protobuf\Internal\RepeatedField $participants - * The list of participants. There is a maximum number of items - * returned based on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * The list of participants. There is a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Participant participants = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParticipants() - { - return $this->participants; - } - - /** - * The list of participants. There is a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Participant participants = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Participant>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParticipants($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Participant::class); - $this->participants = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesRequest.php deleted file mode 100644 index edbd9cc7fd7b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.dialogflow.v2.ListSessionEntityTypesRequest - */ -class ListSessionEntityTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The session to list all session entity types from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The session to list all session entity types from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The session to list all session entity types from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * 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 session to list all session entity types from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesResponse.php deleted file mode 100644 index 87ea45ce09d7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListSessionEntityTypesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.ListSessionEntityTypesResponse - */ -class ListSessionEntityTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of session entity types. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 1; - */ - private $session_entity_types; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $session_entity_types - * The list of session entity types. There will be a maximum number of items - * returned based on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * The list of session entity types. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSessionEntityTypes() - { - return $this->session_entity_types; - } - - /** - * The list of session entity types. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 1; - * @param array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSessionEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); - $this->session_entity_types = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsRequest.php deleted file mode 100644 index f504dadfa7f8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.dialogflow.v2.ListVersionsRequest - */ -class ListVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to list all versions from. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to list all versions from. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to list all versions from. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * - * 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 agent to list all versions from. - * Supported formats: - * - `projects//agent` - * - `projects//locations//agent` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsResponse.php deleted file mode 100644 index 653aa7dedfdc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ListVersionsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.ListVersionsResponse - */ -class ListVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of agent versions. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Version versions = 1; - */ - private $versions; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\Version>|\Google\Protobuf\Internal\RepeatedField $versions - * The list of agent versions. There will be a maximum number of items - * returned based on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); - parent::__construct($data); - } - - /** - * The list of agent versions. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Version versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersions() - { - return $this->versions; - } - - /** - * The list of agent versions. There will be a maximum number of items - * returned based on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Version versions = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Version>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Version::class); - $this->versions = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/LoggingConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/LoggingConfig.php deleted file mode 100644 index 31121f0f3ed8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/LoggingConfig.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.dialogflow.v2.LoggingConfig - */ -class LoggingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether to log conversation events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] - * to Stackdriver in the conversation project as JSON format - * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - * - * Generated from protobuf field bool enable_stackdriver_logging = 3; - */ - protected $enable_stackdriver_logging = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_stackdriver_logging - * Whether to log conversation events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] - * to Stackdriver in the conversation project as JSON format - * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Whether to log conversation events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] - * to Stackdriver in the conversation project as JSON format - * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - * - * Generated from protobuf field bool enable_stackdriver_logging = 3; - * @return bool - */ - public function getEnableStackdriverLogging() - { - return $this->enable_stackdriver_logging; - } - - /** - * Whether to log conversation events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] - * to Stackdriver in the conversation project as JSON format - * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - * - * Generated from protobuf field bool enable_stackdriver_logging = 3; - * @param bool $var - * @return $this - */ - public function setEnableStackdriverLogging($var) - { - GPBUtil::checkBool($var); - $this->enable_stackdriver_logging = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Message.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Message.php deleted file mode 100644 index a176cd042024..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Message.php +++ /dev/null @@ -1,395 +0,0 @@ -google.cloud.dialogflow.v2.Message - */ -class Message extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique identifier of the message. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Required. The message content. - * - * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $content = ''; - /** - * Optional. The message language. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Output only. The participant that sends this message. - * - * Generated from protobuf field string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $participant = ''; - /** - * Output only. The role of the participant. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $participant_role = 0; - /** - * Output only. The time when the message was created in Contact Center AI. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Optional. The time when the message was sent. - * - * Generated from protobuf field .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $send_time = null; - /** - * Output only. The annotation for the message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message_annotation = null; - /** - * Output only. The sentiment analysis result for the message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sentiment_analysis = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. The unique identifier of the message. - * Format: `projects//locations//conversations//messages/`. - * @type string $content - * Required. The message content. - * @type string $language_code - * Optional. The message language. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * @type string $participant - * Output only. The participant that sends this message. - * @type int $participant_role - * Output only. The role of the participant. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the message was created in Contact Center AI. - * @type \Google\Protobuf\Timestamp $send_time - * Optional. The time when the message was sent. - * @type \Google\Cloud\Dialogflow\V2\MessageAnnotation $message_annotation - * Output only. The annotation for the message. - * @type \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult $sentiment_analysis - * Output only. The sentiment analysis result for the message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique identifier of the message. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. The unique identifier of the message. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The message content. - * - * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Required. The message content. - * - * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * Optional. The message language. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The message language. - * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag. Example: "en-US". - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Output only. The participant that sends this message. - * - * Generated from protobuf field string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getParticipant() - { - return $this->participant; - } - - /** - * Output only. The participant that sends this message. - * - * Generated from protobuf field string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setParticipant($var) - { - GPBUtil::checkString($var, True); - $this->participant = $var; - - return $this; - } - - /** - * Output only. The role of the participant. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getParticipantRole() - { - return $this->participant_role; - } - - /** - * Output only. The role of the participant. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setParticipantRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); - $this->participant_role = $var; - - return $this; - } - - /** - * Output only. The time when the message was created in Contact Center AI. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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 when the message was created in Contact Center AI. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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; - } - - /** - * Optional. The time when the message was sent. - * - * Generated from protobuf field .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSendTime() - { - return $this->send_time; - } - - public function hasSendTime() - { - return isset($this->send_time); - } - - public function clearSendTime() - { - unset($this->send_time); - } - - /** - * Optional. The time when the message was sent. - * - * Generated from protobuf field .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSendTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->send_time = $var; - - return $this; - } - - /** - * Output only. The annotation for the message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\MessageAnnotation|null - */ - public function getMessageAnnotation() - { - return $this->message_annotation; - } - - public function hasMessageAnnotation() - { - return isset($this->message_annotation); - } - - public function clearMessageAnnotation() - { - unset($this->message_annotation); - } - - /** - * Output only. The annotation for the message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\MessageAnnotation $var - * @return $this - */ - public function setMessageAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\MessageAnnotation::class); - $this->message_annotation = $var; - - return $this; - } - - /** - * Output only. The sentiment analysis result for the message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult|null - */ - public function getSentimentAnalysis() - { - return $this->sentiment_analysis; - } - - public function hasSentimentAnalysis() - { - return isset($this->sentiment_analysis); - } - - public function clearSentimentAnalysis() - { - unset($this->sentiment_analysis); - } - - /** - * Output only. The sentiment analysis result for the message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult $var - * @return $this - */ - public function setSentimentAnalysis($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult::class); - $this->sentiment_analysis = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/MessageAnnotation.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/MessageAnnotation.php deleted file mode 100644 index d1860e5293c1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/MessageAnnotation.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.dialogflow.v2.MessageAnnotation - */ -class MessageAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The collection of annotated message parts ordered by their - * position in the message. You can recover the annotated message by - * concatenating [AnnotatedMessagePart.text]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnnotatedMessagePart parts = 1; - */ - private $parts; - /** - * Indicates whether the text message contains entities. - * - * Generated from protobuf field bool contain_entities = 2; - */ - protected $contain_entities = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\AnnotatedMessagePart>|\Google\Protobuf\Internal\RepeatedField $parts - * The collection of annotated message parts ordered by their - * position in the message. You can recover the annotated message by - * concatenating [AnnotatedMessagePart.text]. - * @type bool $contain_entities - * Indicates whether the text message contains entities. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * The collection of annotated message parts ordered by their - * position in the message. You can recover the annotated message by - * concatenating [AnnotatedMessagePart.text]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnnotatedMessagePart parts = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParts() - { - return $this->parts; - } - - /** - * The collection of annotated message parts ordered by their - * position in the message. You can recover the annotated message by - * concatenating [AnnotatedMessagePart.text]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.AnnotatedMessagePart parts = 1; - * @param array<\Google\Cloud\Dialogflow\V2\AnnotatedMessagePart>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\AnnotatedMessagePart::class); - $this->parts = $arr; - - return $this; - } - - /** - * Indicates whether the text message contains entities. - * - * Generated from protobuf field bool contain_entities = 2; - * @return bool - */ - public function getContainEntities() - { - return $this->contain_entities; - } - - /** - * Indicates whether the text message contains entities. - * - * Generated from protobuf field bool contain_entities = 2; - * @param bool $var - * @return $this - */ - public function setContainEntities($var) - { - GPBUtil::checkBool($var); - $this->contain_entities = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig.php deleted file mode 100644 index f096ff33fdbb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.dialogflow.v2.NotificationConfig - */ -class NotificationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the Pub/Sub topic to publish conversation - * events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] - * as serialized - * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - * For telephony integration to receive notification, make sure either this - * topic is in the same project as the conversation or you grant - * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service - * Agent` role in the topic project. - * For chat integration to receive notification, make sure API caller has been - * granted the `Dialogflow Service Agent` role for the topic. - * Format: `projects//locations//topics/`. - * - * Generated from protobuf field string topic = 1; - */ - protected $topic = ''; - /** - * Format of message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig.MessageFormat message_format = 2; - */ - protected $message_format = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $topic - * Name of the Pub/Sub topic to publish conversation - * events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] - * as serialized - * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - * For telephony integration to receive notification, make sure either this - * topic is in the same project as the conversation or you grant - * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service - * Agent` role in the topic project. - * For chat integration to receive notification, make sure API caller has been - * granted the `Dialogflow Service Agent` role for the topic. - * Format: `projects//locations//topics/`. - * @type int $message_format - * Format of message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Name of the Pub/Sub topic to publish conversation - * events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] - * as serialized - * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - * For telephony integration to receive notification, make sure either this - * topic is in the same project as the conversation or you grant - * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service - * Agent` role in the topic project. - * For chat integration to receive notification, make sure API caller has been - * granted the `Dialogflow Service Agent` role for the topic. - * Format: `projects//locations//topics/`. - * - * Generated from protobuf field string topic = 1; - * @return string - */ - public function getTopic() - { - return $this->topic; - } - - /** - * Name of the Pub/Sub topic to publish conversation - * events like - * [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] - * as serialized - * [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - * For telephony integration to receive notification, make sure either this - * topic is in the same project as the conversation or you grant - * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service - * Agent` role in the topic project. - * For chat integration to receive notification, make sure API caller has been - * granted the `Dialogflow Service Agent` role for the topic. - * Format: `projects//locations//topics/`. - * - * Generated from protobuf field string topic = 1; - * @param string $var - * @return $this - */ - public function setTopic($var) - { - GPBUtil::checkString($var, True); - $this->topic = $var; - - return $this; - } - - /** - * Format of message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig.MessageFormat message_format = 2; - * @return int - */ - public function getMessageFormat() - { - return $this->message_format; - } - - /** - * Format of message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.NotificationConfig.MessageFormat message_format = 2; - * @param int $var - * @return $this - */ - public function setMessageFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\NotificationConfig\MessageFormat::class); - $this->message_format = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig/MessageFormat.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig/MessageFormat.php deleted file mode 100644 index fac3e1d43f9f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig/MessageFormat.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.v2.NotificationConfig.MessageFormat - */ -class MessageFormat -{ - /** - * If it is unspecified, PROTO will be used. - * - * Generated from protobuf enum MESSAGE_FORMAT_UNSPECIFIED = 0; - */ - const MESSAGE_FORMAT_UNSPECIFIED = 0; - /** - * Pub/Sub message will be serialized proto. - * - * Generated from protobuf enum PROTO = 1; - */ - const PROTO = 1; - /** - * Pub/Sub message will be json. - * - * Generated from protobuf enum JSON = 2; - */ - const JSON = 2; - - private static $valueToName = [ - self::MESSAGE_FORMAT_UNSPECIFIED => 'MESSAGE_FORMAT_UNSPECIFIED', - self::PROTO => 'PROTO', - self::JSON => 'JSON', - ]; - - 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(MessageFormat::class, \Google\Cloud\Dialogflow\V2\NotificationConfig_MessageFormat::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig_MessageFormat.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig_MessageFormat.php deleted file mode 100644 index 01f902a2b7e3..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/NotificationConfig_MessageFormat.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.OriginalDetectIntentRequest - */ -class OriginalDetectIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The source of this request, e.g., `google`, `facebook`, `slack`. It is set - * by Dialogflow-owned servers. - * - * Generated from protobuf field string source = 1; - */ - protected $source = ''; - /** - * Optional. The version of the protocol used for this request. - * This field is AoG-specific. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - /** - * Optional. This field is set to the value of the `QueryParameters.payload` - * field passed in the request. Some integrations that query a Dialogflow - * agent may provide additional information in the payload. - * In particular, for the Dialogflow Phone Gateway integration, this field has - * the form: - *
{
-     *  "telephony": {
-     *    "caller_id": "+18558363987"
-     *  }
-     * }
- * Note: The caller ID field (`caller_id`) will be redacted for Trial - * Edition agents and populated with the caller ID in [E.164 - * format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. - * - * Generated from protobuf field .google.protobuf.Struct payload = 3; - */ - protected $payload = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source - * The source of this request, e.g., `google`, `facebook`, `slack`. It is set - * by Dialogflow-owned servers. - * @type string $version - * Optional. The version of the protocol used for this request. - * This field is AoG-specific. - * @type \Google\Protobuf\Struct $payload - * Optional. This field is set to the value of the `QueryParameters.payload` - * field passed in the request. Some integrations that query a Dialogflow - * agent may provide additional information in the payload. - * In particular, for the Dialogflow Phone Gateway integration, this field has - * the form: - *
{
-     *            "telephony": {
-     *              "caller_id": "+18558363987"
-     *            }
-     *           }
- * Note: The caller ID field (`caller_id`) will be redacted for Trial - * Edition agents and populated with the caller ID in [E.164 - * format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * The source of this request, e.g., `google`, `facebook`, `slack`. It is set - * by Dialogflow-owned servers. - * - * Generated from protobuf field string source = 1; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * The source of this request, e.g., `google`, `facebook`, `slack`. It is set - * by Dialogflow-owned servers. - * - * Generated from protobuf field string source = 1; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * Optional. The version of the protocol used for this request. - * This field is AoG-specific. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The version of the protocol used for this request. - * This field is AoG-specific. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. This field is set to the value of the `QueryParameters.payload` - * field passed in the request. Some integrations that query a Dialogflow - * agent may provide additional information in the payload. - * In particular, for the Dialogflow Phone Gateway integration, this field has - * the form: - *
{
-     *  "telephony": {
-     *    "caller_id": "+18558363987"
-     *  }
-     * }
- * Note: The caller ID field (`caller_id`) will be redacted for Trial - * Edition agents and populated with the caller ID in [E.164 - * format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. - * - * Generated from protobuf field .google.protobuf.Struct payload = 3; - * @return \Google\Protobuf\Struct|null - */ - public function getPayload() - { - return $this->payload; - } - - public function hasPayload() - { - return isset($this->payload); - } - - public function clearPayload() - { - unset($this->payload); - } - - /** - * Optional. This field is set to the value of the `QueryParameters.payload` - * field passed in the request. Some integrations that query a Dialogflow - * agent may provide additional information in the payload. - * In particular, for the Dialogflow Phone Gateway integration, this field has - * the form: - *
{
-     *  "telephony": {
-     *    "caller_id": "+18558363987"
-     *  }
-     * }
- * Note: The caller ID field (`caller_id`) will be redacted for Trial - * Edition agents and populated with the caller ID in [E.164 - * format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. - * - * Generated from protobuf field .google.protobuf.Struct payload = 3; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->payload = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudio.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudio.php deleted file mode 100644 index 33828b7f28cb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudio.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.dialogflow.v2.OutputAudio - */ -class OutputAudio extends \Google\Protobuf\Internal\Message -{ - /** - * Instructs the speech synthesizer how to generate the speech - * audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig config = 1; - */ - protected $config = null; - /** - * The natural language speech audio. - * - * Generated from protobuf field bytes audio = 2; - */ - protected $audio = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $config - * Instructs the speech synthesizer how to generate the speech - * audio. - * @type string $audio - * The natural language speech audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Instructs the speech synthesizer how to generate the speech - * audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig config = 1; - * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Instructs the speech synthesizer how to generate the speech - * audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig config = 1; - * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); - $this->config = $var; - - return $this; - } - - /** - * The natural language speech audio. - * - * Generated from protobuf field bytes audio = 2; - * @return string - */ - public function getAudio() - { - return $this->audio; - } - - /** - * The natural language speech audio. - * - * Generated from protobuf field bytes audio = 2; - * @param string $var - * @return $this - */ - public function setAudio($var) - { - GPBUtil::checkString($var, False); - $this->audio = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioConfig.php deleted file mode 100644 index 0380436645b2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioConfig.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.dialogflow.v2.OutputAudioConfig - */ -class OutputAudioConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Audio encoding of the synthesized audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audio_encoding = 0; - /** - * The synthesis sample rate (in hertz) for this audio. If not - * provided, then the synthesizer will use the default sample rate based on - * the audio encoding. If this is different from the voice's natural sample - * rate, then the synthesizer will honor this request by converting to the - * desired sample rate (which might result in worse audio quality). - * - * Generated from protobuf field int32 sample_rate_hertz = 2; - */ - protected $sample_rate_hertz = 0; - /** - * Configuration of how speech should be synthesized. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3; - */ - protected $synthesize_speech_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $audio_encoding - * Required. Audio encoding of the synthesized audio content. - * @type int $sample_rate_hertz - * The synthesis sample rate (in hertz) for this audio. If not - * provided, then the synthesizer will use the default sample rate based on - * the audio encoding. If this is different from the voice's natural sample - * rate, then the synthesizer will honor this request by converting to the - * desired sample rate (which might result in worse audio quality). - * @type \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig $synthesize_speech_config - * Configuration of how speech should be synthesized. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. Audio encoding of the synthesized audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAudioEncoding() - { - return $this->audio_encoding; - } - - /** - * Required. Audio encoding of the synthesized audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAudioEncoding($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\OutputAudioEncoding::class); - $this->audio_encoding = $var; - - return $this; - } - - /** - * The synthesis sample rate (in hertz) for this audio. If not - * provided, then the synthesizer will use the default sample rate based on - * the audio encoding. If this is different from the voice's natural sample - * rate, then the synthesizer will honor this request by converting to the - * desired sample rate (which might result in worse audio quality). - * - * Generated from protobuf field int32 sample_rate_hertz = 2; - * @return int - */ - public function getSampleRateHertz() - { - return $this->sample_rate_hertz; - } - - /** - * The synthesis sample rate (in hertz) for this audio. If not - * provided, then the synthesizer will use the default sample rate based on - * the audio encoding. If this is different from the voice's natural sample - * rate, then the synthesizer will honor this request by converting to the - * desired sample rate (which might result in worse audio quality). - * - * Generated from protobuf field int32 sample_rate_hertz = 2; - * @param int $var - * @return $this - */ - public function setSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->sample_rate_hertz = $var; - - return $this; - } - - /** - * Configuration of how speech should be synthesized. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3; - * @return \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig|null - */ - public function getSynthesizeSpeechConfig() - { - return $this->synthesize_speech_config; - } - - public function hasSynthesizeSpeechConfig() - { - return isset($this->synthesize_speech_config); - } - - public function clearSynthesizeSpeechConfig() - { - unset($this->synthesize_speech_config); - } - - /** - * Configuration of how speech should be synthesized. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3; - * @param \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig $var - * @return $this - */ - public function setSynthesizeSpeechConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig::class); - $this->synthesize_speech_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioEncoding.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioEncoding.php deleted file mode 100644 index b8821bce4def..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/OutputAudioEncoding.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dialogflow.v2.OutputAudioEncoding - */ -class OutputAudioEncoding -{ - /** - * Not specified. - * - * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; - */ - const OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; - /** - * Uncompressed 16-bit signed little-endian samples (Linear PCM). - * Audio content returned as LINEAR16 also contains a WAV header. - * - * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; - */ - const OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; - /** - * MP3 audio at 32kbps. - * - * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_MP3 = 2; - */ - const OUTPUT_AUDIO_ENCODING_MP3 = 2; - /** - * MP3 audio at 64kbps. - * - * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; - */ - const OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; - /** - * Opus encoded audio wrapped in an ogg container. The result will be a - * file which can be played natively on Android, and in browsers (at least - * Chrome and Firefox). The quality of the encoding is considerably higher - * than MP3 while using approximately the same bitrate. - * - * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; - */ - const OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; - /** - * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - * - * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_MULAW = 5; - */ - const OUTPUT_AUDIO_ENCODING_MULAW = 5; - - private static $valueToName = [ - self::OUTPUT_AUDIO_ENCODING_UNSPECIFIED => 'OUTPUT_AUDIO_ENCODING_UNSPECIFIED', - self::OUTPUT_AUDIO_ENCODING_LINEAR_16 => 'OUTPUT_AUDIO_ENCODING_LINEAR_16', - self::OUTPUT_AUDIO_ENCODING_MP3 => 'OUTPUT_AUDIO_ENCODING_MP3', - self::OUTPUT_AUDIO_ENCODING_MP3_64_KBPS => 'OUTPUT_AUDIO_ENCODING_MP3_64_KBPS', - self::OUTPUT_AUDIO_ENCODING_OGG_OPUS => 'OUTPUT_AUDIO_ENCODING_OGG_OPUS', - self::OUTPUT_AUDIO_ENCODING_MULAW => 'OUTPUT_AUDIO_ENCODING_MULAW', - ]; - - 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant.php deleted file mode 100644 index a569536d5160..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant.php +++ /dev/null @@ -1,387 +0,0 @@ -google.cloud.dialogflow.v2.Participant - */ -class Participant extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique identifier of this participant. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Immutable. The role this participant plays in the conversation. This field - * must be set during participant creation and is then immutable. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $role = 0; - /** - * Optional. Label applied to streams representing this participant in SIPREC - * XML metadata and SDP. This is used to assign transcriptions from that - * media stream to this participant. This field can be updated. - * - * Generated from protobuf field string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sip_recording_media_label = ''; - /** - * Optional. Obfuscated user id that should be associated with the created - * participant. - * You can specify a user id as follows: - * 1. If you set this field in - * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] - * or - * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], - * Dialogflow adds the obfuscated user id with the participant. - * 2. If you set this field in - * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] - * or - * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], - * Dialogflow will update - * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. - * Dialogflow returns an error if you try to add a user id for a - * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] - * participant. - * Dialogflow uses this user id for billing and measurement purposes. For - * example, Dialogflow determines whether a user in one conversation returned - * in a later conversation. - * Note: - * * Please never pass raw user ids to Dialogflow. Always obfuscate your user - * id first. - * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a - * hash function like SHA-512. - * * The length of the user id must be <= 256 characters. - * - * Generated from protobuf field string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $obfuscated_external_user_id = ''; - /** - * Optional. Key-value filters on the metadata of documents returned by - * article suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their - * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple - * values for a metadata key should be concatenated by comma. For example, - * filters to match all documents that have 'US' or 'CA' in their market - * metadata values and 'agent' in their user metadata values will be - * ``` - * documents_metadata_filters { - * key: "market" - * value: "US,CA" - * } - * documents_metadata_filters { - * key: "user" - * value: "agent" - * } - * ``` - * - * Generated from protobuf field map documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $documents_metadata_filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. The unique identifier of this participant. - * Format: `projects//locations//conversations//participants/`. - * @type int $role - * Immutable. The role this participant plays in the conversation. This field - * must be set during participant creation and is then immutable. - * @type string $sip_recording_media_label - * Optional. Label applied to streams representing this participant in SIPREC - * XML metadata and SDP. This is used to assign transcriptions from that - * media stream to this participant. This field can be updated. - * @type string $obfuscated_external_user_id - * Optional. Obfuscated user id that should be associated with the created - * participant. - * You can specify a user id as follows: - * 1. If you set this field in - * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] - * or - * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], - * Dialogflow adds the obfuscated user id with the participant. - * 2. If you set this field in - * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] - * or - * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], - * Dialogflow will update - * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. - * Dialogflow returns an error if you try to add a user id for a - * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] - * participant. - * Dialogflow uses this user id for billing and measurement purposes. For - * example, Dialogflow determines whether a user in one conversation returned - * in a later conversation. - * Note: - * * Please never pass raw user ids to Dialogflow. Always obfuscate your user - * id first. - * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a - * hash function like SHA-512. - * * The length of the user id must be <= 256 characters. - * @type array|\Google\Protobuf\Internal\MapField $documents_metadata_filters - * Optional. Key-value filters on the metadata of documents returned by - * article suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their - * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple - * values for a metadata key should be concatenated by comma. For example, - * filters to match all documents that have 'US' or 'CA' in their market - * metadata values and 'agent' in their user metadata values will be - * ``` - * documents_metadata_filters { - * key: "market" - * value: "US,CA" - * } - * documents_metadata_filters { - * key: "user" - * value: "agent" - * } - * ``` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique identifier of this participant. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. The unique identifier of this participant. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. The role this participant plays in the conversation. This field - * must be set during participant creation and is then immutable. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getRole() - { - return $this->role; - } - - /** - * Immutable. The role this participant plays in the conversation. This field - * must be set during participant creation and is then immutable. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); - $this->role = $var; - - return $this; - } - - /** - * Optional. Label applied to streams representing this participant in SIPREC - * XML metadata and SDP. This is used to assign transcriptions from that - * media stream to this participant. This field can be updated. - * - * Generated from protobuf field string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSipRecordingMediaLabel() - { - return $this->sip_recording_media_label; - } - - /** - * Optional. Label applied to streams representing this participant in SIPREC - * XML metadata and SDP. This is used to assign transcriptions from that - * media stream to this participant. This field can be updated. - * - * Generated from protobuf field string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSipRecordingMediaLabel($var) - { - GPBUtil::checkString($var, True); - $this->sip_recording_media_label = $var; - - return $this; - } - - /** - * Optional. Obfuscated user id that should be associated with the created - * participant. - * You can specify a user id as follows: - * 1. If you set this field in - * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] - * or - * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], - * Dialogflow adds the obfuscated user id with the participant. - * 2. If you set this field in - * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] - * or - * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], - * Dialogflow will update - * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. - * Dialogflow returns an error if you try to add a user id for a - * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] - * participant. - * Dialogflow uses this user id for billing and measurement purposes. For - * example, Dialogflow determines whether a user in one conversation returned - * in a later conversation. - * Note: - * * Please never pass raw user ids to Dialogflow. Always obfuscate your user - * id first. - * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a - * hash function like SHA-512. - * * The length of the user id must be <= 256 characters. - * - * Generated from protobuf field string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getObfuscatedExternalUserId() - { - return $this->obfuscated_external_user_id; - } - - /** - * Optional. Obfuscated user id that should be associated with the created - * participant. - * You can specify a user id as follows: - * 1. If you set this field in - * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] - * or - * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], - * Dialogflow adds the obfuscated user id with the participant. - * 2. If you set this field in - * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] - * or - * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], - * Dialogflow will update - * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. - * Dialogflow returns an error if you try to add a user id for a - * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] - * participant. - * Dialogflow uses this user id for billing and measurement purposes. For - * example, Dialogflow determines whether a user in one conversation returned - * in a later conversation. - * Note: - * * Please never pass raw user ids to Dialogflow. Always obfuscate your user - * id first. - * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a - * hash function like SHA-512. - * * The length of the user id must be <= 256 characters. - * - * Generated from protobuf field string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setObfuscatedExternalUserId($var) - { - GPBUtil::checkString($var, True); - $this->obfuscated_external_user_id = $var; - - return $this; - } - - /** - * Optional. Key-value filters on the metadata of documents returned by - * article suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their - * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple - * values for a metadata key should be concatenated by comma. For example, - * filters to match all documents that have 'US' or 'CA' in their market - * metadata values and 'agent' in their user metadata values will be - * ``` - * documents_metadata_filters { - * key: "market" - * value: "US,CA" - * } - * documents_metadata_filters { - * key: "user" - * value: "agent" - * } - * ``` - * - * Generated from protobuf field map documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDocumentsMetadataFilters() - { - return $this->documents_metadata_filters; - } - - /** - * Optional. Key-value filters on the metadata of documents returned by - * article suggestion. If specified, article suggestion only returns suggested - * documents that match all filters in their - * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple - * values for a metadata key should be concatenated by comma. For example, - * filters to match all documents that have 'US' or 'CA' in their market - * metadata values and 'agent' in their user metadata values will be - * ``` - * documents_metadata_filters { - * key: "market" - * value: "US,CA" - * } - * documents_metadata_filters { - * key: "user" - * value: "agent" - * } - * ``` - * - * Generated from protobuf field map documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDocumentsMetadataFilters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents_metadata_filters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant/Role.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant/Role.php deleted file mode 100644 index f2fe378e35fe..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant/Role.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.Participant.Role - */ -class Role -{ - /** - * Participant role 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, such as a Dialogflow agent. - * - * Generated from protobuf enum AUTOMATED_AGENT = 2; - */ - const AUTOMATED_AGENT = 2; - /** - * Participant is an end user that has called or chatted with - * Dialogflow services. - * - * Generated from protobuf enum END_USER = 3; - */ - const END_USER = 3; - - private static $valueToName = [ - self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', - self::HUMAN_AGENT => 'HUMAN_AGENT', - self::AUTOMATED_AGENT => 'AUTOMATED_AGENT', - self::END_USER => 'END_USER', - ]; - - 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\Dialogflow\V2\Participant_Role::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant_Role.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant_Role.php deleted file mode 100644 index 7f777a48eb17..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Participant_Role.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Participants/CreateParticipant', - $argument, - ['\Google\Cloud\Dialogflow\V2\Participant', 'decode'], - $metadata, $options); - } - - /** - * Retrieves a conversation participant. - * @param \Google\Cloud\Dialogflow\V2\GetParticipantRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetParticipant(\Google\Cloud\Dialogflow\V2\GetParticipantRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/GetParticipant', - $argument, - ['\Google\Cloud\Dialogflow\V2\Participant', 'decode'], - $metadata, $options); - } - - /** - * Returns the list of all participants in the specified conversation. - * @param \Google\Cloud\Dialogflow\V2\ListParticipantsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListParticipants(\Google\Cloud\Dialogflow\V2\ListParticipantsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/ListParticipants', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListParticipantsResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified participant. - * @param \Google\Cloud\Dialogflow\V2\UpdateParticipantRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateParticipant(\Google\Cloud\Dialogflow\V2\UpdateParticipantRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/UpdateParticipant', - $argument, - ['\Google\Cloud\Dialogflow\V2\Participant', 'decode'], - $metadata, $options); - } - - /** - * Adds a text (chat, for example), or audio (phone recording, for example) - * message from a participant into the conversation. - * - * Note: Always use agent versions for production traffic - * sent to virtual agents. See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * @param \Google\Cloud\Dialogflow\V2\AnalyzeContentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AnalyzeContent(\Google\Cloud\Dialogflow\V2\AnalyzeContentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/AnalyzeContent', - $argument, - ['\Google\Cloud\Dialogflow\V2\AnalyzeContentResponse', 'decode'], - $metadata, $options); - } - - /** - * Adds a text (chat, for example), or audio (phone recording, for example) - * message from a participant into the conversation. - * Note: This method is only available through the gRPC API (not REST). - * - * The top-level message sent to the client by the server is - * `StreamingAnalyzeContentResponse`. Multiple response messages can be - * returned in order. The first one or more messages contain the - * `recognition_result` field. Each result represents a more complete - * transcript of what the user said. The next message contains the - * `reply_text` field and potentially the `reply_audio` field. The message can - * also contain the `automated_agent_reply` field. - * - * Note: Always use agent versions for production traffic - * sent to virtual agents. See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\BidiStreamingCall - */ - public function StreamingAnalyzeContent($metadata = [], $options = []) { - return $this->_bidiRequest('/google.cloud.dialogflow.v2.Participants/StreamingAnalyzeContent', - ['\Google\Cloud\Dialogflow\V2\StreamingAnalyzeContentResponse','decode'], - $metadata, $options); - } - - /** - * Gets suggested articles for a participant based on specific historical - * messages. - * @param \Google\Cloud\Dialogflow\V2\SuggestArticlesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SuggestArticles(\Google\Cloud\Dialogflow\V2\SuggestArticlesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/SuggestArticles', - $argument, - ['\Google\Cloud\Dialogflow\V2\SuggestArticlesResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets suggested faq answers for a participant based on specific historical - * messages. - * @param \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SuggestFaqAnswers(\Google\Cloud\Dialogflow\V2\SuggestFaqAnswersRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/SuggestFaqAnswers', - $argument, - ['\Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets smart replies for a participant based on specific historical - * messages. - * @param \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SuggestSmartReplies(\Google\Cloud\Dialogflow\V2\SuggestSmartRepliesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Participants/SuggestSmartReplies', - $argument, - ['\Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryInput.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryInput.php deleted file mode 100644 index dcb659ad299e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryInput.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dialogflow.v2.QueryInput - */ -class QueryInput extends \Google\Protobuf\Internal\Message -{ - protected $input; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\InputAudioConfig $audio_config - * Instructs the speech recognizer how to process the speech audio. - * @type \Google\Cloud\Dialogflow\V2\TextInput $text - * The natural language text to be processed. Text length must not exceed - * 256 character for virtual agent interactions. - * @type \Google\Cloud\Dialogflow\V2\EventInput $event - * The event to be processed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * Instructs the speech recognizer how to process the speech audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 1; - * @return \Google\Cloud\Dialogflow\V2\InputAudioConfig|null - */ - public function getAudioConfig() - { - return $this->readOneof(1); - } - - public function hasAudioConfig() - { - return $this->hasOneof(1); - } - - /** - * Instructs the speech recognizer how to process the speech audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 1; - * @param \Google\Cloud\Dialogflow\V2\InputAudioConfig $var - * @return $this - */ - public function setAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputAudioConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The natural language text to be processed. Text length must not exceed - * 256 character for virtual agent interactions. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput text = 2; - * @return \Google\Cloud\Dialogflow\V2\TextInput|null - */ - public function getText() - { - return $this->readOneof(2); - } - - public function hasText() - { - return $this->hasOneof(2); - } - - /** - * The natural language text to be processed. Text length must not exceed - * 256 character for virtual agent interactions. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput text = 2; - * @param \Google\Cloud\Dialogflow\V2\TextInput $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextInput::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The event to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput event = 3; - * @return \Google\Cloud\Dialogflow\V2\EventInput|null - */ - public function getEvent() - { - return $this->readOneof(3); - } - - public function hasEvent() - { - return $this->hasOneof(3); - } - - /** - * The event to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput event = 3; - * @param \Google\Cloud\Dialogflow\V2\EventInput $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getInput() - { - return $this->whichOneof("input"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryParameters.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryParameters.php deleted file mode 100644 index f6469b8c6266..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryParameters.php +++ /dev/null @@ -1,415 +0,0 @@ -google.cloud.dialogflow.v2.QueryParameters - */ -class QueryParameters extends \Google\Protobuf\Internal\Message -{ - /** - * The time zone of this conversational query from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. If not provided, the time zone specified in - * agent settings is used. - * - * Generated from protobuf field string time_zone = 1; - */ - protected $time_zone = ''; - /** - * The geo location of this conversational query. - * - * Generated from protobuf field .google.type.LatLng geo_location = 2; - */ - protected $geo_location = null; - /** - * The collection of contexts to be activated before this query is - * executed. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 3; - */ - private $contexts; - /** - * Specifies whether to delete all contexts in the current session - * before the new ones are activated. - * - * Generated from protobuf field bool reset_contexts = 4; - */ - protected $reset_contexts = false; - /** - * Additional session entity types to replace or extend developer - * entity types with. The entity synonyms apply to all languages and persist - * for the session of this query. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5; - */ - private $session_entity_types; - /** - * This field can be used to pass custom data to your webhook. - * Arbitrary JSON objects are supported. - * If supplied, the value is used to populate the - * `WebhookRequest.original_detect_intent_request.payload` - * field sent to your webhook. - * - * Generated from protobuf field .google.protobuf.Struct payload = 6; - */ - protected $payload = null; - /** - * Configures the type of sentiment analysis to perform. If not - * provided, sentiment analysis is not performed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; - */ - protected $sentiment_analysis_request_config = null; - /** - * This field can be used to pass HTTP headers for a webhook - * call. These headers will be sent to webhook along with the headers that - * have been configured through the Dialogflow web console. The headers - * defined within this field will overwrite the headers configured through the - * Dialogflow console if there is a conflict. Header names are - * case-insensitive. Google's specified headers are not allowed. Including: - * "Host", "Content-Length", "Connection", "From", "User-Agent", - * "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", - * etc. - * - * Generated from protobuf field map webhook_headers = 14; - */ - private $webhook_headers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $time_zone - * The time zone of this conversational query from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. If not provided, the time zone specified in - * agent settings is used. - * @type \Google\Type\LatLng $geo_location - * The geo location of this conversational query. - * @type array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $contexts - * The collection of contexts to be activated before this query is - * executed. - * @type bool $reset_contexts - * Specifies whether to delete all contexts in the current session - * before the new ones are activated. - * @type array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $session_entity_types - * Additional session entity types to replace or extend developer - * entity types with. The entity synonyms apply to all languages and persist - * for the session of this query. - * @type \Google\Protobuf\Struct $payload - * This field can be used to pass custom data to your webhook. - * Arbitrary JSON objects are supported. - * If supplied, the value is used to populate the - * `WebhookRequest.original_detect_intent_request.payload` - * field sent to your webhook. - * @type \Google\Cloud\Dialogflow\V2\SentimentAnalysisRequestConfig $sentiment_analysis_request_config - * Configures the type of sentiment analysis to perform. If not - * provided, sentiment analysis is not performed. - * @type array|\Google\Protobuf\Internal\MapField $webhook_headers - * This field can be used to pass HTTP headers for a webhook - * call. These headers will be sent to webhook along with the headers that - * have been configured through the Dialogflow web console. The headers - * defined within this field will overwrite the headers configured through the - * Dialogflow console if there is a conflict. Header names are - * case-insensitive. Google's specified headers are not allowed. Including: - * "Host", "Content-Length", "Connection", "From", "User-Agent", - * "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", - * etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * The time zone of this conversational query from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. If not provided, the time zone specified in - * agent settings is used. - * - * Generated from protobuf field string time_zone = 1; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * The time zone of this conversational query from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. If not provided, the time zone specified in - * agent settings is used. - * - * Generated from protobuf field string time_zone = 1; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * The geo location of this conversational query. - * - * Generated from protobuf field .google.type.LatLng geo_location = 2; - * @return \Google\Type\LatLng|null - */ - public function getGeoLocation() - { - return $this->geo_location; - } - - public function hasGeoLocation() - { - return isset($this->geo_location); - } - - public function clearGeoLocation() - { - unset($this->geo_location); - } - - /** - * The geo location of this conversational query. - * - * Generated from protobuf field .google.type.LatLng geo_location = 2; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setGeoLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->geo_location = $var; - - return $this; - } - - /** - * The collection of contexts to be activated before this query is - * executed. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContexts() - { - return $this->contexts; - } - - /** - * The collection of contexts to be activated before this query is - * executed. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context contexts = 3; - * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContexts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); - $this->contexts = $arr; - - return $this; - } - - /** - * Specifies whether to delete all contexts in the current session - * before the new ones are activated. - * - * Generated from protobuf field bool reset_contexts = 4; - * @return bool - */ - public function getResetContexts() - { - return $this->reset_contexts; - } - - /** - * Specifies whether to delete all contexts in the current session - * before the new ones are activated. - * - * Generated from protobuf field bool reset_contexts = 4; - * @param bool $var - * @return $this - */ - public function setResetContexts($var) - { - GPBUtil::checkBool($var); - $this->reset_contexts = $var; - - return $this; - } - - /** - * Additional session entity types to replace or extend developer - * entity types with. The entity synonyms apply to all languages and persist - * for the session of this query. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSessionEntityTypes() - { - return $this->session_entity_types; - } - - /** - * Additional session entity types to replace or extend developer - * entity types with. The entity synonyms apply to all languages and persist - * for the session of this query. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5; - * @param array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSessionEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); - $this->session_entity_types = $arr; - - return $this; - } - - /** - * This field can be used to pass custom data to your webhook. - * Arbitrary JSON objects are supported. - * If supplied, the value is used to populate the - * `WebhookRequest.original_detect_intent_request.payload` - * field sent to your webhook. - * - * Generated from protobuf field .google.protobuf.Struct payload = 6; - * @return \Google\Protobuf\Struct|null - */ - public function getPayload() - { - return $this->payload; - } - - public function hasPayload() - { - return isset($this->payload); - } - - public function clearPayload() - { - unset($this->payload); - } - - /** - * This field can be used to pass custom data to your webhook. - * Arbitrary JSON objects are supported. - * If supplied, the value is used to populate the - * `WebhookRequest.original_detect_intent_request.payload` - * field sent to your webhook. - * - * Generated from protobuf field .google.protobuf.Struct payload = 6; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->payload = $var; - - return $this; - } - - /** - * Configures the type of sentiment analysis to perform. If not - * provided, sentiment analysis is not performed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; - * @return \Google\Cloud\Dialogflow\V2\SentimentAnalysisRequestConfig|null - */ - public function getSentimentAnalysisRequestConfig() - { - return $this->sentiment_analysis_request_config; - } - - public function hasSentimentAnalysisRequestConfig() - { - return isset($this->sentiment_analysis_request_config); - } - - public function clearSentimentAnalysisRequestConfig() - { - unset($this->sentiment_analysis_request_config); - } - - /** - * Configures the type of sentiment analysis to perform. If not - * provided, sentiment analysis is not performed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; - * @param \Google\Cloud\Dialogflow\V2\SentimentAnalysisRequestConfig $var - * @return $this - */ - public function setSentimentAnalysisRequestConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SentimentAnalysisRequestConfig::class); - $this->sentiment_analysis_request_config = $var; - - return $this; - } - - /** - * This field can be used to pass HTTP headers for a webhook - * call. These headers will be sent to webhook along with the headers that - * have been configured through the Dialogflow web console. The headers - * defined within this field will overwrite the headers configured through the - * Dialogflow console if there is a conflict. Header names are - * case-insensitive. Google's specified headers are not allowed. Including: - * "Host", "Content-Length", "Connection", "From", "User-Agent", - * "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", - * etc. - * - * Generated from protobuf field map webhook_headers = 14; - * @return \Google\Protobuf\Internal\MapField - */ - public function getWebhookHeaders() - { - return $this->webhook_headers; - } - - /** - * This field can be used to pass HTTP headers for a webhook - * call. These headers will be sent to webhook along with the headers that - * have been configured through the Dialogflow web console. The headers - * defined within this field will overwrite the headers configured through the - * Dialogflow console if there is a conflict. Header names are - * case-insensitive. Google's specified headers are not allowed. Including: - * "Host", "Content-Length", "Connection", "From", "User-Agent", - * "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", - * etc. - * - * Generated from protobuf field map webhook_headers = 14; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setWebhookHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->webhook_headers = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryResult.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryResult.php deleted file mode 100644 index f78289af3d1b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/QueryResult.php +++ /dev/null @@ -1,855 +0,0 @@ -google.cloud.dialogflow.v2.QueryResult - */ -class QueryResult extends \Google\Protobuf\Internal\Message -{ - /** - * The original conversational query text: - * - If natural language text was provided as input, `query_text` contains - * a copy of the input. - * - If natural language speech audio was provided as input, `query_text` - * contains the speech recognition result. If speech recognizer produced - * multiple alternatives, a particular one is picked. - * - If automatic spell correction is enabled, `query_text` will contain the - * corrected user input. - * - * Generated from protobuf field string query_text = 1; - */ - protected $query_text = ''; - /** - * The language that was triggered during intent detection. - * See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 15; - */ - protected $language_code = ''; - /** - * The Speech recognition confidence between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. The default of 0.0 is a sentinel value indicating that confidence - * was not set. - * This field is not guaranteed to be accurate or set. In particular this - * field isn't set for StreamingDetectIntent since the streaming endpoint has - * separate confidence estimates per portion of the audio in - * StreamingRecognitionResult. - * - * Generated from protobuf field float speech_recognition_confidence = 2; - */ - protected $speech_recognition_confidence = 0.0; - /** - * The action name from the matched intent. - * - * Generated from protobuf field string action = 3; - */ - protected $action = ''; - /** - * The collection of extracted parameters. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * - * Generated from protobuf field .google.protobuf.Struct parameters = 4; - */ - protected $parameters = null; - /** - * This field is set to: - * - `false` if the matched intent has required parameters and not all of - * the required parameter values have been collected. - * - `true` if all required parameter values have been collected, or if the - * matched intent doesn't contain any required parameters. - * - * Generated from protobuf field bool all_required_params_present = 5; - */ - protected $all_required_params_present = false; - /** - * Indicates whether the conversational query triggers a cancellation for slot - * filling. For more information, see the [cancel slot filling - * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). - * - * Generated from protobuf field bool cancels_slot_filling = 21; - */ - protected $cancels_slot_filling = false; - /** - * The text to be pronounced to the user or shown on the screen. - * Note: This is a legacy field, `fulfillment_messages` should be preferred. - * - * Generated from protobuf field string fulfillment_text = 6; - */ - protected $fulfillment_text = ''; - /** - * The collection of rich messages to present to the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7; - */ - private $fulfillment_messages; - /** - * If the query was fulfilled by a webhook call, this field is set to the - * value of the `source` field returned in the webhook response. - * - * Generated from protobuf field string webhook_source = 8; - */ - protected $webhook_source = ''; - /** - * If the query was fulfilled by a webhook call, this field is set to the - * value of the `payload` field returned in the webhook response. - * - * Generated from protobuf field .google.protobuf.Struct webhook_payload = 9; - */ - protected $webhook_payload = null; - /** - * The collection of output contexts. If applicable, - * `output_contexts.parameters` contains entries with name - * `.original` containing the original parameter values - * before the query. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 10; - */ - private $output_contexts; - /** - * The intent that matched the conversational query. Some, not - * all fields are filled in this message, including but not limited to: - * `name`, `display_name`, `end_interaction` and `is_fallback`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 11; - */ - protected $intent = null; - /** - * The intent detection confidence. Values range from 0.0 - * (completely uncertain) to 1.0 (completely certain). - * This value is for informational purpose only and is only used to - * help match the best intent within the classification threshold. - * This value may change for the same end-user expression at any time due to a - * model retraining or change in implementation. - * If there are `multiple knowledge_answers` messages, this value is set to - * the greatest `knowledgeAnswers.match_confidence` value in the list. - * - * Generated from protobuf field float intent_detection_confidence = 12; - */ - protected $intent_detection_confidence = 0.0; - /** - * Free-form diagnostic information for the associated detect intent request. - * The fields of this data can change without notice, so you should not write - * code that depends on its structure. - * The data may contain: - * - webhook call latency - * - webhook errors - * - * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 14; - */ - protected $diagnostic_info = null; - /** - * The sentiment analysis result, which depends on the - * `sentiment_analysis_request_config` specified in the request. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; - */ - protected $sentiment_analysis_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_text - * The original conversational query text: - * - If natural language text was provided as input, `query_text` contains - * a copy of the input. - * - If natural language speech audio was provided as input, `query_text` - * contains the speech recognition result. If speech recognizer produced - * multiple alternatives, a particular one is picked. - * - If automatic spell correction is enabled, `query_text` will contain the - * corrected user input. - * @type string $language_code - * The language that was triggered during intent detection. - * See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. - * @type float $speech_recognition_confidence - * The Speech recognition confidence between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. The default of 0.0 is a sentinel value indicating that confidence - * was not set. - * This field is not guaranteed to be accurate or set. In particular this - * field isn't set for StreamingDetectIntent since the streaming endpoint has - * separate confidence estimates per portion of the audio in - * StreamingRecognitionResult. - * @type string $action - * The action name from the matched intent. - * @type \Google\Protobuf\Struct $parameters - * The collection of extracted parameters. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * @type bool $all_required_params_present - * This field is set to: - * - `false` if the matched intent has required parameters and not all of - * the required parameter values have been collected. - * - `true` if all required parameter values have been collected, or if the - * matched intent doesn't contain any required parameters. - * @type bool $cancels_slot_filling - * Indicates whether the conversational query triggers a cancellation for slot - * filling. For more information, see the [cancel slot filling - * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). - * @type string $fulfillment_text - * The text to be pronounced to the user or shown on the screen. - * Note: This is a legacy field, `fulfillment_messages` should be preferred. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $fulfillment_messages - * The collection of rich messages to present to the user. - * @type string $webhook_source - * If the query was fulfilled by a webhook call, this field is set to the - * value of the `source` field returned in the webhook response. - * @type \Google\Protobuf\Struct $webhook_payload - * If the query was fulfilled by a webhook call, this field is set to the - * value of the `payload` field returned in the webhook response. - * @type array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $output_contexts - * The collection of output contexts. If applicable, - * `output_contexts.parameters` contains entries with name - * `.original` containing the original parameter values - * before the query. - * @type \Google\Cloud\Dialogflow\V2\Intent $intent - * The intent that matched the conversational query. Some, not - * all fields are filled in this message, including but not limited to: - * `name`, `display_name`, `end_interaction` and `is_fallback`. - * @type float $intent_detection_confidence - * The intent detection confidence. Values range from 0.0 - * (completely uncertain) to 1.0 (completely certain). - * This value is for informational purpose only and is only used to - * help match the best intent within the classification threshold. - * This value may change for the same end-user expression at any time due to a - * model retraining or change in implementation. - * If there are `multiple knowledge_answers` messages, this value is set to - * the greatest `knowledgeAnswers.match_confidence` value in the list. - * @type \Google\Protobuf\Struct $diagnostic_info - * Free-form diagnostic information for the associated detect intent request. - * The fields of this data can change without notice, so you should not write - * code that depends on its structure. - * The data may contain: - * - webhook call latency - * - webhook errors - * @type \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult $sentiment_analysis_result - * The sentiment analysis result, which depends on the - * `sentiment_analysis_request_config` specified in the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * The original conversational query text: - * - If natural language text was provided as input, `query_text` contains - * a copy of the input. - * - If natural language speech audio was provided as input, `query_text` - * contains the speech recognition result. If speech recognizer produced - * multiple alternatives, a particular one is picked. - * - If automatic spell correction is enabled, `query_text` will contain the - * corrected user input. - * - * Generated from protobuf field string query_text = 1; - * @return string - */ - public function getQueryText() - { - return $this->query_text; - } - - /** - * The original conversational query text: - * - If natural language text was provided as input, `query_text` contains - * a copy of the input. - * - If natural language speech audio was provided as input, `query_text` - * contains the speech recognition result. If speech recognizer produced - * multiple alternatives, a particular one is picked. - * - If automatic spell correction is enabled, `query_text` will contain the - * corrected user input. - * - * Generated from protobuf field string query_text = 1; - * @param string $var - * @return $this - */ - public function setQueryText($var) - { - GPBUtil::checkString($var, True); - $this->query_text = $var; - - return $this; - } - - /** - * The language that was triggered during intent detection. - * See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 15; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language that was triggered during intent detection. - * See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 15; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The Speech recognition confidence between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. The default of 0.0 is a sentinel value indicating that confidence - * was not set. - * This field is not guaranteed to be accurate or set. In particular this - * field isn't set for StreamingDetectIntent since the streaming endpoint has - * separate confidence estimates per portion of the audio in - * StreamingRecognitionResult. - * - * Generated from protobuf field float speech_recognition_confidence = 2; - * @return float - */ - public function getSpeechRecognitionConfidence() - { - return $this->speech_recognition_confidence; - } - - /** - * The Speech recognition confidence between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. The default of 0.0 is a sentinel value indicating that confidence - * was not set. - * This field is not guaranteed to be accurate or set. In particular this - * field isn't set for StreamingDetectIntent since the streaming endpoint has - * separate confidence estimates per portion of the audio in - * StreamingRecognitionResult. - * - * Generated from protobuf field float speech_recognition_confidence = 2; - * @param float $var - * @return $this - */ - public function setSpeechRecognitionConfidence($var) - { - GPBUtil::checkFloat($var); - $this->speech_recognition_confidence = $var; - - return $this; - } - - /** - * The action name from the matched intent. - * - * Generated from protobuf field string action = 3; - * @return string - */ - public function getAction() - { - return $this->action; - } - - /** - * The action name from the matched intent. - * - * Generated from protobuf field string action = 3; - * @param string $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkString($var, True); - $this->action = $var; - - return $this; - } - - /** - * The collection of extracted parameters. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * - * Generated from protobuf field .google.protobuf.Struct parameters = 4; - * @return \Google\Protobuf\Struct|null - */ - public function getParameters() - { - return $this->parameters; - } - - public function hasParameters() - { - return isset($this->parameters); - } - - public function clearParameters() - { - unset($this->parameters); - } - - /** - * The collection of extracted parameters. - * Depending on your protocol or client library language, this is a - * map, associative array, symbol table, dictionary, or JSON object - * composed of a collection of (MapKey, MapValue) pairs: - * - MapKey type: string - * - MapKey value: parameter name - * - MapValue type: - * - If parameter's entity type is a composite entity: map - * - Else: depending on parameter value type, could be one of string, - * number, boolean, null, list or map - * - MapValue value: - * - If parameter's entity type is a composite entity: - * map from composite entity property names to property values - * - Else: parameter value - * - * Generated from protobuf field .google.protobuf.Struct parameters = 4; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->parameters = $var; - - return $this; - } - - /** - * This field is set to: - * - `false` if the matched intent has required parameters and not all of - * the required parameter values have been collected. - * - `true` if all required parameter values have been collected, or if the - * matched intent doesn't contain any required parameters. - * - * Generated from protobuf field bool all_required_params_present = 5; - * @return bool - */ - public function getAllRequiredParamsPresent() - { - return $this->all_required_params_present; - } - - /** - * This field is set to: - * - `false` if the matched intent has required parameters and not all of - * the required parameter values have been collected. - * - `true` if all required parameter values have been collected, or if the - * matched intent doesn't contain any required parameters. - * - * Generated from protobuf field bool all_required_params_present = 5; - * @param bool $var - * @return $this - */ - public function setAllRequiredParamsPresent($var) - { - GPBUtil::checkBool($var); - $this->all_required_params_present = $var; - - return $this; - } - - /** - * Indicates whether the conversational query triggers a cancellation for slot - * filling. For more information, see the [cancel slot filling - * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). - * - * Generated from protobuf field bool cancels_slot_filling = 21; - * @return bool - */ - public function getCancelsSlotFilling() - { - return $this->cancels_slot_filling; - } - - /** - * Indicates whether the conversational query triggers a cancellation for slot - * filling. For more information, see the [cancel slot filling - * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). - * - * Generated from protobuf field bool cancels_slot_filling = 21; - * @param bool $var - * @return $this - */ - public function setCancelsSlotFilling($var) - { - GPBUtil::checkBool($var); - $this->cancels_slot_filling = $var; - - return $this; - } - - /** - * The text to be pronounced to the user or shown on the screen. - * Note: This is a legacy field, `fulfillment_messages` should be preferred. - * - * Generated from protobuf field string fulfillment_text = 6; - * @return string - */ - public function getFulfillmentText() - { - return $this->fulfillment_text; - } - - /** - * The text to be pronounced to the user or shown on the screen. - * Note: This is a legacy field, `fulfillment_messages` should be preferred. - * - * Generated from protobuf field string fulfillment_text = 6; - * @param string $var - * @return $this - */ - public function setFulfillmentText($var) - { - GPBUtil::checkString($var, True); - $this->fulfillment_text = $var; - - return $this; - } - - /** - * The collection of rich messages to present to the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFulfillmentMessages() - { - return $this->fulfillment_messages; - } - - /** - * The collection of rich messages to present to the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFulfillmentMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message::class); - $this->fulfillment_messages = $arr; - - return $this; - } - - /** - * If the query was fulfilled by a webhook call, this field is set to the - * value of the `source` field returned in the webhook response. - * - * Generated from protobuf field string webhook_source = 8; - * @return string - */ - public function getWebhookSource() - { - return $this->webhook_source; - } - - /** - * If the query was fulfilled by a webhook call, this field is set to the - * value of the `source` field returned in the webhook response. - * - * Generated from protobuf field string webhook_source = 8; - * @param string $var - * @return $this - */ - public function setWebhookSource($var) - { - GPBUtil::checkString($var, True); - $this->webhook_source = $var; - - return $this; - } - - /** - * If the query was fulfilled by a webhook call, this field is set to the - * value of the `payload` field returned in the webhook response. - * - * Generated from protobuf field .google.protobuf.Struct webhook_payload = 9; - * @return \Google\Protobuf\Struct|null - */ - public function getWebhookPayload() - { - return $this->webhook_payload; - } - - public function hasWebhookPayload() - { - return isset($this->webhook_payload); - } - - public function clearWebhookPayload() - { - unset($this->webhook_payload); - } - - /** - * If the query was fulfilled by a webhook call, this field is set to the - * value of the `payload` field returned in the webhook response. - * - * Generated from protobuf field .google.protobuf.Struct webhook_payload = 9; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setWebhookPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->webhook_payload = $var; - - return $this; - } - - /** - * The collection of output contexts. If applicable, - * `output_contexts.parameters` contains entries with name - * `.original` containing the original parameter values - * before the query. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOutputContexts() - { - return $this->output_contexts; - } - - /** - * The collection of output contexts. If applicable, - * `output_contexts.parameters` contains entries with name - * `.original` containing the original parameter values - * before the query. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 10; - * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOutputContexts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); - $this->output_contexts = $arr; - - return $this; - } - - /** - * The intent that matched the conversational query. Some, not - * all fields are filled in this message, including but not limited to: - * `name`, `display_name`, `end_interaction` and `is_fallback`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 11; - * @return \Google\Cloud\Dialogflow\V2\Intent|null - */ - public function getIntent() - { - return $this->intent; - } - - public function hasIntent() - { - return isset($this->intent); - } - - public function clearIntent() - { - unset($this->intent); - } - - /** - * The intent that matched the conversational query. Some, not - * all fields are filled in this message, including but not limited to: - * `name`, `display_name`, `end_interaction` and `is_fallback`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 11; - * @param \Google\Cloud\Dialogflow\V2\Intent $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent::class); - $this->intent = $var; - - return $this; - } - - /** - * The intent detection confidence. Values range from 0.0 - * (completely uncertain) to 1.0 (completely certain). - * This value is for informational purpose only and is only used to - * help match the best intent within the classification threshold. - * This value may change for the same end-user expression at any time due to a - * model retraining or change in implementation. - * If there are `multiple knowledge_answers` messages, this value is set to - * the greatest `knowledgeAnswers.match_confidence` value in the list. - * - * Generated from protobuf field float intent_detection_confidence = 12; - * @return float - */ - public function getIntentDetectionConfidence() - { - return $this->intent_detection_confidence; - } - - /** - * The intent detection confidence. Values range from 0.0 - * (completely uncertain) to 1.0 (completely certain). - * This value is for informational purpose only and is only used to - * help match the best intent within the classification threshold. - * This value may change for the same end-user expression at any time due to a - * model retraining or change in implementation. - * If there are `multiple knowledge_answers` messages, this value is set to - * the greatest `knowledgeAnswers.match_confidence` value in the list. - * - * Generated from protobuf field float intent_detection_confidence = 12; - * @param float $var - * @return $this - */ - public function setIntentDetectionConfidence($var) - { - GPBUtil::checkFloat($var); - $this->intent_detection_confidence = $var; - - return $this; - } - - /** - * Free-form diagnostic information for the associated detect intent request. - * The fields of this data can change without notice, so you should not write - * code that depends on its structure. - * The data may contain: - * - webhook call latency - * - webhook errors - * - * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 14; - * @return \Google\Protobuf\Struct|null - */ - public function getDiagnosticInfo() - { - return $this->diagnostic_info; - } - - public function hasDiagnosticInfo() - { - return isset($this->diagnostic_info); - } - - public function clearDiagnosticInfo() - { - unset($this->diagnostic_info); - } - - /** - * Free-form diagnostic information for the associated detect intent request. - * The fields of this data can change without notice, so you should not write - * code that depends on its structure. - * The data may contain: - * - webhook call latency - * - webhook errors - * - * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 14; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDiagnosticInfo($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->diagnostic_info = $var; - - return $this; - } - - /** - * The sentiment analysis result, which depends on the - * `sentiment_analysis_request_config` specified in the request. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; - * @return \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult|null - */ - public function getSentimentAnalysisResult() - { - return $this->sentiment_analysis_result; - } - - public function hasSentimentAnalysisResult() - { - return isset($this->sentiment_analysis_result); - } - - public function clearSentimentAnalysisResult() - { - unset($this->sentiment_analysis_result); - } - - /** - * The sentiment analysis result, which depends on the - * `sentiment_analysis_request_config` specified in the request. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; - * @param \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult $var - * @return $this - */ - public function setSentimentAnalysisResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult::class); - $this->sentiment_analysis_result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ReloadDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ReloadDocumentRequest.php deleted file mode 100644 index a3f8f6bec78f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ReloadDocumentRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.dialogflow.v2.ReloadDocumentRequest - */ -class ReloadDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the document to reload. - * Format: `projects//locations//knowledgeBases//documents/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * - * Generated from protobuf field bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $import_gcs_custom_metadata = false; - /** - * Optional. When enabled, the reload request is to apply partial update to - * the smart messaging allowlist. - * - * Generated from protobuf field bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $smart_messaging_partial_update = false; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the document to reload. - * Format: `projects//locations//knowledgeBases//documents/` - * @type string $content_uri - * Optional. The path of gcs source file for reloading document content. For - * now, only gcs uri is supported. - * For documents stored in Google Cloud Storage, these URIs must have - * the form `gs:///`. - * @type bool $import_gcs_custom_metadata - * Optional. Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * @type bool $smart_messaging_partial_update - * Optional. When enabled, the reload request is to apply partial update to - * the smart messaging allowlist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the document to reload. - * Format: `projects//locations//knowledgeBases//documents/` - * - * 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 document to reload. - * Format: `projects//locations//knowledgeBases//documents/` - * - * 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; - } - - /** - * Optional. The path of gcs source file for reloading document content. For - * now, only gcs uri is supported. - * For documents stored in Google Cloud Storage, these URIs must have - * the form `gs:///`. - * - * Generated from protobuf field string content_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getContentUri() - { - return $this->readOneof(3); - } - - public function hasContentUri() - { - return $this->hasOneof(3); - } - - /** - * Optional. The path of gcs source file for reloading document content. For - * now, only gcs uri is supported. - * For documents stored in Google Cloud Storage, these URIs must have - * the form `gs:///`. - * - * Generated from protobuf field string content_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setContentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * - * Generated from protobuf field bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getImportGcsCustomMetadata() - { - return $this->import_gcs_custom_metadata; - } - - /** - * Optional. Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * - * Generated from protobuf field bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setImportGcsCustomMetadata($var) - { - GPBUtil::checkBool($var); - $this->import_gcs_custom_metadata = $var; - - return $this; - } - - /** - * Optional. When enabled, the reload request is to apply partial update to - * the smart messaging allowlist. - * - * Generated from protobuf field bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSmartMessagingPartialUpdate() - { - return $this->smart_messaging_partial_update; - } - - /** - * Optional. When enabled, the reload request is to apply partial update to - * the smart messaging allowlist. - * - * Generated from protobuf field bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSmartMessagingPartialUpdate($var) - { - GPBUtil::checkBool($var); - $this->smart_messaging_partial_update = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/RestoreAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/RestoreAgentRequest.php deleted file mode 100644 index 19fa9863b9cd..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/RestoreAgentRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.dialogflow.v2.RestoreAgentRequest - */ -class RestoreAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that the agent to restore is associated with. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - protected $agent; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project that the agent to restore is associated with. - * Format: `projects/`. - * @type string $agent_uri - * The URI to a Google Cloud Storage file containing the agent to restore. - * Note: The URI must start with "gs://". - * Dialogflow performs a read operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have read permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * @type string $agent_content - * Zip compressed raw byte content for agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that the agent to restore is associated with. - * Format: `projects/`. - * - * 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 project that the agent to restore is associated with. - * Format: `projects/`. - * - * 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 URI to a Google Cloud Storage file containing the agent to restore. - * Note: The URI must start with "gs://". - * Dialogflow performs a read operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have read permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * - * Generated from protobuf field string agent_uri = 2; - * @return string - */ - public function getAgentUri() - { - return $this->readOneof(2); - } - - public function hasAgentUri() - { - return $this->hasOneof(2); - } - - /** - * The URI to a Google Cloud Storage file containing the agent to restore. - * Note: The URI must start with "gs://". - * Dialogflow performs a read operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have read permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * - * Generated from protobuf field string agent_uri = 2; - * @param string $var - * @return $this - */ - public function setAgentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Zip compressed raw byte content for agent. - * - * Generated from protobuf field bytes agent_content = 3; - * @return string - */ - public function getAgentContent() - { - return $this->readOneof(3); - } - - public function hasAgentContent() - { - return $this->hasOneof(3); - } - - /** - * Zip compressed raw byte content for agent. - * - * Generated from protobuf field bytes agent_content = 3; - * @param string $var - * @return $this - */ - public function setAgentContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getAgent() - { - return $this->whichOneof("agent"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsRequest.php deleted file mode 100644 index 2b771e40ae28..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsRequest.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.dialogflow.v2.SearchAgentsRequest - */ -class SearchAgentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to list agents from. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to list agents from. - * Format: `projects/`. - * @type int $page_size - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to list agents from. - * Format: `projects/`. - * - * 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 project to list agents from. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return in a single page. By - * default 100 and at most 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous list request. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsResponse.php deleted file mode 100644 index 65b54935d344..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SearchAgentsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.v2.SearchAgentsResponse - */ -class SearchAgentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of agents. There will be a maximum number of items returned based - * on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Agent agents = 1; - */ - private $agents; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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\Dialogflow\V2\Agent>|\Google\Protobuf\Internal\RepeatedField $agents - * The list of agents. There will be a maximum number of items returned based - * on the page_size field in the request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * The list of agents. There will be a maximum number of items returned based - * on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Agent agents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAgents() - { - return $this->agents; - } - - /** - * The list of agents. There will be a maximum number of items returned based - * on the page_size field in the request. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Agent agents = 1; - * @param array<\Google\Cloud\Dialogflow\V2\Agent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAgents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Agent::class); - $this->agents = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Sentiment.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Sentiment.php deleted file mode 100644 index 2fb6df49acb2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Sentiment.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dialogflow.v2.Sentiment - */ -class Sentiment extends \Google\Protobuf\Internal\Message -{ - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive - * sentiment). - * - * Generated from protobuf field float score = 1; - */ - protected $score = 0.0; - /** - * A non-negative number in the [0, +inf) range, which represents the absolute - * magnitude of sentiment, regardless of score (positive or negative). - * - * Generated from protobuf field float magnitude = 2; - */ - protected $magnitude = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $score - * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive - * sentiment). - * @type float $magnitude - * A non-negative number in the [0, +inf) range, which represents the absolute - * magnitude of sentiment, regardless of score (positive or negative). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive - * sentiment). - * - * Generated from protobuf field float score = 1; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive - * sentiment). - * - * Generated from protobuf field float score = 1; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * A non-negative number in the [0, +inf) range, which represents the absolute - * magnitude of sentiment, regardless of score (positive or negative). - * - * Generated from protobuf field float magnitude = 2; - * @return float - */ - public function getMagnitude() - { - return $this->magnitude; - } - - /** - * A non-negative number in the [0, +inf) range, which represents the absolute - * magnitude of sentiment, regardless of score (positive or negative). - * - * Generated from protobuf field float magnitude = 2; - * @param float $var - * @return $this - */ - public function setMagnitude($var) - { - GPBUtil::checkFloat($var); - $this->magnitude = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisRequestConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisRequestConfig.php deleted file mode 100644 index 996d88c8c1f7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisRequestConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig - */ -class SentimentAnalysisRequestConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Instructs the service to perform sentiment analysis on - * `query_text`. If not provided, sentiment analysis is not performed on - * `query_text`. - * - * Generated from protobuf field bool analyze_query_text_sentiment = 1; - */ - protected $analyze_query_text_sentiment = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $analyze_query_text_sentiment - * Instructs the service to perform sentiment analysis on - * `query_text`. If not provided, sentiment analysis is not performed on - * `query_text`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * Instructs the service to perform sentiment analysis on - * `query_text`. If not provided, sentiment analysis is not performed on - * `query_text`. - * - * Generated from protobuf field bool analyze_query_text_sentiment = 1; - * @return bool - */ - public function getAnalyzeQueryTextSentiment() - { - return $this->analyze_query_text_sentiment; - } - - /** - * Instructs the service to perform sentiment analysis on - * `query_text`. If not provided, sentiment analysis is not performed on - * `query_text`. - * - * Generated from protobuf field bool analyze_query_text_sentiment = 1; - * @param bool $var - * @return $this - */ - public function setAnalyzeQueryTextSentiment($var) - { - GPBUtil::checkBool($var); - $this->analyze_query_text_sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisResult.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisResult.php deleted file mode 100644 index a6e582c0eafb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SentimentAnalysisResult.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.dialogflow.v2.SentimentAnalysisResult - */ -class SentimentAnalysisResult extends \Google\Protobuf\Internal\Message -{ - /** - * The sentiment analysis result for `query_text`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Sentiment query_text_sentiment = 1; - */ - protected $query_text_sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Sentiment $query_text_sentiment - * The sentiment analysis result for `query_text`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * The sentiment analysis result for `query_text`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Sentiment query_text_sentiment = 1; - * @return \Google\Cloud\Dialogflow\V2\Sentiment|null - */ - public function getQueryTextSentiment() - { - return $this->query_text_sentiment; - } - - public function hasQueryTextSentiment() - { - return isset($this->query_text_sentiment); - } - - public function clearQueryTextSentiment() - { - unset($this->query_text_sentiment); - } - - /** - * The sentiment analysis result for `query_text`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Sentiment query_text_sentiment = 1; - * @param \Google\Cloud\Dialogflow\V2\Sentiment $var - * @return $this - */ - public function setQueryTextSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Sentiment::class); - $this->query_text_sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType.php deleted file mode 100644 index 2e6fedf0262d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.dialogflow.v2.SessionEntityType - */ -class SessionEntityType extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier of this session entity type. Format: - * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * `` must be the display name of an existing entity - * type in the same agent that will be overridden or supplemented. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. Indicates whether the additional data should override or - * supplement the custom entity type definition. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity_override_mode = 0; - /** - * Required. The collection of entities associated with this session entity - * type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entities; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique identifier of this session entity type. Format: - * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * `` must be the display name of an existing entity - * type in the same agent that will be overridden or supplemented. - * @type int $entity_override_mode - * Required. Indicates whether the additional data should override or - * supplement the custom entity type definition. - * @type array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Required. The collection of entities associated with this session entity - * type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier of this session entity type. Format: - * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * `` must be the display name of an existing entity - * type in the same agent that will be overridden or supplemented. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique identifier of this session entity type. Format: - * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * `` must be the display name of an existing entity - * type in the same agent that will be overridden or supplemented. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Indicates whether the additional data should override or - * supplement the custom entity type definition. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getEntityOverrideMode() - { - return $this->entity_override_mode; - } - - /** - * Required. Indicates whether the additional data should override or - * supplement the custom entity type definition. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setEntityOverrideMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SessionEntityType\EntityOverrideMode::class); - $this->entity_override_mode = $var; - - return $this; - } - - /** - * Required. The collection of entities associated with this session entity - * type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Required. The collection of entities associated with this session entity - * type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\V2\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType\Entity::class); - $this->entities = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType/EntityOverrideMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType/EntityOverrideMode.php deleted file mode 100644 index 7d3d5edc239d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType/EntityOverrideMode.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode - */ -class EntityOverrideMode -{ - /** - * Not specified. This value should be never used. - * - * Generated from protobuf enum ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; - */ - const ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; - /** - * The collection of session entities overrides the collection of entities - * in the corresponding custom entity type. - * - * Generated from protobuf enum ENTITY_OVERRIDE_MODE_OVERRIDE = 1; - */ - const ENTITY_OVERRIDE_MODE_OVERRIDE = 1; - /** - * The collection of session entities extends the collection of entities in - * the corresponding custom entity type. - * Note: Even in this override mode calls to `ListSessionEntityTypes`, - * `GetSessionEntityType`, `CreateSessionEntityType` and - * `UpdateSessionEntityType` only return the additional entities added in - * this session entity type. If you want to get the supplemented list, - * please call - * [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] - * on the custom entity type and merge. - * - * Generated from protobuf enum ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; - */ - const ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; - - private static $valueToName = [ - self::ENTITY_OVERRIDE_MODE_UNSPECIFIED => 'ENTITY_OVERRIDE_MODE_UNSPECIFIED', - self::ENTITY_OVERRIDE_MODE_OVERRIDE => 'ENTITY_OVERRIDE_MODE_OVERRIDE', - self::ENTITY_OVERRIDE_MODE_SUPPLEMENT => 'ENTITY_OVERRIDE_MODE_SUPPLEMENT', - ]; - - 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(EntityOverrideMode::class, \Google\Cloud\Dialogflow\V2\SessionEntityType_EntityOverrideMode::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType_EntityOverrideMode.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType_EntityOverrideMode.php deleted file mode 100644 index 60b54495e2dd..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionEntityType_EntityOverrideMode.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/ListSessionEntityTypes', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListSessionEntityTypesResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified session entity type. - * - * This method doesn't work with Google Assistant integration. - * Contact Dialogflow support if you need to use session entities - * with Google Assistant integration. - * @param \Google\Cloud\Dialogflow\V2\GetSessionEntityTypeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetSessionEntityType(\Google\Cloud\Dialogflow\V2\GetSessionEntityTypeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/GetSessionEntityType', - $argument, - ['\Google\Cloud\Dialogflow\V2\SessionEntityType', 'decode'], - $metadata, $options); - } - - /** - * Creates a session entity type. - * - * If the specified session entity type already exists, overrides the session - * entity type. - * - * This method doesn't work with Google Assistant integration. - * Contact Dialogflow support if you need to use session entities - * with Google Assistant integration. - * @param \Google\Cloud\Dialogflow\V2\CreateSessionEntityTypeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateSessionEntityType(\Google\Cloud\Dialogflow\V2\CreateSessionEntityTypeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/CreateSessionEntityType', - $argument, - ['\Google\Cloud\Dialogflow\V2\SessionEntityType', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified session entity type. - * - * This method doesn't work with Google Assistant integration. - * Contact Dialogflow support if you need to use session entities - * with Google Assistant integration. - * @param \Google\Cloud\Dialogflow\V2\UpdateSessionEntityTypeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateSessionEntityType(\Google\Cloud\Dialogflow\V2\UpdateSessionEntityTypeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/UpdateSessionEntityType', - $argument, - ['\Google\Cloud\Dialogflow\V2\SessionEntityType', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified session entity type. - * - * This method doesn't work with Google Assistant integration. - * Contact Dialogflow support if you need to use session entities - * with Google Assistant integration. - * @param \Google\Cloud\Dialogflow\V2\DeleteSessionEntityTypeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteSessionEntityType(\Google\Cloud\Dialogflow\V2\DeleteSessionEntityTypeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.SessionEntityTypes/DeleteSessionEntityType', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionsGrpcClient.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionsGrpcClient.php deleted file mode 100644 index f582a416aaba..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SessionsGrpcClient.php +++ /dev/null @@ -1,92 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Sessions/DetectIntent', - $argument, - ['\Google\Cloud\Dialogflow\V2\DetectIntentResponse', 'decode'], - $metadata, $options); - } - - /** - * Processes a natural language query in audio format in a streaming fashion - * and returns structured, actionable data as a result. This method is only - * available via the gRPC API (not REST). - * - * If you might use - * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) - * or other CCAI products now or in the future, consider using - * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] - * instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has - * additional functionality for Agent Assist and other CCAI products. - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\BidiStreamingCall - */ - public function StreamingDetectIntent($metadata = [], $options = []) { - return $this->_bidiRequest('/google.cloud.dialogflow.v2.Sessions/StreamingDetectIntent', - ['\Google\Cloud\Dialogflow\V2\StreamingDetectIntentResponse','decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetAgentRequest.php deleted file mode 100644 index 2215742736b8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetAgentRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.v2.SetAgentRequest - */ -class SetAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $agent = null; - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Agent $agent - * Required. The agent to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Agent|null - */ - public function getAgent() - { - return $this->agent; - } - - public function hasAgent() - { - return isset($this->agent); - } - - public function clearAgent() - { - unset($this->agent); - } - - /** - * Required. The agent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Agent $var - * @return $this - */ - public function setAgent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Agent::class); - $this->agent = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigOperationMetadata.php deleted file mode 100644 index 72ad8f5015e9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigOperationMetadata.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata - */ -class SetSuggestionFeatureConfigOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the conversation profile. Format: - * `projects//locations//conversationProfiles/` - * - * Generated from protobuf field string conversation_profile = 1; - */ - protected $conversation_profile = ''; - /** - * Required. The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $participant_role = 0; - /** - * Required. The type of the suggestion feature to add or update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $suggestion_feature_type = 0; - /** - * Timestamp whe the request was created. The time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_profile - * The resource name of the conversation profile. Format: - * `projects//locations//conversationProfiles/` - * @type int $participant_role - * Required. The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * @type int $suggestion_feature_type - * Required. The type of the suggestion feature to add or update. - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp whe the request was created. The time is measured on server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the conversation profile. Format: - * `projects//locations//conversationProfiles/` - * - * Generated from protobuf field string conversation_profile = 1; - * @return string - */ - public function getConversationProfile() - { - return $this->conversation_profile; - } - - /** - * The resource name of the conversation profile. Format: - * `projects//locations//conversationProfiles/` - * - * Generated from protobuf field string conversation_profile = 1; - * @param string $var - * @return $this - */ - public function setConversationProfile($var) - { - GPBUtil::checkString($var, True); - $this->conversation_profile = $var; - - return $this; - } - - /** - * Required. The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getParticipantRole() - { - return $this->participant_role; - } - - /** - * Required. The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setParticipantRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); - $this->participant_role = $var; - - return $this; - } - - /** - * Required. The type of the suggestion feature to add or update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSuggestionFeatureType() - { - return $this->suggestion_feature_type; - } - - /** - * Required. The type of the suggestion feature to add or update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type suggestion_feature_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSuggestionFeatureType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type::class); - $this->suggestion_feature_type = $var; - - return $this; - } - - /** - * Timestamp whe the request was created. The time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @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); - } - - /** - * Timestamp whe the request was created. The time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigRequest.php deleted file mode 100644 index 36a3490c3c87..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SetSuggestionFeatureConfigRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest - */ -class SetSuggestionFeatureConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation_profile = ''; - /** - * Required. The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $participant_role = 0; - /** - * Required. The suggestion feature config to add or update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $suggestion_feature_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_profile - * Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * @type int $participant_role - * Required. The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig $suggestion_feature_config - * Required. The suggestion feature config to add or update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConversationProfile() - { - return $this->conversation_profile; - } - - /** - * Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * - * Generated from protobuf field string conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConversationProfile($var) - { - GPBUtil::checkString($var, True); - $this->conversation_profile = $var; - - return $this; - } - - /** - * Required. The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getParticipantRole() - { - return $this->participant_role; - } - - /** - * Required. The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setParticipantRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class); - $this->participant_role = $var; - - return $this; - } - - /** - * Required. The suggestion feature config to add or update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig|null - */ - public function getSuggestionFeatureConfig() - { - return $this->suggestion_feature_config; - } - - public function hasSuggestionFeatureConfig() - { - return isset($this->suggestion_feature_config); - } - - public function clearSuggestionFeatureConfig() - { - unset($this->suggestion_feature_config); - } - - /** - * Required. The suggestion feature config to add or update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig $var - * @return $this - */ - public function setSuggestionFeatureConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionFeatureConfig::class); - $this->suggestion_feature_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyAnswer.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyAnswer.php deleted file mode 100644 index 3a2493d155e0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyAnswer.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.dialogflow.v2.SmartReplyAnswer - */ -class SmartReplyAnswer extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the reply. - * - * Generated from protobuf field string reply = 1; - */ - protected $reply = ''; - /** - * Smart reply confidence. - * The system's confidence score that this reply is a good match for - * this conversation, as a value from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * - * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { - */ - protected $answer_record = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $reply - * The content of the reply. - * @type float $confidence - * Smart reply confidence. - * The system's confidence score that this reply is a good match for - * this conversation, as a value from 0.0 (completely uncertain) to 1.0 - * (completely certain). - * @type string $answer_record - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::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; - } - - /** - * Smart reply confidence. - * The system's confidence score that this reply is a good match for - * this conversation, as a value 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; - } - - /** - * Smart reply confidence. - * The system's confidence score that this reply is a good match for - * this conversation, as a value 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; - } - - /** - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * - * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getAnswerRecord() - { - return $this->answer_record; - } - - /** - * The name of answer record, in the format of - * "projects//locations//answerRecords/" - * - * Generated from protobuf field string answer_record = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAnswerRecord($var) - { - GPBUtil::checkString($var, True); - $this->answer_record = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics.php deleted file mode 100644 index b191f64c4706..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dialogflow.v2.SmartReplyMetrics - */ -class SmartReplyMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Percentage of target participant messages in the evaluation dataset for - * which similar messages have appeared at least once in the allowlist. Should - * be [0, 1]. - * - * Generated from protobuf field float allowlist_coverage = 1; - */ - protected $allowlist_coverage = 0.0; - /** - * Metrics of top n smart replies, sorted by [TopNMetric.n][]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics top_n_metrics = 2; - */ - private $top_n_metrics; - /** - * Total number of conversations used to generate this metric. - * - * Generated from protobuf field int64 conversation_count = 3; - */ - protected $conversation_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $allowlist_coverage - * Percentage of target participant messages in the evaluation dataset for - * which similar messages have appeared at least once in the allowlist. Should - * be [0, 1]. - * @type array<\Google\Cloud\Dialogflow\V2\SmartReplyMetrics\TopNMetrics>|\Google\Protobuf\Internal\RepeatedField $top_n_metrics - * Metrics of top n smart replies, sorted by [TopNMetric.n][]. - * @type int|string $conversation_count - * Total number of conversations used to generate this metric. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Percentage of target participant messages in the evaluation dataset for - * which similar messages have appeared at least once in the allowlist. Should - * be [0, 1]. - * - * Generated from protobuf field float allowlist_coverage = 1; - * @return float - */ - public function getAllowlistCoverage() - { - return $this->allowlist_coverage; - } - - /** - * Percentage of target participant messages in the evaluation dataset for - * which similar messages have appeared at least once in the allowlist. Should - * be [0, 1]. - * - * Generated from protobuf field float allowlist_coverage = 1; - * @param float $var - * @return $this - */ - public function setAllowlistCoverage($var) - { - GPBUtil::checkFloat($var); - $this->allowlist_coverage = $var; - - return $this; - } - - /** - * Metrics of top n smart replies, sorted by [TopNMetric.n][]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics top_n_metrics = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTopNMetrics() - { - return $this->top_n_metrics; - } - - /** - * Metrics of top n smart replies, sorted by [TopNMetric.n][]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics top_n_metrics = 2; - * @param array<\Google\Cloud\Dialogflow\V2\SmartReplyMetrics\TopNMetrics>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTopNMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SmartReplyMetrics\TopNMetrics::class); - $this->top_n_metrics = $arr; - - return $this; - } - - /** - * Total number of conversations used to generate this metric. - * - * Generated from protobuf field int64 conversation_count = 3; - * @return int|string - */ - public function getConversationCount() - { - return $this->conversation_count; - } - - /** - * Total number of conversations used to generate this metric. - * - * Generated from protobuf field int64 conversation_count = 3; - * @param int|string $var - * @return $this - */ - public function setConversationCount($var) - { - GPBUtil::checkInt64($var); - $this->conversation_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics/TopNMetrics.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics/TopNMetrics.php deleted file mode 100644 index eb1c7e7530cf..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics/TopNMetrics.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - */ -class TopNMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Number of retrieved smart replies. For example, when `n` is 3, this - * evaluation contains metrics for when Dialogflow retrieves 3 smart replies - * with the model. - * - * Generated from protobuf field int32 n = 1; - */ - protected $n = 0; - /** - * Defined as `number of queries whose top n smart replies have at least one - * similar (token match similarity above the defined threshold) reply as the - * real reply` divided by `number of queries with at least one smart reply`. - * Value ranges from 0.0 to 1.0 inclusive. - * - * Generated from protobuf field float recall = 2; - */ - protected $recall = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $n - * Number of retrieved smart replies. For example, when `n` is 3, this - * evaluation contains metrics for when Dialogflow retrieves 3 smart replies - * with the model. - * @type float $recall - * Defined as `number of queries whose top n smart replies have at least one - * similar (token match similarity above the defined threshold) reply as the - * real reply` divided by `number of queries with at least one smart reply`. - * Value ranges from 0.0 to 1.0 inclusive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Number of retrieved smart replies. For example, when `n` is 3, this - * evaluation contains metrics for when Dialogflow retrieves 3 smart replies - * with the model. - * - * Generated from protobuf field int32 n = 1; - * @return int - */ - public function getN() - { - return $this->n; - } - - /** - * Number of retrieved smart replies. For example, when `n` is 3, this - * evaluation contains metrics for when Dialogflow retrieves 3 smart replies - * with the model. - * - * Generated from protobuf field int32 n = 1; - * @param int $var - * @return $this - */ - public function setN($var) - { - GPBUtil::checkInt32($var); - $this->n = $var; - - return $this; - } - - /** - * Defined as `number of queries whose top n smart replies have at least one - * similar (token match similarity above the defined threshold) reply as the - * real reply` divided by `number of queries with at least one smart reply`. - * Value ranges from 0.0 to 1.0 inclusive. - * - * Generated from protobuf field float recall = 2; - * @return float - */ - public function getRecall() - { - return $this->recall; - } - - /** - * Defined as `number of queries whose top n smart replies have at least one - * similar (token match similarity above the defined threshold) reply as the - * real reply` divided by `number of queries with at least one smart reply`. - * Value ranges from 0.0 to 1.0 inclusive. - * - * Generated from protobuf field float recall = 2; - * @param float $var - * @return $this - */ - public function setRecall($var) - { - GPBUtil::checkFloat($var); - $this->recall = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TopNMetrics::class, \Google\Cloud\Dialogflow\V2\SmartReplyMetrics_TopNMetrics::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics_TopNMetrics.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics_TopNMetrics.php deleted file mode 100644 index 1b2212b38487..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SmartReplyMetrics_TopNMetrics.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.SmartReplyModelMetadata - */ -class SmartReplyModelMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Type of the smart reply model. If not provided, model_type is - * used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $training_model_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $training_model_type - * Optional. Type of the smart reply model. If not provided, model_type is - * used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Type of the smart reply model. If not provided, model_type is - * used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTrainingModelType() - { - return $this->training_model_type; - } - - /** - * Optional. Type of the smart reply model. If not provided, model_type is - * used. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTrainingModelType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationModel\ModelType::class); - $this->training_model_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechContext.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechContext.php deleted file mode 100644 index 07a14528011f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechContext.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.dialogflow.v2.SpeechContext - */ -class SpeechContext extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of strings containing words and phrases that the speech - * recognizer should recognize with higher likelihood. - * This list can be used to: - * * improve accuracy for words and phrases you expect the user to say, - * e.g. typical commands for your Dialogflow agent - * * add additional words to the speech recognizer vocabulary - * * ... - * See the [Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/quotas) for usage - * limits. - * - * Generated from protobuf field repeated string phrases = 1; - */ - private $phrases; - /** - * Optional. Boost for this context compared to other contexts: - * * If the boost is positive, Dialogflow will increase the probability that - * the phrases in this context are recognized over similar sounding phrases. - * * If the boost is unspecified or non-positive, Dialogflow will not apply - * any boost. - * Dialogflow recommends that you use boosts in the range (0, 20] and that you - * find a value that fits your use case with binary search. - * - * Generated from protobuf field float boost = 2; - */ - protected $boost = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $phrases - * Optional. A list of strings containing words and phrases that the speech - * recognizer should recognize with higher likelihood. - * This list can be used to: - * * improve accuracy for words and phrases you expect the user to say, - * e.g. typical commands for your Dialogflow agent - * * add additional words to the speech recognizer vocabulary - * * ... - * See the [Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/quotas) for usage - * limits. - * @type float $boost - * Optional. Boost for this context compared to other contexts: - * * If the boost is positive, Dialogflow will increase the probability that - * the phrases in this context are recognized over similar sounding phrases. - * * If the boost is unspecified or non-positive, Dialogflow will not apply - * any boost. - * Dialogflow recommends that you use boosts in the range (0, 20] and that you - * find a value that fits your use case with binary search. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of strings containing words and phrases that the speech - * recognizer should recognize with higher likelihood. - * This list can be used to: - * * improve accuracy for words and phrases you expect the user to say, - * e.g. typical commands for your Dialogflow agent - * * add additional words to the speech recognizer vocabulary - * * ... - * See the [Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/quotas) for usage - * limits. - * - * Generated from protobuf field repeated string phrases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPhrases() - { - return $this->phrases; - } - - /** - * Optional. A list of strings containing words and phrases that the speech - * recognizer should recognize with higher likelihood. - * This list can be used to: - * * improve accuracy for words and phrases you expect the user to say, - * e.g. typical commands for your Dialogflow agent - * * add additional words to the speech recognizer vocabulary - * * ... - * See the [Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/quotas) for usage - * limits. - * - * Generated from protobuf field repeated string phrases = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPhrases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->phrases = $arr; - - return $this; - } - - /** - * Optional. Boost for this context compared to other contexts: - * * If the boost is positive, Dialogflow will increase the probability that - * the phrases in this context are recognized over similar sounding phrases. - * * If the boost is unspecified or non-positive, Dialogflow will not apply - * any boost. - * Dialogflow recommends that you use boosts in the range (0, 20] and that you - * find a value that fits your use case with binary search. - * - * Generated from protobuf field float boost = 2; - * @return float - */ - public function getBoost() - { - return $this->boost; - } - - /** - * Optional. Boost for this context compared to other contexts: - * * If the boost is positive, Dialogflow will increase the probability that - * the phrases in this context are recognized over similar sounding phrases. - * * If the boost is unspecified or non-positive, Dialogflow will not apply - * any boost. - * Dialogflow recommends that you use boosts in the range (0, 20] and that you - * find a value that fits your use case with binary search. - * - * Generated from protobuf field float boost = 2; - * @param float $var - * @return $this - */ - public function setBoost($var) - { - GPBUtil::checkFloat($var); - $this->boost = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechModelVariant.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechModelVariant.php deleted file mode 100644 index ea10fcdb7041..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechModelVariant.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.v2.SpeechModelVariant - */ -class SpeechModelVariant -{ - /** - * No model variant specified. In this case Dialogflow defaults to - * USE_BEST_AVAILABLE. - * - * Generated from protobuf enum SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; - */ - const SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; - /** - * Use the best available variant of the [Speech - * model][InputAudioConfig.model] that the caller is eligible for. - * Please see the [Dialogflow - * docs](https://cloud.google.com/dialogflow/docs/data-logging) for - * how to make your project eligible for enhanced models. - * - * Generated from protobuf enum USE_BEST_AVAILABLE = 1; - */ - const USE_BEST_AVAILABLE = 1; - /** - * Use standard model variant even if an enhanced model is available. See the - * [Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) - * for details about enhanced models. - * - * Generated from protobuf enum USE_STANDARD = 2; - */ - const USE_STANDARD = 2; - /** - * Use an enhanced model variant: - * * If an enhanced variant does not exist for the given - * [model][google.cloud.dialogflow.v2.InputAudioConfig.model] and request - * language, Dialogflow falls back to the standard variant. - * The [Cloud Speech - * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) - * describes which models have enhanced variants. - * * If the API caller isn't eligible for enhanced models, Dialogflow returns - * an error. Please see the [Dialogflow - * docs](https://cloud.google.com/dialogflow/docs/data-logging) - * for how to make your project eligible. - * - * Generated from protobuf enum USE_ENHANCED = 3; - */ - const USE_ENHANCED = 3; - - private static $valueToName = [ - self::SPEECH_MODEL_VARIANT_UNSPECIFIED => 'SPEECH_MODEL_VARIANT_UNSPECIFIED', - self::USE_BEST_AVAILABLE => 'USE_BEST_AVAILABLE', - self::USE_STANDARD => 'USE_STANDARD', - self::USE_ENHANCED => 'USE_ENHANCED', - ]; - - 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechToTextConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechToTextConfig.php deleted file mode 100644 index 0015c8fb766a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechToTextConfig.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.dialogflow.v2.SpeechToTextConfig - */ -class SpeechToTextConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The speech model used in speech to text. - * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - * `USE_ENHANCED`. It can be overridden in - * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] - * and - * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] - * request. If enhanced model variant is specified and an enhanced version of - * the specified model for the language does not exist, then it would emit an - * error. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1; - */ - protected $speech_model_variant = 0; - /** - * Which Speech model to select. Select the model best suited to your domain - * to get best results. If a model is not explicitly specified, then a default - * model is used. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - * for more details. - * - * Generated from protobuf field string model = 2; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $speech_model_variant - * The speech model used in speech to text. - * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - * `USE_ENHANCED`. It can be overridden in - * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] - * and - * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] - * request. If enhanced model variant is specified and an enhanced version of - * the specified model for the language does not exist, then it would emit an - * error. - * @type string $model - * Which Speech model to select. Select the model best suited to your domain - * to get best results. If a model is not explicitly specified, then a default - * model is used. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - * for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * The speech model used in speech to text. - * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - * `USE_ENHANCED`. It can be overridden in - * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] - * and - * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] - * request. If enhanced model variant is specified and an enhanced version of - * the specified model for the language does not exist, then it would emit an - * error. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1; - * @return int - */ - public function getSpeechModelVariant() - { - return $this->speech_model_variant; - } - - /** - * The speech model used in speech to text. - * `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - * `USE_ENHANCED`. It can be overridden in - * [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] - * and - * [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] - * request. If enhanced model variant is specified and an enhanced version of - * the specified model for the language does not exist, then it would emit an - * error. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1; - * @param int $var - * @return $this - */ - public function setSpeechModelVariant($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SpeechModelVariant::class); - $this->speech_model_variant = $var; - - return $this; - } - - /** - * Which Speech model to select. Select the model best suited to your domain - * to get best results. If a model is not explicitly specified, then a default - * model is used. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - * for more details. - * - * Generated from protobuf field string model = 2; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Which Speech model to select. Select the model best suited to your domain - * to get best results. If a model is not explicitly specified, then a default - * model is used. - * Refer to - * [Cloud Speech API - * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - * for more details. - * - * Generated from protobuf field string model = 2; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechWordInfo.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechWordInfo.php deleted file mode 100644 index 6070b604df91..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SpeechWordInfo.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.dialogflow.v2.SpeechWordInfo - */ -class SpeechWordInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The word this info is for. - * - * Generated from protobuf field string word = 3; - */ - protected $word = ''; - /** - * Time offset relative to the beginning of the audio that corresponds to the - * start of the spoken word. This is an experimental feature and the accuracy - * of the time offset can vary. - * - * Generated from protobuf field .google.protobuf.Duration start_offset = 1; - */ - protected $start_offset = null; - /** - * Time offset relative to the beginning of the audio that corresponds to the - * end of the spoken word. This is an experimental feature and the accuracy of - * the time offset can vary. - * - * Generated from protobuf field .google.protobuf.Duration end_offset = 2; - */ - protected $end_offset = null; - /** - * The Speech confidence between 0.0 and 1.0 for this word. A higher number - * indicates an estimated greater likelihood that the recognized word is - * correct. The default of 0.0 is a sentinel value indicating that confidence - * was not set. - * This field is not guaranteed to be fully stable over time for the same - * audio input. Users should also not rely on it to always be provided. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $word - * The word this info is for. - * @type \Google\Protobuf\Duration $start_offset - * Time offset relative to the beginning of the audio that corresponds to the - * start of the spoken word. This is an experimental feature and the accuracy - * of the time offset can vary. - * @type \Google\Protobuf\Duration $end_offset - * Time offset relative to the beginning of the audio that corresponds to the - * end of the spoken word. This is an experimental feature and the accuracy of - * the time offset can vary. - * @type float $confidence - * The Speech confidence between 0.0 and 1.0 for this word. A higher number - * indicates an estimated greater likelihood that the recognized word is - * correct. The default of 0.0 is a sentinel value indicating that confidence - * was not set. - * This field is not guaranteed to be fully stable over time for the same - * audio input. Users should also not rely on it to always be provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * The word this info is for. - * - * Generated from protobuf field string word = 3; - * @return string - */ - public function getWord() - { - return $this->word; - } - - /** - * The word this info is for. - * - * 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; - } - - /** - * Time offset relative to the beginning of the audio that corresponds to the - * start of the spoken word. This is an experimental feature and the accuracy - * of the time offset can vary. - * - * 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 relative to the beginning of the audio that corresponds to the - * start of the spoken word. This is an experimental feature and the accuracy - * of the time offset can vary. - * - * 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 relative to the beginning of the audio that corresponds to the - * end of the spoken word. This is an experimental feature and the accuracy of - * the time offset can vary. - * - * 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 relative to the beginning of the audio that corresponds to the - * end of the spoken word. This is an experimental feature and the accuracy of - * the time offset can vary. - * - * 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 Speech confidence between 0.0 and 1.0 for this word. A higher number - * indicates an estimated greater likelihood that the recognized word is - * correct. The default of 0.0 is a sentinel value indicating that confidence - * was not set. - * This field is not guaranteed to be fully stable over time for the same - * audio input. Users should also not rely on it to always be provided. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The Speech confidence between 0.0 and 1.0 for this word. A higher number - * indicates an estimated greater likelihood that the recognized word is - * correct. The default of 0.0 is a sentinel value indicating that confidence - * was not set. - * This field is not guaranteed to be fully stable over time for the same - * audio input. Users should also not rely on it to always be provided. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SsmlVoiceGender.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SsmlVoiceGender.php deleted file mode 100644 index 2508c1bc6e5e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SsmlVoiceGender.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.v2.SsmlVoiceGender - */ -class SsmlVoiceGender -{ - /** - * An unspecified gender, which means that the client doesn't care which - * gender the selected voice will have. - * - * Generated from protobuf enum SSML_VOICE_GENDER_UNSPECIFIED = 0; - */ - const SSML_VOICE_GENDER_UNSPECIFIED = 0; - /** - * A male voice. - * - * Generated from protobuf enum SSML_VOICE_GENDER_MALE = 1; - */ - const SSML_VOICE_GENDER_MALE = 1; - /** - * A female voice. - * - * Generated from protobuf enum SSML_VOICE_GENDER_FEMALE = 2; - */ - const SSML_VOICE_GENDER_FEMALE = 2; - /** - * A gender-neutral voice. - * - * Generated from protobuf enum SSML_VOICE_GENDER_NEUTRAL = 3; - */ - const SSML_VOICE_GENDER_NEUTRAL = 3; - - private static $valueToName = [ - self::SSML_VOICE_GENDER_UNSPECIFIED => 'SSML_VOICE_GENDER_UNSPECIFIED', - self::SSML_VOICE_GENDER_MALE => 'SSML_VOICE_GENDER_MALE', - self::SSML_VOICE_GENDER_FEMALE => 'SSML_VOICE_GENDER_FEMALE', - self::SSML_VOICE_GENDER_NEUTRAL => 'SSML_VOICE_GENDER_NEUTRAL', - ]; - - 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentRequest.php deleted file mode 100644 index 36e32de6425f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentRequest.php +++ /dev/null @@ -1,565 +0,0 @@ -google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest - */ -class StreamingAnalyzeContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the participant this text comes from. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $participant = ''; - /** - * Speech synthesis configuration. - * The speech synthesis settings for a virtual agent that may be configured - * for the associated conversation profile are not used when calling - * StreamingAnalyzeContent. If this configuration is not supplied, speech - * synthesis is disabled. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4; - */ - protected $reply_audio_config = null; - /** - * Parameters for a Dialogflow virtual-agent query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 7; - */ - protected $query_params = null; - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8; - */ - protected $assist_query_params = null; - /** - * Additional parameters to be put into Dialogflow CX session parameters. To - * remove a parameter from the session, clients should explicitly set the - * parameter value to null. - * Note: this field should only be used if you are connecting to a Dialogflow - * CX agent. - * - * Generated from protobuf field .google.protobuf.Struct cx_parameters = 13; - */ - protected $cx_parameters = null; - /** - * Enable partial virtual agent responses. If this flag is not enabled, - * response stream still contains only one final response even if some - * `Fulfillment`s in Dialogflow virtual agent have been configured to return - * partial responses. - * - * Generated from protobuf field bool enable_partial_automated_agent_reply = 12; - */ - protected $enable_partial_automated_agent_reply = false; - protected $config; - protected $input; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $participant - * Required. The name of the participant this text comes from. - * Format: `projects//locations//conversations//participants/`. - * @type \Google\Cloud\Dialogflow\V2\InputAudioConfig $audio_config - * Instructs the speech recognizer how to process the speech audio. - * @type \Google\Cloud\Dialogflow\V2\InputTextConfig $text_config - * The natural language text to be processed. - * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $reply_audio_config - * Speech synthesis configuration. - * The speech synthesis settings for a virtual agent that may be configured - * for the associated conversation profile are not used when calling - * StreamingAnalyzeContent. If this configuration is not supplied, speech - * synthesis is disabled. - * @type string $input_audio - * The input audio content to be recognized. Must be sent if `audio_config` - * is set in the first message. The complete audio over all streaming - * messages must not exceed 1 minute. - * @type string $input_text - * The UTF-8 encoded natural language text to be processed. Must be sent if - * `text_config` is set in the first message. Text length must not exceed - * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. - * @type \Google\Cloud\Dialogflow\V2\TelephonyDtmfEvents $input_dtmf - * The DTMF digits used to invoke intent and fill in parameter value. - * This input is ignored if the previous response indicated that DTMF input - * is not accepted. - * @type \Google\Cloud\Dialogflow\V2\QueryParameters $query_params - * Parameters for a Dialogflow virtual-agent query. - * @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params - * Parameters for a human assist query. - * @type \Google\Protobuf\Struct $cx_parameters - * Additional parameters to be put into Dialogflow CX session parameters. To - * remove a parameter from the session, clients should explicitly set the - * parameter value to null. - * Note: this field should only be used if you are connecting to a Dialogflow - * CX agent. - * @type bool $enable_partial_automated_agent_reply - * Enable partial virtual agent responses. If this flag is not enabled, - * response stream still contains only one final response even if some - * `Fulfillment`s in Dialogflow virtual agent have been configured to return - * partial responses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the participant this text comes from. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParticipant() - { - return $this->participant; - } - - /** - * Required. The name of the participant this text comes from. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParticipant($var) - { - GPBUtil::checkString($var, True); - $this->participant = $var; - - return $this; - } - - /** - * Instructs the speech recognizer how to process the speech audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2; - * @return \Google\Cloud\Dialogflow\V2\InputAudioConfig|null - */ - public function getAudioConfig() - { - return $this->readOneof(2); - } - - public function hasAudioConfig() - { - return $this->hasOneof(2); - } - - /** - * Instructs the speech recognizer how to process the speech audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2; - * @param \Google\Cloud\Dialogflow\V2\InputAudioConfig $var - * @return $this - */ - public function setAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputAudioConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The natural language text to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputTextConfig text_config = 3; - * @return \Google\Cloud\Dialogflow\V2\InputTextConfig|null - */ - public function getTextConfig() - { - return $this->readOneof(3); - } - - public function hasTextConfig() - { - return $this->hasOneof(3); - } - - /** - * The natural language text to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.InputTextConfig text_config = 3; - * @param \Google\Cloud\Dialogflow\V2\InputTextConfig $var - * @return $this - */ - public function setTextConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputTextConfig::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Speech synthesis configuration. - * The speech synthesis settings for a virtual agent that may be configured - * for the associated conversation profile are not used when calling - * StreamingAnalyzeContent. If this configuration is not supplied, speech - * synthesis is disabled. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4; - * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null - */ - public function getReplyAudioConfig() - { - return $this->reply_audio_config; - } - - public function hasReplyAudioConfig() - { - return isset($this->reply_audio_config); - } - - public function clearReplyAudioConfig() - { - unset($this->reply_audio_config); - } - - /** - * Speech synthesis configuration. - * The speech synthesis settings for a virtual agent that may be configured - * for the associated conversation profile are not used when calling - * StreamingAnalyzeContent. If this configuration is not supplied, speech - * synthesis is disabled. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4; - * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var - * @return $this - */ - public function setReplyAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); - $this->reply_audio_config = $var; - - return $this; - } - - /** - * The input audio content to be recognized. Must be sent if `audio_config` - * is set in the first message. The complete audio over all streaming - * messages must not exceed 1 minute. - * - * Generated from protobuf field bytes input_audio = 5; - * @return string - */ - public function getInputAudio() - { - return $this->readOneof(5); - } - - public function hasInputAudio() - { - return $this->hasOneof(5); - } - - /** - * The input audio content to be recognized. Must be sent if `audio_config` - * is set in the first message. The complete audio over all streaming - * messages must not exceed 1 minute. - * - * Generated from protobuf field bytes input_audio = 5; - * @param string $var - * @return $this - */ - public function setInputAudio($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The UTF-8 encoded natural language text to be processed. Must be sent if - * `text_config` is set in the first message. Text length must not exceed - * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. - * - * Generated from protobuf field string input_text = 6; - * @return string - */ - public function getInputText() - { - return $this->readOneof(6); - } - - public function hasInputText() - { - return $this->hasOneof(6); - } - - /** - * The UTF-8 encoded natural language text to be processed. Must be sent if - * `text_config` is set in the first message. Text length must not exceed - * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. - * - * Generated from protobuf field string input_text = 6; - * @param string $var - * @return $this - */ - public function setInputText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The DTMF digits used to invoke intent and fill in parameter value. - * This input is ignored if the previous response indicated that DTMF input - * is not accepted. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9; - * @return \Google\Cloud\Dialogflow\V2\TelephonyDtmfEvents|null - */ - public function getInputDtmf() - { - return $this->readOneof(9); - } - - public function hasInputDtmf() - { - return $this->hasOneof(9); - } - - /** - * The DTMF digits used to invoke intent and fill in parameter value. - * This input is ignored if the previous response indicated that DTMF input - * is not accepted. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9; - * @param \Google\Cloud\Dialogflow\V2\TelephonyDtmfEvents $var - * @return $this - */ - public function setInputDtmf($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TelephonyDtmfEvents::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Parameters for a Dialogflow virtual-agent query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 7; - * @return \Google\Cloud\Dialogflow\V2\QueryParameters|null - */ - public function getQueryParams() - { - return $this->query_params; - } - - public function hasQueryParams() - { - return isset($this->query_params); - } - - public function clearQueryParams() - { - unset($this->query_params); - } - - /** - * Parameters for a Dialogflow virtual-agent query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 7; - * @param \Google\Cloud\Dialogflow\V2\QueryParameters $var - * @return $this - */ - public function setQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class); - $this->query_params = $var; - - return $this; - } - - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8; - * @return \Google\Cloud\Dialogflow\V2\AssistQueryParameters|null - */ - public function getAssistQueryParams() - { - return $this->assist_query_params; - } - - public function hasAssistQueryParams() - { - return isset($this->assist_query_params); - } - - public function clearAssistQueryParams() - { - unset($this->assist_query_params); - } - - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8; - * @param \Google\Cloud\Dialogflow\V2\AssistQueryParameters $var - * @return $this - */ - public function setAssistQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AssistQueryParameters::class); - $this->assist_query_params = $var; - - return $this; - } - - /** - * Additional parameters to be put into Dialogflow CX session parameters. To - * remove a parameter from the session, clients should explicitly set the - * parameter value to null. - * Note: this field should only be used if you are connecting to a Dialogflow - * CX agent. - * - * Generated from protobuf field .google.protobuf.Struct cx_parameters = 13; - * @return \Google\Protobuf\Struct|null - */ - public function getCxParameters() - { - return $this->cx_parameters; - } - - public function hasCxParameters() - { - return isset($this->cx_parameters); - } - - public function clearCxParameters() - { - unset($this->cx_parameters); - } - - /** - * Additional parameters to be put into Dialogflow CX session parameters. To - * remove a parameter from the session, clients should explicitly set the - * parameter value to null. - * Note: this field should only be used if you are connecting to a Dialogflow - * CX agent. - * - * Generated from protobuf field .google.protobuf.Struct cx_parameters = 13; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setCxParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->cx_parameters = $var; - - return $this; - } - - /** - * Enable partial virtual agent responses. If this flag is not enabled, - * response stream still contains only one final response even if some - * `Fulfillment`s in Dialogflow virtual agent have been configured to return - * partial responses. - * - * Generated from protobuf field bool enable_partial_automated_agent_reply = 12; - * @return bool - */ - public function getEnablePartialAutomatedAgentReply() - { - return $this->enable_partial_automated_agent_reply; - } - - /** - * Enable partial virtual agent responses. If this flag is not enabled, - * response stream still contains only one final response even if some - * `Fulfillment`s in Dialogflow virtual agent have been configured to return - * partial responses. - * - * Generated from protobuf field bool enable_partial_automated_agent_reply = 12; - * @param bool $var - * @return $this - */ - public function setEnablePartialAutomatedAgentReply($var) - { - GPBUtil::checkBool($var); - $this->enable_partial_automated_agent_reply = $var; - - return $this; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - - /** - * @return string - */ - public function getInput() - { - return $this->whichOneof("input"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentResponse.php deleted file mode 100644 index 1cbcdc00558b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingAnalyzeContentResponse.php +++ /dev/null @@ -1,452 +0,0 @@ -= 1) messages contain - * `human_agent_suggestion_results`, `end_user_suggestion_results` or - * `message`. - * - * Generated from protobuf message google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse - */ -class StreamingAnalyzeContentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of speech recognition. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 1; - */ - protected $recognition_result = null; - /** - * The output text content. - * This field is set if an automated agent responded with a text for the user. - * - * Generated from protobuf field string reply_text = 2; - */ - protected $reply_text = ''; - /** - * The audio data bytes encoded as specified in the request. - * This field is set if: - * - The `reply_audio_config` field is specified in the request. - * - The automated agent, which this output comes from, responded with audio. - * In such case, the `reply_audio.config` field contains settings used to - * synthesize the speech. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 3; - */ - protected $reply_audio = null; - /** - * Only set if a Dialogflow automated agent has responded. - * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use - * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] - * instead. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 4; - */ - protected $automated_agent_reply = null; - /** - * Message analyzed by CCAI. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 6; - */ - protected $message = null; - /** - * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 7; - */ - private $human_agent_suggestion_results; - /** - * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 8; - */ - private $end_user_suggestion_results; - /** - * Indicates the parameters of DTMF. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 10; - */ - protected $dtmf_parameters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult $recognition_result - * The result of speech recognition. - * @type string $reply_text - * The output text content. - * This field is set if an automated agent responded with a text for the user. - * @type \Google\Cloud\Dialogflow\V2\OutputAudio $reply_audio - * The audio data bytes encoded as specified in the request. - * This field is set if: - * - The `reply_audio_config` field is specified in the request. - * - The automated agent, which this output comes from, responded with audio. - * In such case, the `reply_audio.config` field contains settings used to - * synthesize the speech. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * @type \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $automated_agent_reply - * Only set if a Dialogflow automated agent has responded. - * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use - * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] - * instead. - * @type \Google\Cloud\Dialogflow\V2\Message $message - * Message analyzed by CCAI. - * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $human_agent_suggestion_results - * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. - * @type array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $end_user_suggestion_results - * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. - * @type \Google\Cloud\Dialogflow\V2\DtmfParameters $dtmf_parameters - * Indicates the parameters of DTMF. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * The result of speech recognition. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 1; - * @return \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult|null - */ - public function getRecognitionResult() - { - return $this->recognition_result; - } - - public function hasRecognitionResult() - { - return isset($this->recognition_result); - } - - public function clearRecognitionResult() - { - unset($this->recognition_result); - } - - /** - * The result of speech recognition. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 1; - * @param \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult $var - * @return $this - */ - public function setRecognitionResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult::class); - $this->recognition_result = $var; - - return $this; - } - - /** - * The output text content. - * This field is set if an automated agent responded with a text for the user. - * - * Generated from protobuf field string reply_text = 2; - * @return string - */ - public function getReplyText() - { - return $this->reply_text; - } - - /** - * The output text content. - * This field is set if an automated agent responded with a text for the user. - * - * Generated from protobuf field string reply_text = 2; - * @param string $var - * @return $this - */ - public function setReplyText($var) - { - GPBUtil::checkString($var, True); - $this->reply_text = $var; - - return $this; - } - - /** - * The audio data bytes encoded as specified in the request. - * This field is set if: - * - The `reply_audio_config` field is specified in the request. - * - The automated agent, which this output comes from, responded with audio. - * In such case, the `reply_audio.config` field contains settings used to - * synthesize the speech. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 3; - * @return \Google\Cloud\Dialogflow\V2\OutputAudio|null - */ - public function getReplyAudio() - { - return $this->reply_audio; - } - - public function hasReplyAudio() - { - return isset($this->reply_audio); - } - - public function clearReplyAudio() - { - unset($this->reply_audio); - } - - /** - * The audio data bytes encoded as specified in the request. - * This field is set if: - * - The `reply_audio_config` field is specified in the request. - * - The automated agent, which this output comes from, responded with audio. - * In such case, the `reply_audio.config` field contains settings used to - * synthesize the speech. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudio reply_audio = 3; - * @param \Google\Cloud\Dialogflow\V2\OutputAudio $var - * @return $this - */ - public function setReplyAudio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudio::class); - $this->reply_audio = $var; - - return $this; - } - - /** - * Only set if a Dialogflow automated agent has responded. - * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use - * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] - * instead. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 4; - * @return \Google\Cloud\Dialogflow\V2\AutomatedAgentReply|null - */ - public function getAutomatedAgentReply() - { - return $this->automated_agent_reply; - } - - public function hasAutomatedAgentReply() - { - return isset($this->automated_agent_reply); - } - - public function clearAutomatedAgentReply() - { - unset($this->automated_agent_reply); - } - - /** - * Only set if a Dialogflow automated agent has responded. - * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - * and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - * are always empty, use - * [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] - * instead. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AutomatedAgentReply automated_agent_reply = 4; - * @param \Google\Cloud\Dialogflow\V2\AutomatedAgentReply $var - * @return $this - */ - public function setAutomatedAgentReply($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AutomatedAgentReply::class); - $this->automated_agent_reply = $var; - - return $this; - } - - /** - * Message analyzed by CCAI. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 6; - * @return \Google\Cloud\Dialogflow\V2\Message|null - */ - public function getMessage() - { - return $this->message; - } - - public function hasMessage() - { - return isset($this->message); - } - - public function clearMessage() - { - unset($this->message); - } - - /** - * Message analyzed by CCAI. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Message message = 6; - * @param \Google\Cloud\Dialogflow\V2\Message $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Message::class); - $this->message = $var; - - return $this; - } - - /** - * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHumanAgentSuggestionResults() - { - return $this->human_agent_suggestion_results; - } - - /** - * The suggestions for most recent human agent. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult human_agent_suggestion_results = 7; - * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHumanAgentSuggestionResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); - $this->human_agent_suggestion_results = $arr; - - return $this; - } - - /** - * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndUserSuggestionResults() - { - return $this->end_user_suggestion_results; - } - - /** - * The suggestions for end user. The order is the same as - * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] - * of - * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SuggestionResult end_user_suggestion_results = 8; - * @param array<\Google\Cloud\Dialogflow\V2\SuggestionResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndUserSuggestionResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SuggestionResult::class); - $this->end_user_suggestion_results = $arr; - - return $this; - } - - /** - * Indicates the parameters of DTMF. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 10; - * @return \Google\Cloud\Dialogflow\V2\DtmfParameters|null - */ - public function getDtmfParameters() - { - return $this->dtmf_parameters; - } - - public function hasDtmfParameters() - { - return isset($this->dtmf_parameters); - } - - public function clearDtmfParameters() - { - unset($this->dtmf_parameters); - } - - /** - * Indicates the parameters of DTMF. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.DtmfParameters dtmf_parameters = 10; - * @param \Google\Cloud\Dialogflow\V2\DtmfParameters $var - * @return $this - */ - public function setDtmfParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\DtmfParameters::class); - $this->dtmf_parameters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentRequest.php deleted file mode 100644 index 3b1c1d8e9615..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentRequest.php +++ /dev/null @@ -1,488 +0,0 @@ -google.cloud.dialogflow.v2.StreamingDetectIntentRequest - */ -class StreamingDetectIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session the query is sent to. - * Format of the session name: - * `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment. If `User ID` is not specified, we are using - * "-". It's up to the API caller to choose an appropriate `Session ID` and - * `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $session = ''; - /** - * The parameters of this query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; - */ - protected $query_params = null; - /** - * Required. The input specification. It can be set to: - * 1. an audio config which instructs the speech recognizer how to process - * the speech audio, - * 2. a conversational query in the form of text, or - * 3. an event that specifies which intent to trigger. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query_input = null; - /** - * Please use - * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] - * instead. If `false` (default), recognition does not cease until the client - * closes the stream. If `true`, the recognizer will detect a single spoken - * utterance in input audio. Recognition ceases when it detects the audio's - * voice has stopped or paused. In this case, once a detected intent is - * received, the client should close the stream and start a new request with a - * new stream as needed. This setting is ignored when `query_input` is a piece - * of text or an event. - * - * Generated from protobuf field bool single_utterance = 4 [deprecated = true]; - * @deprecated - */ - protected $single_utterance = false; - /** - * Instructs the speech synthesizer how to generate the output - * audio. If this field is not set and agent-level speech synthesizer is not - * configured, no output audio is generated. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 5; - */ - protected $output_audio_config = null; - /** - * Mask for - * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] - * indicating which settings in this request-level config should override - * speech synthesizer settings defined at agent-level. - * If unspecified or empty, - * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] - * replaces the agent-level config in its entirety. - * - * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; - */ - protected $output_audio_config_mask = null; - /** - * The input audio content to be recognized. Must be sent if - * `query_input` was set to a streaming input audio config. The complete audio - * over all streaming messages must not exceed 1 minute. - * - * Generated from protobuf field bytes input_audio = 6; - */ - protected $input_audio = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $session - * Required. The name of the session the query is sent to. - * Format of the session name: - * `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment. If `User ID` is not specified, we are using - * "-". It's up to the API caller to choose an appropriate `Session ID` and - * `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * @type \Google\Cloud\Dialogflow\V2\QueryParameters $query_params - * The parameters of this query. - * @type \Google\Cloud\Dialogflow\V2\QueryInput $query_input - * Required. The input specification. It can be set to: - * 1. an audio config which instructs the speech recognizer how to process - * the speech audio, - * 2. a conversational query in the form of text, or - * 3. an event that specifies which intent to trigger. - * @type bool $single_utterance - * Please use - * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] - * instead. If `false` (default), recognition does not cease until the client - * closes the stream. If `true`, the recognizer will detect a single spoken - * utterance in input audio. Recognition ceases when it detects the audio's - * voice has stopped or paused. In this case, once a detected intent is - * received, the client should close the stream and start a new request with a - * new stream as needed. This setting is ignored when `query_input` is a piece - * of text or an event. - * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $output_audio_config - * Instructs the speech synthesizer how to generate the output - * audio. If this field is not set and agent-level speech synthesizer is not - * configured, no output audio is generated. - * @type \Google\Protobuf\FieldMask $output_audio_config_mask - * Mask for - * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] - * indicating which settings in this request-level config should override - * speech synthesizer settings defined at agent-level. - * If unspecified or empty, - * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] - * replaces the agent-level config in its entirety. - * @type string $input_audio - * The input audio content to be recognized. Must be sent if - * `query_input` was set to a streaming input audio config. The complete audio - * over all streaming messages must not exceed 1 minute. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session the query is sent to. - * Format of the session name: - * `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment. If `User ID` is not specified, we are using - * "-". It's up to the API caller to choose an appropriate `Session ID` and - * `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSession() - { - return $this->session; - } - - /** - * Required. The name of the session the query is sent to. - * Format of the session name: - * `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment. If `User ID` is not specified, we are using - * "-". It's up to the API caller to choose an appropriate `Session ID` and - * `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSession($var) - { - GPBUtil::checkString($var, True); - $this->session = $var; - - return $this; - } - - /** - * The parameters of this query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; - * @return \Google\Cloud\Dialogflow\V2\QueryParameters|null - */ - public function getQueryParams() - { - return $this->query_params; - } - - public function hasQueryParams() - { - return isset($this->query_params); - } - - public function clearQueryParams() - { - unset($this->query_params); - } - - /** - * The parameters of this query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryParameters query_params = 2; - * @param \Google\Cloud\Dialogflow\V2\QueryParameters $var - * @return $this - */ - public function setQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class); - $this->query_params = $var; - - return $this; - } - - /** - * Required. The input specification. It can be set to: - * 1. an audio config which instructs the speech recognizer how to process - * the speech audio, - * 2. a conversational query in the form of text, or - * 3. an event that specifies which intent to trigger. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\QueryInput|null - */ - public function getQueryInput() - { - return $this->query_input; - } - - public function hasQueryInput() - { - return isset($this->query_input); - } - - public function clearQueryInput() - { - unset($this->query_input); - } - - /** - * Required. The input specification. It can be set to: - * 1. an audio config which instructs the speech recognizer how to process - * the speech audio, - * 2. a conversational query in the form of text, or - * 3. an event that specifies which intent to trigger. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\QueryInput $var - * @return $this - */ - public function setQueryInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryInput::class); - $this->query_input = $var; - - return $this; - } - - /** - * Please use - * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] - * instead. If `false` (default), recognition does not cease until the client - * closes the stream. If `true`, the recognizer will detect a single spoken - * utterance in input audio. Recognition ceases when it detects the audio's - * voice has stopped or paused. In this case, once a detected intent is - * received, the client should close the stream and start a new request with a - * new stream as needed. This setting is ignored when `query_input` is a piece - * of text or an event. - * - * Generated from protobuf field bool single_utterance = 4 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getSingleUtterance() - { - @trigger_error('single_utterance is deprecated.', E_USER_DEPRECATED); - return $this->single_utterance; - } - - /** - * Please use - * [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] - * instead. If `false` (default), recognition does not cease until the client - * closes the stream. If `true`, the recognizer will detect a single spoken - * utterance in input audio. Recognition ceases when it detects the audio's - * voice has stopped or paused. In this case, once a detected intent is - * received, the client should close the stream and start a new request with a - * new stream as needed. This setting is ignored when `query_input` is a piece - * of text or an event. - * - * Generated from protobuf field bool single_utterance = 4 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setSingleUtterance($var) - { - @trigger_error('single_utterance is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->single_utterance = $var; - - return $this; - } - - /** - * Instructs the speech synthesizer how to generate the output - * audio. If this field is not set and agent-level speech synthesizer is not - * configured, no output audio is generated. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 5; - * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null - */ - public function getOutputAudioConfig() - { - return $this->output_audio_config; - } - - public function hasOutputAudioConfig() - { - return isset($this->output_audio_config); - } - - public function clearOutputAudioConfig() - { - unset($this->output_audio_config); - } - - /** - * Instructs the speech synthesizer how to generate the output - * audio. If this field is not set and agent-level speech synthesizer is not - * configured, no output audio is generated. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 5; - * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var - * @return $this - */ - public function setOutputAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); - $this->output_audio_config = $var; - - return $this; - } - - /** - * Mask for - * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] - * indicating which settings in this request-level config should override - * speech synthesizer settings defined at agent-level. - * If unspecified or empty, - * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] - * replaces the agent-level config in its entirety. - * - * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; - * @return \Google\Protobuf\FieldMask|null - */ - public function getOutputAudioConfigMask() - { - return $this->output_audio_config_mask; - } - - public function hasOutputAudioConfigMask() - { - return isset($this->output_audio_config_mask); - } - - public function clearOutputAudioConfigMask() - { - unset($this->output_audio_config_mask); - } - - /** - * Mask for - * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] - * indicating which settings in this request-level config should override - * speech synthesizer settings defined at agent-level. - * If unspecified or empty, - * [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] - * replaces the agent-level config in its entirety. - * - * Generated from protobuf field .google.protobuf.FieldMask output_audio_config_mask = 7; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setOutputAudioConfigMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->output_audio_config_mask = $var; - - return $this; - } - - /** - * The input audio content to be recognized. Must be sent if - * `query_input` was set to a streaming input audio config. The complete audio - * over all streaming messages must not exceed 1 minute. - * - * Generated from protobuf field bytes input_audio = 6; - * @return string - */ - public function getInputAudio() - { - return $this->input_audio; - } - - /** - * The input audio content to be recognized. Must be sent if - * `query_input` was set to a streaming input audio config. The complete audio - * over all streaming messages must not exceed 1 minute. - * - * Generated from protobuf field bytes input_audio = 6; - * @param string $var - * @return $this - */ - public function setInputAudio($var) - { - GPBUtil::checkString($var, False); - $this->input_audio = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentResponse.php deleted file mode 100644 index fec0c3074dee..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingDetectIntentResponse.php +++ /dev/null @@ -1,323 +0,0 @@ -google.cloud.dialogflow.v2.StreamingDetectIntentResponse - */ -class StreamingDetectIntentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the response. It can be used to - * locate a response in the training example set or for reporting issues. - * - * Generated from protobuf field string response_id = 1; - */ - protected $response_id = ''; - /** - * The result of speech recognition. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 2; - */ - protected $recognition_result = null; - /** - * The result of the conversational query or event processing. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 3; - */ - protected $query_result = null; - /** - * Specifies the status of the webhook request. - * - * Generated from protobuf field .google.rpc.Status webhook_status = 4; - */ - protected $webhook_status = null; - /** - * The audio data bytes encoded as specified in the request. - * Note: The output audio is generated based on the values of default platform - * text responses found in the `query_result.fulfillment_messages` field. If - * multiple default text responses exist, they will be concatenated when - * generating audio. If no default platform text responses exist, the - * generated audio content will be empty. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field bytes output_audio = 5; - */ - protected $output_audio = ''; - /** - * The config used by the speech synthesizer to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; - */ - protected $output_audio_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $response_id - * The unique identifier of the response. It can be used to - * locate a response in the training example set or for reporting issues. - * @type \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult $recognition_result - * The result of speech recognition. - * @type \Google\Cloud\Dialogflow\V2\QueryResult $query_result - * The result of the conversational query or event processing. - * @type \Google\Rpc\Status $webhook_status - * Specifies the status of the webhook request. - * @type string $output_audio - * The audio data bytes encoded as specified in the request. - * Note: The output audio is generated based on the values of default platform - * text responses found in the `query_result.fulfillment_messages` field. If - * multiple default text responses exist, they will be concatenated when - * generating audio. If no default platform text responses exist, the - * generated audio content will be empty. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $output_audio_config - * The config used by the speech synthesizer to generate the output audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the response. It can be used to - * locate a response in the training example set or for reporting issues. - * - * Generated from protobuf field string response_id = 1; - * @return string - */ - public function getResponseId() - { - return $this->response_id; - } - - /** - * The unique identifier of the response. It can be used to - * locate a response in the training example set or for reporting issues. - * - * Generated from protobuf field string response_id = 1; - * @param string $var - * @return $this - */ - public function setResponseId($var) - { - GPBUtil::checkString($var, True); - $this->response_id = $var; - - return $this; - } - - /** - * The result of speech recognition. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 2; - * @return \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult|null - */ - public function getRecognitionResult() - { - return $this->recognition_result; - } - - public function hasRecognitionResult() - { - return isset($this->recognition_result); - } - - public function clearRecognitionResult() - { - unset($this->recognition_result); - } - - /** - * The result of speech recognition. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult recognition_result = 2; - * @param \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult $var - * @return $this - */ - public function setRecognitionResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult::class); - $this->recognition_result = $var; - - return $this; - } - - /** - * The result of the conversational query or event processing. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 3; - * @return \Google\Cloud\Dialogflow\V2\QueryResult|null - */ - public function getQueryResult() - { - return $this->query_result; - } - - public function hasQueryResult() - { - return isset($this->query_result); - } - - public function clearQueryResult() - { - unset($this->query_result); - } - - /** - * The result of the conversational query or event processing. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 3; - * @param \Google\Cloud\Dialogflow\V2\QueryResult $var - * @return $this - */ - public function setQueryResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryResult::class); - $this->query_result = $var; - - return $this; - } - - /** - * Specifies the status of the webhook request. - * - * Generated from protobuf field .google.rpc.Status webhook_status = 4; - * @return \Google\Rpc\Status|null - */ - public function getWebhookStatus() - { - return $this->webhook_status; - } - - public function hasWebhookStatus() - { - return isset($this->webhook_status); - } - - public function clearWebhookStatus() - { - unset($this->webhook_status); - } - - /** - * Specifies the status of the webhook request. - * - * Generated from protobuf field .google.rpc.Status webhook_status = 4; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setWebhookStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->webhook_status = $var; - - return $this; - } - - /** - * The audio data bytes encoded as specified in the request. - * Note: The output audio is generated based on the values of default platform - * text responses found in the `query_result.fulfillment_messages` field. If - * multiple default text responses exist, they will be concatenated when - * generating audio. If no default platform text responses exist, the - * generated audio content will be empty. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field bytes output_audio = 5; - * @return string - */ - public function getOutputAudio() - { - return $this->output_audio; - } - - /** - * The audio data bytes encoded as specified in the request. - * Note: The output audio is generated based on the values of default platform - * text responses found in the `query_result.fulfillment_messages` field. If - * multiple default text responses exist, they will be concatenated when - * generating audio. If no default platform text responses exist, the - * generated audio content will be empty. - * In some scenarios, multiple output audio fields may be present in the - * response structure. In these cases, only the top-most-level audio output - * has content. - * - * Generated from protobuf field bytes output_audio = 5; - * @param string $var - * @return $this - */ - public function setOutputAudio($var) - { - GPBUtil::checkString($var, False); - $this->output_audio = $var; - - return $this; - } - - /** - * The config used by the speech synthesizer to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; - * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null - */ - public function getOutputAudioConfig() - { - return $this->output_audio_config; - } - - public function hasOutputAudioConfig() - { - return isset($this->output_audio_config); - } - - public function clearOutputAudioConfig() - { - unset($this->output_audio_config); - } - - /** - * The config used by the speech synthesizer to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 6; - * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var - * @return $this - */ - public function setOutputAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class); - $this->output_audio_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult.php deleted file mode 100644 index 705e93ee6d6d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult.php +++ /dev/null @@ -1,363 +0,0 @@ -google.cloud.dialogflow.v2.StreamingRecognitionResult - */ -class StreamingRecognitionResult extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the result message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType message_type = 1; - */ - protected $message_type = 0; - /** - * Transcript text representing the words that the user spoke. - * Populated if and only if `message_type` = `TRANSCRIPT`. - * - * Generated from protobuf field string transcript = 2; - */ - protected $transcript = ''; - /** - * If `false`, the `StreamingRecognitionResult` represents an - * interim result that may change. If `true`, the recognizer will not return - * any further hypotheses about this piece of the audio. May only be populated - * for `message_type` = `TRANSCRIPT`. - * - * Generated from protobuf field bool is_final = 3; - */ - protected $is_final = false; - /** - * The Speech confidence between 0.0 and 1.0 for the current portion of audio. - * A higher number indicates an estimated greater likelihood that the - * recognized words are correct. The default of 0.0 is a sentinel value - * indicating that confidence was not set. - * This field is typically only provided if `is_final` is true and you should - * not rely on it being accurate or even set. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - /** - * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. - * Populated if and only if `message_type` = `TRANSCRIPT` and - * [InputAudioConfig.enable_word_info] is set. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechWordInfo speech_word_info = 7; - */ - private $speech_word_info; - /** - * Time offset of the end of this Speech recognition result relative to the - * beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. - * - * Generated from protobuf field .google.protobuf.Duration speech_end_offset = 8; - */ - protected $speech_end_offset = null; - /** - * Detected language code for the transcript. - * - * Generated from protobuf field string language_code = 10; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $message_type - * Type of the result message. - * @type string $transcript - * Transcript text representing the words that the user spoke. - * Populated if and only if `message_type` = `TRANSCRIPT`. - * @type bool $is_final - * If `false`, the `StreamingRecognitionResult` represents an - * interim result that may change. If `true`, the recognizer will not return - * any further hypotheses about this piece of the audio. May only be populated - * for `message_type` = `TRANSCRIPT`. - * @type float $confidence - * The Speech confidence between 0.0 and 1.0 for the current portion of audio. - * A higher number indicates an estimated greater likelihood that the - * recognized words are correct. The default of 0.0 is a sentinel value - * indicating that confidence was not set. - * This field is typically only provided if `is_final` is true and you should - * not rely on it being accurate or even set. - * @type array<\Google\Cloud\Dialogflow\V2\SpeechWordInfo>|\Google\Protobuf\Internal\RepeatedField $speech_word_info - * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. - * Populated if and only if `message_type` = `TRANSCRIPT` and - * [InputAudioConfig.enable_word_info] is set. - * @type \Google\Protobuf\Duration $speech_end_offset - * Time offset of the end of this Speech recognition result relative to the - * beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. - * @type string $language_code - * Detected language code for the transcript. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * Type of the result message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType message_type = 1; - * @return int - */ - public function getMessageType() - { - return $this->message_type; - } - - /** - * Type of the result message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType message_type = 1; - * @param int $var - * @return $this - */ - public function setMessageType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult\MessageType::class); - $this->message_type = $var; - - return $this; - } - - /** - * Transcript text representing the words that the user spoke. - * Populated if and only if `message_type` = `TRANSCRIPT`. - * - * Generated from protobuf field string transcript = 2; - * @return string - */ - public function getTranscript() - { - return $this->transcript; - } - - /** - * Transcript text representing the words that the user spoke. - * Populated if and only if `message_type` = `TRANSCRIPT`. - * - * Generated from protobuf field string transcript = 2; - * @param string $var - * @return $this - */ - public function setTranscript($var) - { - GPBUtil::checkString($var, True); - $this->transcript = $var; - - return $this; - } - - /** - * If `false`, the `StreamingRecognitionResult` represents an - * interim result that may change. If `true`, the recognizer will not return - * any further hypotheses about this piece of the audio. May only be populated - * for `message_type` = `TRANSCRIPT`. - * - * Generated from protobuf field bool is_final = 3; - * @return bool - */ - public function getIsFinal() - { - return $this->is_final; - } - - /** - * If `false`, the `StreamingRecognitionResult` represents an - * interim result that may change. If `true`, the recognizer will not return - * any further hypotheses about this piece of the audio. May only be populated - * for `message_type` = `TRANSCRIPT`. - * - * Generated from protobuf field bool is_final = 3; - * @param bool $var - * @return $this - */ - public function setIsFinal($var) - { - GPBUtil::checkBool($var); - $this->is_final = $var; - - return $this; - } - - /** - * The Speech confidence between 0.0 and 1.0 for the current portion of audio. - * A higher number indicates an estimated greater likelihood that the - * recognized words are correct. The default of 0.0 is a sentinel value - * indicating that confidence was not set. - * This field is typically only provided if `is_final` is true and you should - * not rely on it being accurate or even set. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The Speech confidence between 0.0 and 1.0 for the current portion of audio. - * A higher number indicates an estimated greater likelihood that the - * recognized words are correct. The default of 0.0 is a sentinel value - * indicating that confidence was not set. - * This field is typically only provided if `is_final` is true and you should - * not rely on it being accurate or even set. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. - * Populated if and only if `message_type` = `TRANSCRIPT` and - * [InputAudioConfig.enable_word_info] is set. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechWordInfo speech_word_info = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpeechWordInfo() - { - return $this->speech_word_info; - } - - /** - * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. - * Populated if and only if `message_type` = `TRANSCRIPT` and - * [InputAudioConfig.enable_word_info] is set. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SpeechWordInfo speech_word_info = 7; - * @param array<\Google\Cloud\Dialogflow\V2\SpeechWordInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpeechWordInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SpeechWordInfo::class); - $this->speech_word_info = $arr; - - return $this; - } - - /** - * Time offset of the end of this Speech recognition result relative to the - * beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. - * - * Generated from protobuf field .google.protobuf.Duration speech_end_offset = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getSpeechEndOffset() - { - return $this->speech_end_offset; - } - - public function hasSpeechEndOffset() - { - return isset($this->speech_end_offset); - } - - public function clearSpeechEndOffset() - { - unset($this->speech_end_offset); - } - - /** - * Time offset of the end of this Speech recognition result relative to the - * beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. - * - * Generated from protobuf field .google.protobuf.Duration speech_end_offset = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSpeechEndOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->speech_end_offset = $var; - - return $this; - } - - /** - * Detected language code for the transcript. - * - * Generated from protobuf field string language_code = 10; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Detected language code for the transcript. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult/MessageType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult/MessageType.php deleted file mode 100644 index f67361b923ee..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult/MessageType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType - */ -class MessageType -{ - /** - * Not specified. Should never be used. - * - * Generated from protobuf enum MESSAGE_TYPE_UNSPECIFIED = 0; - */ - const MESSAGE_TYPE_UNSPECIFIED = 0; - /** - * Message contains a (possibly partial) transcript. - * - * Generated from protobuf enum TRANSCRIPT = 1; - */ - const TRANSCRIPT = 1; - /** - * Event indicates that the server has detected the end of the user's speech - * utterance and expects no additional inputs. - * Therefore, the server will not process additional audio (although it may - * subsequently return additional results). The client should stop sending - * additional audio data, half-close the gRPC connection, and wait for any - * additional results until the server closes the gRPC connection. This - * message is only sent if `single_utterance` was set to `true`, and is not - * used otherwise. - * - * Generated from protobuf enum END_OF_SINGLE_UTTERANCE = 2; - */ - const END_OF_SINGLE_UTTERANCE = 2; - - private static $valueToName = [ - self::MESSAGE_TYPE_UNSPECIFIED => 'MESSAGE_TYPE_UNSPECIFIED', - self::TRANSCRIPT => 'TRANSCRIPT', - self::END_OF_SINGLE_UTTERANCE => 'END_OF_SINGLE_UTTERANCE', - ]; - - 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(MessageType::class, \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult_MessageType::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult_MessageType.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult_MessageType.php deleted file mode 100644 index 9f4facbd7396..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/StreamingRecognitionResult_MessageType.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.SuggestArticlesRequest - */ -class SuggestArticlesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $latest_message = ''; - /** - * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] - * to use as context when compiling the suggestion. By default 20 and at - * most 50. - * - * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $context_size = 0; - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; - */ - protected $assist_query_params = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * @type string $latest_message - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * @type int $context_size - * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] - * to use as context when compiling the suggestion. By default 20 and at - * most 50. - * @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params - * Parameters for a human assist query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * - * 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 name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getLatestMessage() - { - return $this->latest_message; - } - - /** - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLatestMessage($var) - { - GPBUtil::checkString($var, True); - $this->latest_message = $var; - - return $this; - } - - /** - * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] - * to use as context when compiling the suggestion. By default 20 and at - * most 50. - * - * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getContextSize() - { - return $this->context_size; - } - - /** - * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] - * to use as context when compiling the suggestion. By default 20 and at - * most 50. - * - * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setContextSize($var) - { - GPBUtil::checkInt32($var); - $this->context_size = $var; - - return $this; - } - - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; - * @return \Google\Cloud\Dialogflow\V2\AssistQueryParameters|null - */ - public function getAssistQueryParams() - { - return $this->assist_query_params; - } - - public function hasAssistQueryParams() - { - return isset($this->assist_query_params); - } - - public function clearAssistQueryParams() - { - unset($this->assist_query_params); - } - - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; - * @param \Google\Cloud\Dialogflow\V2\AssistQueryParameters $var - * @return $this - */ - public function setAssistQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AssistQueryParameters::class); - $this->assist_query_params = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesResponse.php deleted file mode 100644 index 3d9372203970..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestArticlesResponse.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.dialogflow.v2.SuggestArticlesResponse - */ -class SuggestArticlesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Articles ordered by score in descending order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1; - */ - private $article_answers; - /** - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2; - */ - protected $latest_message = ''; - /** - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * - * Generated from protobuf field int32 context_size = 3; - */ - protected $context_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\ArticleAnswer>|\Google\Protobuf\Internal\RepeatedField $article_answers - * Articles ordered by score in descending order. - * @type string $latest_message - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * @type int $context_size - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Articles ordered by score in descending order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArticleAnswers() - { - return $this->article_answers; - } - - /** - * Articles ordered by score in descending order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1; - * @param array<\Google\Cloud\Dialogflow\V2\ArticleAnswer>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArticleAnswers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ArticleAnswer::class); - $this->article_answers = $arr; - - return $this; - } - - /** - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2; - * @return string - */ - public function getLatestMessage() - { - return $this->latest_message; - } - - /** - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2; - * @param string $var - * @return $this - */ - public function setLatestMessage($var) - { - GPBUtil::checkString($var, True); - $this->latest_message = $var; - - return $this; - } - - /** - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * - * Generated from protobuf field int32 context_size = 3; - * @return int - */ - public function getContextSize() - { - return $this->context_size; - } - - /** - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * - * Generated from protobuf field int32 context_size = 3; - * @param int $var - * @return $this - */ - public function setContextSize($var) - { - GPBUtil::checkInt32($var); - $this->context_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse_Summary.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse_Summary.php deleted file mode 100644 index 7c5fd0823623..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestConversationSummaryResponse_Summary.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.SuggestFaqAnswersRequest - */ -class SuggestFaqAnswersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $latest_message = ''; - /** - * Optional. Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * - * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $context_size = 0; - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; - */ - protected $assist_query_params = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * @type string $latest_message - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * @type int $context_size - * Optional. Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params - * Parameters for a human assist query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * - * 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 name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getLatestMessage() - { - return $this->latest_message; - } - - /** - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLatestMessage($var) - { - GPBUtil::checkString($var, True); - $this->latest_message = $var; - - return $this; - } - - /** - * Optional. Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * - * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getContextSize() - { - return $this->context_size; - } - - /** - * Optional. Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * - * Generated from protobuf field int32 context_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setContextSize($var) - { - GPBUtil::checkInt32($var); - $this->context_size = $var; - - return $this; - } - - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; - * @return \Google\Cloud\Dialogflow\V2\AssistQueryParameters|null - */ - public function getAssistQueryParams() - { - return $this->assist_query_params; - } - - public function hasAssistQueryParams() - { - return isset($this->assist_query_params); - } - - public function clearAssistQueryParams() - { - unset($this->assist_query_params); - } - - /** - * Parameters for a human assist query. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 4; - * @param \Google\Cloud\Dialogflow\V2\AssistQueryParameters $var - * @return $this - */ - public function setAssistQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AssistQueryParameters::class); - $this->assist_query_params = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersResponse.php deleted file mode 100644 index 2dc230acbb62..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestFaqAnswersResponse.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.dialogflow.v2.SuggestFaqAnswersResponse - */ -class SuggestFaqAnswersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Answers extracted from FAQ documents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.FaqAnswer faq_answers = 1; - */ - private $faq_answers; - /** - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2; - */ - protected $latest_message = ''; - /** - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * - * Generated from protobuf field int32 context_size = 3; - */ - protected $context_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\FaqAnswer>|\Google\Protobuf\Internal\RepeatedField $faq_answers - * Answers extracted from FAQ documents. - * @type string $latest_message - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * @type int $context_size - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Answers extracted from FAQ documents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.FaqAnswer faq_answers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFaqAnswers() - { - return $this->faq_answers; - } - - /** - * Answers extracted from FAQ documents. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.FaqAnswer faq_answers = 1; - * @param array<\Google\Cloud\Dialogflow\V2\FaqAnswer>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFaqAnswers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\FaqAnswer::class); - $this->faq_answers = $arr; - - return $this; - } - - /** - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2; - * @return string - */ - public function getLatestMessage() - { - return $this->latest_message; - } - - /** - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2; - * @param string $var - * @return $this - */ - public function setLatestMessage($var) - { - GPBUtil::checkString($var, True); - $this->latest_message = $var; - - return $this; - } - - /** - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * - * Generated from protobuf field int32 context_size = 3; - * @return int - */ - public function getContextSize() - { - return $this->context_size; - } - - /** - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * - * Generated from protobuf field int32 context_size = 3; - * @param int $var - * @return $this - */ - public function setContextSize($var) - { - GPBUtil::checkInt32($var); - $this->context_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesRequest.php deleted file mode 100644 index b5a24d6b4548..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesRequest.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.dialogflow.v2.SuggestSmartRepliesRequest - */ -class SuggestSmartRepliesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The current natural language text segment to compile suggestion - * for. This provides a way for user to get follow up smart reply suggestion - * after a smart reply selection, without sending a text message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput current_text_input = 4; - */ - protected $current_text_input = null; - /** - * The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { - */ - protected $latest_message = ''; - /** - * Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * - * Generated from protobuf field int32 context_size = 3; - */ - protected $context_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * @type \Google\Cloud\Dialogflow\V2\TextInput $current_text_input - * The current natural language text segment to compile suggestion - * for. This provides a way for user to get follow up smart reply suggestion - * after a smart reply selection, without sending a text message. - * @type string $latest_message - * The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * @type int $context_size - * Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * - * 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 name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * - * 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 current natural language text segment to compile suggestion - * for. This provides a way for user to get follow up smart reply suggestion - * after a smart reply selection, without sending a text message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput current_text_input = 4; - * @return \Google\Cloud\Dialogflow\V2\TextInput|null - */ - public function getCurrentTextInput() - { - return $this->current_text_input; - } - - public function hasCurrentTextInput() - { - return isset($this->current_text_input); - } - - public function clearCurrentTextInput() - { - unset($this->current_text_input); - } - - /** - * The current natural language text segment to compile suggestion - * for. This provides a way for user to get follow up smart reply suggestion - * after a smart reply selection, without sending a text message. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.TextInput current_text_input = 4; - * @param \Google\Cloud\Dialogflow\V2\TextInput $var - * @return $this - */ - public function setCurrentTextInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextInput::class); - $this->current_text_input = $var; - - return $this; - } - - /** - * The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getLatestMessage() - { - return $this->latest_message; - } - - /** - * The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLatestMessage($var) - { - GPBUtil::checkString($var, True); - $this->latest_message = $var; - - return $this; - } - - /** - * Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * - * Generated from protobuf field int32 context_size = 3; - * @return int - */ - public function getContextSize() - { - return $this->context_size; - } - - /** - * Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * - * Generated from protobuf field int32 context_size = 3; - * @param int $var - * @return $this - */ - public function setContextSize($var) - { - GPBUtil::checkInt32($var); - $this->context_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesResponse.php deleted file mode 100644 index 0938283c9e61..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestSmartRepliesResponse.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.dialogflow.v2.SuggestSmartRepliesResponse - */ -class SuggestSmartRepliesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Multiple reply options provided by smart reply service. The - * order is based on the rank of the model prediction. - * The maximum number of the returned replies is set in SmartReplyConfig. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyAnswer smart_reply_answers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $smart_reply_answers; - /** - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { - */ - protected $latest_message = ''; - /** - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * - * Generated from protobuf field int32 context_size = 3; - */ - protected $context_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\SmartReplyAnswer>|\Google\Protobuf\Internal\RepeatedField $smart_reply_answers - * Output only. Multiple reply options provided by smart reply service. The - * order is based on the rank of the model prediction. - * The maximum number of the returned replies is set in SmartReplyConfig. - * @type string $latest_message - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * @type int $context_size - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Multiple reply options provided by smart reply service. The - * order is based on the rank of the model prediction. - * The maximum number of the returned replies is set in SmartReplyConfig. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyAnswer smart_reply_answers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSmartReplyAnswers() - { - return $this->smart_reply_answers; - } - - /** - * Output only. Multiple reply options provided by smart reply service. The - * order is based on the rank of the model prediction. - * The maximum number of the returned replies is set in SmartReplyConfig. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SmartReplyAnswer smart_reply_answers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dialogflow\V2\SmartReplyAnswer>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSmartReplyAnswers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SmartReplyAnswer::class); - $this->smart_reply_answers = $arr; - - return $this; - } - - /** - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getLatestMessage() - { - return $this->latest_message; - } - - /** - * The name of the latest conversation message used to compile - * suggestion for. - * Format: `projects//locations//conversations//messages/`. - * - * Generated from protobuf field string latest_message = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLatestMessage($var) - { - GPBUtil::checkString($var, True); - $this->latest_message = $var; - - return $this; - } - - /** - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * - * Generated from protobuf field int32 context_size = 3; - * @return int - */ - public function getContextSize() - { - return $this->context_size; - } - - /** - * Number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] - * to compile the suggestion. It may be smaller than the - * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] - * field in the request if there aren't that many messages in the - * conversation. - * - * Generated from protobuf field int32 context_size = 3; - * @param int $var - * @return $this - */ - public function setContextSize($var) - { - GPBUtil::checkInt32($var); - $this->context_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature.php deleted file mode 100644 index f04dab6d457f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.dialogflow.v2.SuggestionFeature - */ -class SuggestionFeature extends \Google\Protobuf\Internal\Message -{ - /** - * Type of Human Agent Assistant API feature to request. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type type = 1; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Type of Human Agent Assistant API feature to request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Type of Human Agent Assistant API feature to request. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of Human Agent Assistant API feature to request. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature/Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature/Type.php deleted file mode 100644 index fcc8a5082701..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature/Type.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.SuggestionFeature.Type - */ -class Type -{ - /** - * Unspecified feature type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Run article suggestion model for chat. - * - * Generated from protobuf enum ARTICLE_SUGGESTION = 1; - */ - const ARTICLE_SUGGESTION = 1; - /** - * Run FAQ model for chat. - * - * Generated from protobuf enum FAQ = 2; - */ - const FAQ = 2; - /** - * Run smart reply model for chat. - * - * Generated from protobuf enum SMART_REPLY = 3; - */ - const SMART_REPLY = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::ARTICLE_SUGGESTION => 'ARTICLE_SUGGESTION', - self::FAQ => 'FAQ', - self::SMART_REPLY => 'SMART_REPLY', - ]; - - 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\Dialogflow\V2\SuggestionFeature_Type::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature_Type.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature_Type.php deleted file mode 100644 index 596aebc4e398..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SuggestionFeature_Type.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.SuggestionResult - */ -class SuggestionResult extends \Google\Protobuf\Internal\Message -{ - protected $suggestion_response; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $error - * Error status if the request failed. - * @type \Google\Cloud\Dialogflow\V2\SuggestArticlesResponse $suggest_articles_response - * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. - * @type \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse $suggest_faq_answers_response - * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. - * @type \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse $suggest_smart_replies_response - * SuggestSmartRepliesResponse if request is for SMART_REPLY. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Error status if the request failed. - * - * Generated from protobuf field .google.rpc.Status error = 1; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->readOneof(1); - } - - public function hasError() - { - return $this->hasOneof(1); - } - - /** - * Error status if the request failed. - * - * Generated from protobuf field .google.rpc.Status error = 1; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestArticlesResponse suggest_articles_response = 2; - * @return \Google\Cloud\Dialogflow\V2\SuggestArticlesResponse|null - */ - public function getSuggestArticlesResponse() - { - return $this->readOneof(2); - } - - public function hasSuggestArticlesResponse() - { - return $this->hasOneof(2); - } - - /** - * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestArticlesResponse suggest_articles_response = 2; - * @param \Google\Cloud\Dialogflow\V2\SuggestArticlesResponse $var - * @return $this - */ - public function setSuggestArticlesResponse($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestArticlesResponse::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestFaqAnswersResponse suggest_faq_answers_response = 3; - * @return \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse|null - */ - public function getSuggestFaqAnswersResponse() - { - return $this->readOneof(3); - } - - public function hasSuggestFaqAnswersResponse() - { - return $this->hasOneof(3); - } - - /** - * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestFaqAnswersResponse suggest_faq_answers_response = 3; - * @param \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse $var - * @return $this - */ - public function setSuggestFaqAnswersResponse($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestFaqAnswersResponse::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * SuggestSmartRepliesResponse if request is for SMART_REPLY. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestSmartRepliesResponse suggest_smart_replies_response = 4; - * @return \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse|null - */ - public function getSuggestSmartRepliesResponse() - { - return $this->readOneof(4); - } - - public function hasSuggestSmartRepliesResponse() - { - return $this->hasOneof(4); - } - - /** - * SuggestSmartRepliesResponse if request is for SMART_REPLY. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestSmartRepliesResponse suggest_smart_replies_response = 4; - * @param \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse $var - * @return $this - */ - public function setSuggestSmartRepliesResponse($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestSmartRepliesResponse::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getSuggestionResponse() - { - return $this->whichOneof("suggestion_response"); - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SynthesizeSpeechConfig.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SynthesizeSpeechConfig.php deleted file mode 100644 index d9426069bf0f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/SynthesizeSpeechConfig.php +++ /dev/null @@ -1,269 +0,0 @@ -google.cloud.dialogflow.v2.SynthesizeSpeechConfig - */ -class SynthesizeSpeechConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal - * native speed supported by the specific voice. 2.0 is twice as fast, and - * 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any - * other values < 0.25 or > 4.0 will return an error. - * - * Generated from protobuf field double speaking_rate = 1; - */ - protected $speaking_rate = 0.0; - /** - * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 - * semitones from the original pitch. -20 means decrease 20 semitones from the - * original pitch. - * - * Generated from protobuf field double pitch = 2; - */ - protected $pitch = 0.0; - /** - * Optional. Volume gain (in dB) of the normal native volume supported by the - * specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of - * 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) - * will play at approximately half the amplitude of the normal native signal - * amplitude. A value of +6.0 (dB) will play at approximately twice the - * amplitude of the normal native signal amplitude. We strongly recommend not - * to exceed +10 (dB) as there's usually no effective increase in loudness for - * any value greater than that. - * - * Generated from protobuf field double volume_gain_db = 3; - */ - protected $volume_gain_db = 0.0; - /** - * Optional. An identifier which selects 'audio effects' profiles that are - * applied on (post synthesized) text to speech. Effects are applied on top of - * each other in the order they are given. - * - * Generated from protobuf field repeated string effects_profile_id = 5; - */ - private $effects_profile_id; - /** - * Optional. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.VoiceSelectionParams voice = 4; - */ - protected $voice = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $speaking_rate - * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal - * native speed supported by the specific voice. 2.0 is twice as fast, and - * 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any - * other values < 0.25 or > 4.0 will return an error. - * @type float $pitch - * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 - * semitones from the original pitch. -20 means decrease 20 semitones from the - * original pitch. - * @type float $volume_gain_db - * Optional. Volume gain (in dB) of the normal native volume supported by the - * specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of - * 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) - * will play at approximately half the amplitude of the normal native signal - * amplitude. A value of +6.0 (dB) will play at approximately twice the - * amplitude of the normal native signal amplitude. We strongly recommend not - * to exceed +10 (dB) as there's usually no effective increase in loudness for - * any value greater than that. - * @type array|\Google\Protobuf\Internal\RepeatedField $effects_profile_id - * Optional. An identifier which selects 'audio effects' profiles that are - * applied on (post synthesized) text to speech. Effects are applied on top of - * each other in the order they are given. - * @type \Google\Cloud\Dialogflow\V2\VoiceSelectionParams $voice - * Optional. The desired voice of the synthesized audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal - * native speed supported by the specific voice. 2.0 is twice as fast, and - * 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any - * other values < 0.25 or > 4.0 will return an error. - * - * Generated from protobuf field double speaking_rate = 1; - * @return float - */ - public function getSpeakingRate() - { - return $this->speaking_rate; - } - - /** - * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal - * native speed supported by the specific voice. 2.0 is twice as fast, and - * 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any - * other values < 0.25 or > 4.0 will return an error. - * - * Generated from protobuf field double speaking_rate = 1; - * @param float $var - * @return $this - */ - public function setSpeakingRate($var) - { - GPBUtil::checkDouble($var); - $this->speaking_rate = $var; - - return $this; - } - - /** - * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 - * semitones from the original pitch. -20 means decrease 20 semitones from the - * original pitch. - * - * Generated from protobuf field double pitch = 2; - * @return float - */ - public function getPitch() - { - return $this->pitch; - } - - /** - * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 - * semitones from the original pitch. -20 means decrease 20 semitones from the - * original pitch. - * - * Generated from protobuf field double pitch = 2; - * @param float $var - * @return $this - */ - public function setPitch($var) - { - GPBUtil::checkDouble($var); - $this->pitch = $var; - - return $this; - } - - /** - * Optional. Volume gain (in dB) of the normal native volume supported by the - * specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of - * 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) - * will play at approximately half the amplitude of the normal native signal - * amplitude. A value of +6.0 (dB) will play at approximately twice the - * amplitude of the normal native signal amplitude. We strongly recommend not - * to exceed +10 (dB) as there's usually no effective increase in loudness for - * any value greater than that. - * - * Generated from protobuf field double volume_gain_db = 3; - * @return float - */ - public function getVolumeGainDb() - { - return $this->volume_gain_db; - } - - /** - * Optional. Volume gain (in dB) of the normal native volume supported by the - * specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of - * 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) - * will play at approximately half the amplitude of the normal native signal - * amplitude. A value of +6.0 (dB) will play at approximately twice the - * amplitude of the normal native signal amplitude. We strongly recommend not - * to exceed +10 (dB) as there's usually no effective increase in loudness for - * any value greater than that. - * - * Generated from protobuf field double volume_gain_db = 3; - * @param float $var - * @return $this - */ - public function setVolumeGainDb($var) - { - GPBUtil::checkDouble($var); - $this->volume_gain_db = $var; - - return $this; - } - - /** - * Optional. An identifier which selects 'audio effects' profiles that are - * applied on (post synthesized) text to speech. Effects are applied on top of - * each other in the order they are given. - * - * Generated from protobuf field repeated string effects_profile_id = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEffectsProfileId() - { - return $this->effects_profile_id; - } - - /** - * Optional. An identifier which selects 'audio effects' profiles that are - * applied on (post synthesized) text to speech. Effects are applied on top of - * each other in the order they are given. - * - * Generated from protobuf field repeated string effects_profile_id = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEffectsProfileId($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->effects_profile_id = $arr; - - return $this; - } - - /** - * Optional. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.VoiceSelectionParams voice = 4; - * @return \Google\Cloud\Dialogflow\V2\VoiceSelectionParams|null - */ - public function getVoice() - { - return $this->voice; - } - - public function hasVoice() - { - return isset($this->voice); - } - - public function clearVoice() - { - unset($this->voice); - } - - /** - * Optional. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.VoiceSelectionParams voice = 4; - * @param \Google\Cloud\Dialogflow\V2\VoiceSelectionParams $var - * @return $this - */ - public function setVoice($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\VoiceSelectionParams::class); - $this->voice = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmf.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmf.php deleted file mode 100644 index c647551cae30..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmf.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.dialogflow.v2.TelephonyDtmf - */ -class TelephonyDtmf -{ - /** - * Not specified. This value may be used to indicate an absent digit. - * - * Generated from protobuf enum TELEPHONY_DTMF_UNSPECIFIED = 0; - */ - const TELEPHONY_DTMF_UNSPECIFIED = 0; - /** - * Number: '1'. - * - * Generated from protobuf enum DTMF_ONE = 1; - */ - const DTMF_ONE = 1; - /** - * Number: '2'. - * - * Generated from protobuf enum DTMF_TWO = 2; - */ - const DTMF_TWO = 2; - /** - * Number: '3'. - * - * Generated from protobuf enum DTMF_THREE = 3; - */ - const DTMF_THREE = 3; - /** - * Number: '4'. - * - * Generated from protobuf enum DTMF_FOUR = 4; - */ - const DTMF_FOUR = 4; - /** - * Number: '5'. - * - * Generated from protobuf enum DTMF_FIVE = 5; - */ - const DTMF_FIVE = 5; - /** - * Number: '6'. - * - * Generated from protobuf enum DTMF_SIX = 6; - */ - const DTMF_SIX = 6; - /** - * Number: '7'. - * - * Generated from protobuf enum DTMF_SEVEN = 7; - */ - const DTMF_SEVEN = 7; - /** - * Number: '8'. - * - * Generated from protobuf enum DTMF_EIGHT = 8; - */ - const DTMF_EIGHT = 8; - /** - * Number: '9'. - * - * Generated from protobuf enum DTMF_NINE = 9; - */ - const DTMF_NINE = 9; - /** - * Number: '0'. - * - * Generated from protobuf enum DTMF_ZERO = 10; - */ - const DTMF_ZERO = 10; - /** - * Letter: 'A'. - * - * Generated from protobuf enum DTMF_A = 11; - */ - const DTMF_A = 11; - /** - * Letter: 'B'. - * - * Generated from protobuf enum DTMF_B = 12; - */ - const DTMF_B = 12; - /** - * Letter: 'C'. - * - * Generated from protobuf enum DTMF_C = 13; - */ - const DTMF_C = 13; - /** - * Letter: 'D'. - * - * Generated from protobuf enum DTMF_D = 14; - */ - const DTMF_D = 14; - /** - * Asterisk/star: '*'. - * - * Generated from protobuf enum DTMF_STAR = 15; - */ - const DTMF_STAR = 15; - /** - * Pound/diamond/hash/square/gate/octothorpe: '#'. - * - * Generated from protobuf enum DTMF_POUND = 16; - */ - const DTMF_POUND = 16; - - private static $valueToName = [ - self::TELEPHONY_DTMF_UNSPECIFIED => 'TELEPHONY_DTMF_UNSPECIFIED', - self::DTMF_ONE => 'DTMF_ONE', - self::DTMF_TWO => 'DTMF_TWO', - self::DTMF_THREE => 'DTMF_THREE', - self::DTMF_FOUR => 'DTMF_FOUR', - self::DTMF_FIVE => 'DTMF_FIVE', - self::DTMF_SIX => 'DTMF_SIX', - self::DTMF_SEVEN => 'DTMF_SEVEN', - self::DTMF_EIGHT => 'DTMF_EIGHT', - self::DTMF_NINE => 'DTMF_NINE', - self::DTMF_ZERO => 'DTMF_ZERO', - self::DTMF_A => 'DTMF_A', - self::DTMF_B => 'DTMF_B', - self::DTMF_C => 'DTMF_C', - self::DTMF_D => 'DTMF_D', - self::DTMF_STAR => 'DTMF_STAR', - self::DTMF_POUND => 'DTMF_POUND', - ]; - - 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmfEvents.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmfEvents.php deleted file mode 100644 index ad3a6c6a3f14..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TelephonyDtmfEvents.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.v2.TelephonyDtmfEvents - */ -class TelephonyDtmfEvents extends \Google\Protobuf\Internal\Message -{ - /** - * A sequence of TelephonyDtmf digits. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.TelephonyDtmf dtmf_events = 1; - */ - private $dtmf_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $dtmf_events - * A sequence of TelephonyDtmf digits. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * A sequence of TelephonyDtmf digits. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.TelephonyDtmf dtmf_events = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDtmfEvents() - { - return $this->dtmf_events; - } - - /** - * A sequence of TelephonyDtmf digits. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.TelephonyDtmf dtmf_events = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDtmfEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\TelephonyDtmf::class); - $this->dtmf_events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextInput.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextInput.php deleted file mode 100644 index c9836cc74f9c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextInput.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.dialogflow.v2.TextInput - */ -class TextInput extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The UTF-8 encoded natural language text to be processed. - * Text length must not exceed 256 characters for virtual agent interactions. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $text = ''; - /** - * Required. The language of this conversational query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Required. The UTF-8 encoded natural language text to be processed. - * Text length must not exceed 256 characters for virtual agent interactions. - * @type string $language_code - * Required. The language of this conversational query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. The UTF-8 encoded natural language text to be processed. - * Text length must not exceed 256 characters for virtual agent interactions. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Required. The UTF-8 encoded natural language text to be processed. - * Text length must not exceed 256 characters for virtual agent interactions. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Required. The language of this conversational query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Required. The language of this conversational query. See [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. Note that queries in - * the same session do not necessarily need to specify the same language. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextToSpeechSettings.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextToSpeechSettings.php deleted file mode 100644 index ab020b9a6dfa..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TextToSpeechSettings.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.dialogflow.v2.TextToSpeechSettings - */ -class TextToSpeechSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Indicates whether text to speech is enabled. Even when this field - * is false, other settings in this proto are still retained. - * - * Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_text_to_speech = false; - /** - * Required. Audio encoding of the synthesized audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_audio_encoding = 0; - /** - * Optional. The synthesis sample rate (in hertz) for this audio. If not - * provided, then the synthesizer will use the default sample rate based on - * the audio encoding. If this is different from the voice's natural sample - * rate, then the synthesizer will honor this request by converting to the - * desired sample rate (which might result in worse audio quality). - * - * Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sample_rate_hertz = 0; - /** - * Optional. Configuration of how speech should be synthesized, mapping from - * language (https://cloud.google.com/dialogflow/docs/reference/language) to - * SynthesizeSpeechConfig. - * - * Generated from protobuf field map synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $synthesize_speech_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_text_to_speech - * Optional. Indicates whether text to speech is enabled. Even when this field - * is false, other settings in this proto are still retained. - * @type int $output_audio_encoding - * Required. Audio encoding of the synthesized audio content. - * @type int $sample_rate_hertz - * Optional. The synthesis sample rate (in hertz) for this audio. If not - * provided, then the synthesizer will use the default sample rate based on - * the audio encoding. If this is different from the voice's natural sample - * rate, then the synthesizer will honor this request by converting to the - * desired sample rate (which might result in worse audio quality). - * @type array|\Google\Protobuf\Internal\MapField $synthesize_speech_configs - * Optional. Configuration of how speech should be synthesized, mapping from - * language (https://cloud.google.com/dialogflow/docs/reference/language) to - * SynthesizeSpeechConfig. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Indicates whether text to speech is enabled. Even when this field - * is false, other settings in this proto are still retained. - * - * Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableTextToSpeech() - { - return $this->enable_text_to_speech; - } - - /** - * Optional. Indicates whether text to speech is enabled. Even when this field - * is false, other settings in this proto are still retained. - * - * Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableTextToSpeech($var) - { - GPBUtil::checkBool($var); - $this->enable_text_to_speech = $var; - - return $this; - } - - /** - * Required. Audio encoding of the synthesized audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getOutputAudioEncoding() - { - return $this->output_audio_encoding; - } - - /** - * Required. Audio encoding of the synthesized audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setOutputAudioEncoding($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\OutputAudioEncoding::class); - $this->output_audio_encoding = $var; - - return $this; - } - - /** - * Optional. The synthesis sample rate (in hertz) for this audio. If not - * provided, then the synthesizer will use the default sample rate based on - * the audio encoding. If this is different from the voice's natural sample - * rate, then the synthesizer will honor this request by converting to the - * desired sample rate (which might result in worse audio quality). - * - * Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSampleRateHertz() - { - return $this->sample_rate_hertz; - } - - /** - * Optional. The synthesis sample rate (in hertz) for this audio. If not - * provided, then the synthesizer will use the default sample rate based on - * the audio encoding. If this is different from the voice's natural sample - * rate, then the synthesizer will honor this request by converting to the - * desired sample rate (which might result in worse audio quality). - * - * Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->sample_rate_hertz = $var; - - return $this; - } - - /** - * Optional. Configuration of how speech should be synthesized, mapping from - * language (https://cloud.google.com/dialogflow/docs/reference/language) to - * SynthesizeSpeechConfig. - * - * Generated from protobuf field map synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSynthesizeSpeechConfigs() - { - return $this->synthesize_speech_configs; - } - - /** - * Optional. Configuration of how speech should be synthesized, mapping from - * language (https://cloud.google.com/dialogflow/docs/reference/language) to - * SynthesizeSpeechConfig. - * - * Generated from protobuf field map synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSynthesizeSpeechConfigs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig::class); - $this->synthesize_speech_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TrainAgentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TrainAgentRequest.php deleted file mode 100644 index 6657017d7d38..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/TrainAgentRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.TrainAgentRequest - */ -class TrainAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that the agent to train is associated with. - * Format: `projects/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project that the agent to train is associated with. - * Format: `projects/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that the agent to train is associated with. - * Format: `projects/`. - * - * 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 project that the agent to train is associated with. - * Format: `projects/`. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelOperationMetadata.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelOperationMetadata.php deleted file mode 100644 index 95fe6f8dccd8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelOperationMetadata.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata - */ -class UndeployConversationModelOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - */ - protected $conversation_model = ''; - /** - * Timestamp when the request to undeploy conversation model was submitted. - * The time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $conversation_model - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when the request to undeploy conversation model was submitted. - * The time is measured on server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - * @return string - */ - public function getConversationModel() - { - return $this->conversation_model; - } - - /** - * The resource name of the conversation model. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string conversation_model = 1; - * @param string $var - * @return $this - */ - public function setConversationModel($var) - { - GPBUtil::checkString($var, True); - $this->conversation_model = $var; - - return $this; - } - - /** - * Timestamp when the request to undeploy conversation model was submitted. - * The time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @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); - } - - /** - * Timestamp when the request to undeploy conversation model was submitted. - * The time is measured on server side. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelRequest.php deleted file mode 100644 index fcc391de050b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UndeployConversationModelRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.v2.UndeployConversationModelRequest - */ -class UndeployConversationModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation model to undeploy. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The conversation model to undeploy. Format: - * `projects//conversationModels/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation model to undeploy. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The conversation model to undeploy. Format: - * `projects//conversationModels/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateAnswerRecordRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateAnswerRecordRequest.php deleted file mode 100644 index b4cb0c3ef350..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateAnswerRecordRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.v2.UpdateAnswerRecordRequest - */ -class UpdateAnswerRecordRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Answer record to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerRecord answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $answer_record = null; - /** - * Required. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\AnswerRecord $answer_record - * Required. Answer record to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce(); - parent::__construct($data); - } - - /** - * Required. Answer record to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerRecord answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\AnswerRecord|null - */ - public function getAnswerRecord() - { - return $this->answer_record; - } - - public function hasAnswerRecord() - { - return isset($this->answer_record); - } - - public function clearAnswerRecord() - { - unset($this->answer_record); - } - - /** - * Required. Answer record to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.AnswerRecord answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\AnswerRecord $var - * @return $this - */ - public function setAnswerRecord($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AnswerRecord::class); - $this->answer_record = $var; - - return $this; - } - - /** - * Required. The mask to control which fields get 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 mask to control which fields get 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateContextRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateContextRequest.php deleted file mode 100644 index 18619d49cce0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateContextRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.v2.UpdateContextRequest - */ -class UpdateContextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The context to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $context = null; - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Context $context - * Required. The context to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); - parent::__construct($data); - } - - /** - * Required. The context to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Context|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * Required. The context to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Context context = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Context $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Context::class); - $this->context = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateConversationProfileRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateConversationProfileRequest.php deleted file mode 100644 index 57db8a42bc88..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateConversationProfileRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.v2.UpdateConversationProfileRequest - */ -class UpdateConversationProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The conversation profile to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $conversation_profile = null; - /** - * Required. The mask to control which fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\ConversationProfile $conversation_profile - * Required. The conversation profile to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The mask to control which fields to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); - parent::__construct($data); - } - - /** - * Required. The conversation profile to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\ConversationProfile|null - */ - public function getConversationProfile() - { - return $this->conversation_profile; - } - - public function hasConversationProfile() - { - return isset($this->conversation_profile); - } - - public function clearConversationProfile() - { - unset($this->conversation_profile); - } - - /** - * Required. The conversation profile to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\ConversationProfile $var - * @return $this - */ - public function setConversationProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationProfile::class); - $this->conversation_profile = $var; - - return $this; - } - - /** - * Required. The mask to control which fields to update. - * - * 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 mask to control which fields to update. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateDocumentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateDocumentRequest.php deleted file mode 100644 index 8e37d2863ba3..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateDocumentRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.dialogflow.v2.UpdateDocumentRequest - */ -class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The document to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Document $document - * Required. The document to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The document to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The document to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEntityTypeRequest.php deleted file mode 100644 index 532e1cb41944..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEntityTypeRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.dialogflow.v2.UpdateEntityTypeRequest - */ -class UpdateEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The entity type to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity_type = null; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\EntityType $entity_type - * Required. The entity type to update. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The entity type to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\EntityType|null - */ - public function getEntityType() - { - return $this->entity_type; - } - - public function hasEntityType() - { - return isset($this->entity_type); - } - - public function clearEntityType() - { - unset($this->entity_type); - } - - /** - * Required. The entity type to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\EntityType $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EntityType::class); - $this->entity_type = $var; - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEnvironmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEnvironmentRequest.php deleted file mode 100644 index de77205bc8d5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateEnvironmentRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.dialogflow.v2.UpdateEnvironmentRequest - */ -class UpdateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The environment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment = null; - /** - * Required. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. This field is used to prevent accidental overwrite of the default - * environment, which is an operation that cannot be undone. To confirm that - * the caller desires this overwrite, this field must be explicitly set to - * true when updating the default environment (environment ID = `-`). - * - * Generated from protobuf field bool allow_load_to_draft_and_discard_changes = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_load_to_draft_and_discard_changes = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Environment $environment - * Required. The environment to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The mask to control which fields get updated. - * @type bool $allow_load_to_draft_and_discard_changes - * Optional. This field is used to prevent accidental overwrite of the default - * environment, which is an operation that cannot be undone. To confirm that - * the caller desires this overwrite, this field must be explicitly set to - * true when updating the default environment (environment ID = `-`). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The environment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Required. The environment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Required. The mask to control which fields get 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 mask to control which fields get 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; - } - - /** - * Optional. This field is used to prevent accidental overwrite of the default - * environment, which is an operation that cannot be undone. To confirm that - * the caller desires this overwrite, this field must be explicitly set to - * true when updating the default environment (environment ID = `-`). - * - * Generated from protobuf field bool allow_load_to_draft_and_discard_changes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowLoadToDraftAndDiscardChanges() - { - return $this->allow_load_to_draft_and_discard_changes; - } - - /** - * Optional. This field is used to prevent accidental overwrite of the default - * environment, which is an operation that cannot be undone. To confirm that - * the caller desires this overwrite, this field must be explicitly set to - * true when updating the default environment (environment ID = `-`). - * - * Generated from protobuf field bool allow_load_to_draft_and_discard_changes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowLoadToDraftAndDiscardChanges($var) - { - GPBUtil::checkBool($var); - $this->allow_load_to_draft_and_discard_changes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateFulfillmentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateFulfillmentRequest.php deleted file mode 100644 index affd77840a10..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateFulfillmentRequest.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.dialogflow.v2.UpdateFulfillmentRequest - */ -class UpdateFulfillmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fulfillment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fulfillment = null; - /** - * Required. The mask to control which fields get updated. If the mask is not - * present, all fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Fulfillment $fulfillment - * Required. The fulfillment to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The mask to control which fields get updated. If the mask is not - * present, all fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fulfillment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Fulfillment|null - */ - public function getFulfillment() - { - return $this->fulfillment; - } - - public function hasFulfillment() - { - return isset($this->fulfillment); - } - - public function clearFulfillment() - { - unset($this->fulfillment); - } - - /** - * Required. The fulfillment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Fulfillment $var - * @return $this - */ - public function setFulfillment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Fulfillment::class); - $this->fulfillment = $var; - - return $this; - } - - /** - * Required. The mask to control which fields get updated. If the mask is not - * present, all fields will 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 mask to control which fields get updated. If the mask is not - * present, all fields will 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateIntentRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateIntentRequest.php deleted file mode 100644 index d5b1f04df3b2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateIntentRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.dialogflow.v2.UpdateIntentRequest - */ -class UpdateIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The intent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $intent = null; - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $intent_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Intent $intent - * Required. The intent to update. - * @type string $language_code - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields get updated. - * @type int $intent_view - * Optional. The resource view to apply to the returned intent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The intent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Intent|null - */ - public function getIntent() - { - return $this->intent; - } - - public function hasIntent() - { - return isset($this->intent); - } - - public function clearIntent() - { - unset($this->intent); - } - - /** - * Required. The intent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Intent $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent::class); - $this->intent = $var; - - return $this; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIntentView() - { - return $this->intent_view; - } - - /** - * Optional. The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.IntentView intent_view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIntentView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class); - $this->intent_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateKnowledgeBaseRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateKnowledgeBaseRequest.php deleted file mode 100644 index 25415a229dee..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateKnowledgeBaseRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest - */ -class UpdateKnowledgeBaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The knowledge base to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $knowledge_base = null; - /** - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\KnowledgeBase $knowledge_base - * Required. The knowledge base to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\KnowledgeBase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The knowledge base to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\KnowledgeBase|null - */ - public function getKnowledgeBase() - { - return $this->knowledge_base; - } - - public function hasKnowledgeBase() - { - return isset($this->knowledge_base); - } - - public function clearKnowledgeBase() - { - unset($this->knowledge_base); - } - - /** - * Required. The knowledge base to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.KnowledgeBase knowledge_base = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\KnowledgeBase $var - * @return $this - */ - public function setKnowledgeBase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\KnowledgeBase::class); - $this->knowledge_base = $var; - - return $this; - } - - /** - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateParticipantRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateParticipantRequest.php deleted file mode 100644 index e2ae18a72bb5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateParticipantRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.v2.UpdateParticipantRequest - */ -class UpdateParticipantRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The participant to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $participant = null; - /** - * Required. The mask to specify which fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Participant $participant - * Required. The participant to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The mask to specify which fields to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); - parent::__construct($data); - } - - /** - * Required. The participant to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Participant|null - */ - public function getParticipant() - { - return $this->participant; - } - - public function hasParticipant() - { - return isset($this->participant); - } - - public function clearParticipant() - { - unset($this->participant); - } - - /** - * Required. The participant to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Participant participant = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Participant $var - * @return $this - */ - public function setParticipant($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Participant::class); - $this->participant = $var; - - return $this; - } - - /** - * Required. The mask to specify which fields to update. - * - * 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 mask to specify which fields to update. - * - * 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateSessionEntityTypeRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateSessionEntityTypeRequest.php deleted file mode 100644 index 4663a03d7417..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateSessionEntityTypeRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest - */ -class UpdateSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The session entity type to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $session_entity_type = null; - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\SessionEntityType $session_entity_type - * Required. The session entity type to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The session entity type to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\SessionEntityType|null - */ - public function getSessionEntityType() - { - return $this->session_entity_type; - } - - public function hasSessionEntityType() - { - return isset($this->session_entity_type); - } - - public function clearSessionEntityType() - { - unset($this->session_entity_type); - } - - /** - * Required. The session entity type to update. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\SessionEntityType $var - * @return $this - */ - public function setSessionEntityType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); - $this->session_entity_type = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateVersionRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateVersionRequest.php deleted file mode 100644 index b5f31afcf407..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/UpdateVersionRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dialogflow.v2.UpdateVersionRequest - */ -class UpdateVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The version to update. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = null; - /** - * Required. The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\V2\Version $version - * Required. The version to update. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The version to update. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\V2\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * Required. The version to update. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\V2\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Version::class); - $this->version = $var; - - return $this; - } - - /** - * Required. The mask to control which fields get 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 mask to control which fields get 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/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError.php deleted file mode 100644 index a9216f15ccb6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.dialogflow.v2.ValidationError - */ -class ValidationError extends \Google\Protobuf\Internal\Message -{ - /** - * The severity of the error. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ValidationError.Severity severity = 1; - */ - protected $severity = 0; - /** - * The names of the entries that the error is associated with. - * Format: - * - "projects//agent", if the error is associated with the entire - * agent. - * - "projects//agent/intents/", if the error is - * associated with certain intents. - * - "projects//agent/intents//trainingPhrases/", if the - * error is associated with certain intent training phrases. - * - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. - * - "projects//agent/entities/", if the error is - * associated with certain entities. - * - * Generated from protobuf field repeated string entries = 3; - */ - private $entries; - /** - * The detailed error message. - * - * Generated from protobuf field string error_message = 4; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $severity - * The severity of the error. - * @type array|\Google\Protobuf\Internal\RepeatedField $entries - * The names of the entries that the error is associated with. - * Format: - * - "projects//agent", if the error is associated with the entire - * agent. - * - "projects//agent/intents/", if the error is - * associated with certain intents. - * - "projects//agent/intents//trainingPhrases/", if the - * error is associated with certain intent training phrases. - * - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. - * - "projects//agent/entities/", if the error is - * associated with certain entities. - * @type string $error_message - * The detailed error message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ValidationResult::initOnce(); - parent::__construct($data); - } - - /** - * The severity of the error. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ValidationError.Severity severity = 1; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * The severity of the error. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.ValidationError.Severity severity = 1; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ValidationError\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * The names of the entries that the error is associated with. - * Format: - * - "projects//agent", if the error is associated with the entire - * agent. - * - "projects//agent/intents/", if the error is - * associated with certain intents. - * - "projects//agent/intents//trainingPhrases/", if the - * error is associated with certain intent training phrases. - * - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. - * - "projects//agent/entities/", if the error is - * associated with certain entities. - * - * Generated from protobuf field repeated string entries = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * The names of the entries that the error is associated with. - * Format: - * - "projects//agent", if the error is associated with the entire - * agent. - * - "projects//agent/intents/", if the error is - * associated with certain intents. - * - "projects//agent/intents//trainingPhrases/", if the - * error is associated with certain intent training phrases. - * - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. - * - "projects//agent/entities/", if the error is - * associated with certain entities. - * - * Generated from protobuf field repeated string entries = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->entries = $arr; - - return $this; - } - - /** - * The detailed error message. - * - * Generated from protobuf field string error_message = 4; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * The detailed error message. - * - * Generated from protobuf field string error_message = 4; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError/Severity.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError/Severity.php deleted file mode 100644 index 893aa5c46a19..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError/Severity.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dialogflow.v2.ValidationError.Severity - */ -class Severity -{ - /** - * Not specified. This value should never be used. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * The agent doesn't follow Dialogflow best practices. - * - * Generated from protobuf enum INFO = 1; - */ - const INFO = 1; - /** - * The agent may not behave as expected. - * - * Generated from protobuf enum WARNING = 2; - */ - const WARNING = 2; - /** - * The agent may experience partial failures. - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - /** - * The agent may completely fail. - * - * Generated from protobuf enum CRITICAL = 4; - */ - const CRITICAL = 4; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::INFO => 'INFO', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - self::CRITICAL => 'CRITICAL', - ]; - - 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(Severity::class, \Google\Cloud\Dialogflow\V2\ValidationError_Severity::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError_Severity.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError_Severity.php deleted file mode 100644 index 370f02480692..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/ValidationError_Severity.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.dialogflow.v2.ValidationResult - */ -class ValidationResult extends \Google\Protobuf\Internal\Message -{ - /** - * Contains all validation errors. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ValidationError validation_errors = 1; - */ - private $validation_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\V2\ValidationError>|\Google\Protobuf\Internal\RepeatedField $validation_errors - * Contains all validation errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\ValidationResult::initOnce(); - parent::__construct($data); - } - - /** - * Contains all validation errors. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ValidationError validation_errors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidationErrors() - { - return $this->validation_errors; - } - - /** - * Contains all validation errors. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ValidationError validation_errors = 1; - * @param array<\Google\Cloud\Dialogflow\V2\ValidationError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidationErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ValidationError::class); - $this->validation_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version.php deleted file mode 100644 index 8e7a86fa5836..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version.php +++ /dev/null @@ -1,254 +0,0 @@ -google.cloud.dialogflow.v2.Version - */ -class Version extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique identifier of this agent version. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. The developer-provided description of this version. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The sequential number of this version. This field is read-only - * which means it cannot be set by create and update methods. - * - * Generated from protobuf field int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version_number = 0; - /** - * Output only. The creation time of this version. This field is read-only, - * i.e., it cannot be set by create and update methods. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The status of this version. This field is read-only and cannot - * be set by create and update methods. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique identifier of this agent version. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * @type string $description - * Optional. The developer-provided description of this version. - * @type int $version_number - * Output only. The sequential number of this version. This field is read-only - * which means it cannot be set by create and update methods. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time of this version. This field is read-only, - * i.e., it cannot be set by create and update methods. - * @type int $status - * Output only. The status of this version. This field is read-only and cannot - * be set by create and update methods. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique identifier of this agent version. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique identifier of this agent version. - * Supported formats: - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The developer-provided description of this version. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The developer-provided description of this version. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The sequential number of this version. This field is read-only - * which means it cannot be set by create and update methods. - * - * Generated from protobuf field int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVersionNumber() - { - return $this->version_number; - } - - /** - * Output only. The sequential number of this version. This field is read-only - * which means it cannot be set by create and update methods. - * - * Generated from protobuf field int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVersionNumber($var) - { - GPBUtil::checkInt32($var); - $this->version_number = $var; - - return $this; - } - - /** - * Output only. The creation time of this version. This field is read-only, - * i.e., it cannot be set by create and update methods. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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 creation time of this version. This field is read-only, - * i.e., it cannot be set by create and update methods. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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 status of this version. This field is read-only and cannot - * be set by create and update methods. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * Output only. The status of this version. This field is read-only and cannot - * be set by create and update methods. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Version\VersionStatus::class); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version/VersionStatus.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version/VersionStatus.php deleted file mode 100644 index cafb8c2f098b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version/VersionStatus.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.v2.Version.VersionStatus - */ -class VersionStatus -{ - /** - * Not specified. This value is not used. - * - * Generated from protobuf enum VERSION_STATUS_UNSPECIFIED = 0; - */ - const VERSION_STATUS_UNSPECIFIED = 0; - /** - * Version is not ready to serve (e.g. training is in progress). - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * Version is ready to serve. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Version training failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::VERSION_STATUS_UNSPECIFIED => 'VERSION_STATUS_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::READY => 'READY', - self::FAILED => 'FAILED', - ]; - - 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(VersionStatus::class, \Google\Cloud\Dialogflow\V2\Version_VersionStatus::class); - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version_VersionStatus.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version_VersionStatus.php deleted file mode 100644 index cb9460da276c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/Version_VersionStatus.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.dialogflow.v2.Versions/ListVersions', - $argument, - ['\Google\Cloud\Dialogflow\V2\ListVersionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the specified agent version. - * @param \Google\Cloud\Dialogflow\V2\GetVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetVersion(\Google\Cloud\Dialogflow\V2\GetVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Versions/GetVersion', - $argument, - ['\Google\Cloud\Dialogflow\V2\Version', 'decode'], - $metadata, $options); - } - - /** - * Creates an agent version. - * - * The new version points to the agent instance in the "default" environment. - * @param \Google\Cloud\Dialogflow\V2\CreateVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateVersion(\Google\Cloud\Dialogflow\V2\CreateVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Versions/CreateVersion', - $argument, - ['\Google\Cloud\Dialogflow\V2\Version', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified agent version. - * - * Note that this method does not allow you to update the state of the agent - * the given version points to. It allows you to update only mutable - * properties of the version resource. - * @param \Google\Cloud\Dialogflow\V2\UpdateVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateVersion(\Google\Cloud\Dialogflow\V2\UpdateVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Versions/UpdateVersion', - $argument, - ['\Google\Cloud\Dialogflow\V2\Version', 'decode'], - $metadata, $options); - } - - /** - * Delete the specified agent version. - * @param \Google\Cloud\Dialogflow\V2\DeleteVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteVersion(\Google\Cloud\Dialogflow\V2\DeleteVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.dialogflow.v2.Versions/DeleteVersion', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VoiceSelectionParams.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VoiceSelectionParams.php deleted file mode 100644 index 762f054c7ec1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/VoiceSelectionParams.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.dialogflow.v2.VoiceSelectionParams - */ -class VoiceSelectionParams extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The name of the voice. If not set, the service will choose a - * voice based on the other parameters such as language_code and - * [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. The preferred gender of the voice. If not set, the service will - * choose a voice based on the other parameters such as language_code and - * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that - * this is only a preference, not requirement. If a voice of the appropriate - * gender is not available, the synthesizer should substitute a voice with a - * different gender rather than failing the request. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2; - */ - protected $ssml_gender = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. The name of the voice. If not set, the service will choose a - * voice based on the other parameters such as language_code and - * [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. - * @type int $ssml_gender - * Optional. The preferred gender of the voice. If not set, the service will - * choose a voice based on the other parameters such as language_code and - * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that - * this is only a preference, not requirement. If a voice of the appropriate - * gender is not available, the synthesizer should substitute a voice with a - * different gender rather than failing the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The name of the voice. If not set, the service will choose a - * voice based on the other parameters such as language_code and - * [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. The name of the voice. If not set, the service will choose a - * voice based on the other parameters such as language_code and - * [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. - * - * 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; - } - - /** - * Optional. The preferred gender of the voice. If not set, the service will - * choose a voice based on the other parameters such as language_code and - * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that - * this is only a preference, not requirement. If a voice of the appropriate - * gender is not available, the synthesizer should substitute a voice with a - * different gender rather than failing the request. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2; - * @return int - */ - public function getSsmlGender() - { - return $this->ssml_gender; - } - - /** - * Optional. The preferred gender of the voice. If not set, the service will - * choose a voice based on the other parameters such as language_code and - * [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that - * this is only a preference, not requirement. If a voice of the appropriate - * gender is not available, the synthesizer should substitute a voice with a - * different gender rather than failing the request. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2; - * @param int $var - * @return $this - */ - public function setSsmlGender($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SsmlVoiceGender::class); - $this->ssml_gender = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookRequest.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookRequest.php deleted file mode 100644 index e00b19da7256..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookRequest.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.dialogflow.v2.WebhookRequest - */ -class WebhookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of detectIntent request session. - * Can be used to identify end-user inside webhook implementation. - * Format: `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. - * - * Generated from protobuf field string session = 4; - */ - protected $session = ''; - /** - * The unique identifier of the response. Contains the same value as - * `[Streaming]DetectIntentResponse.response_id`. - * - * Generated from protobuf field string response_id = 1; - */ - protected $response_id = ''; - /** - * The result of the conversational query or event processing. Contains the - * same value as `[Streaming]DetectIntentResponse.query_result`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; - */ - protected $query_result = null; - /** - * Optional. The contents of the original request that was passed to - * `[Streaming]DetectIntent` call. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OriginalDetectIntentRequest original_detect_intent_request = 3; - */ - protected $original_detect_intent_request = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $session - * The unique identifier of detectIntent request session. - * Can be used to identify end-user inside webhook implementation. - * Format: `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. - * @type string $response_id - * The unique identifier of the response. Contains the same value as - * `[Streaming]DetectIntentResponse.response_id`. - * @type \Google\Cloud\Dialogflow\V2\QueryResult $query_result - * The result of the conversational query or event processing. Contains the - * same value as `[Streaming]DetectIntentResponse.query_result`. - * @type \Google\Cloud\Dialogflow\V2\OriginalDetectIntentRequest $original_detect_intent_request - * Optional. The contents of the original request that was passed to - * `[Streaming]DetectIntent` call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of detectIntent request session. - * Can be used to identify end-user inside webhook implementation. - * Format: `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. - * - * Generated from protobuf field string session = 4; - * @return string - */ - public function getSession() - { - return $this->session; - } - - /** - * The unique identifier of detectIntent request session. - * Can be used to identify end-user inside webhook implementation. - * Format: `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. - * - * Generated from protobuf field string session = 4; - * @param string $var - * @return $this - */ - public function setSession($var) - { - GPBUtil::checkString($var, True); - $this->session = $var; - - return $this; - } - - /** - * The unique identifier of the response. Contains the same value as - * `[Streaming]DetectIntentResponse.response_id`. - * - * Generated from protobuf field string response_id = 1; - * @return string - */ - public function getResponseId() - { - return $this->response_id; - } - - /** - * The unique identifier of the response. Contains the same value as - * `[Streaming]DetectIntentResponse.response_id`. - * - * Generated from protobuf field string response_id = 1; - * @param string $var - * @return $this - */ - public function setResponseId($var) - { - GPBUtil::checkString($var, True); - $this->response_id = $var; - - return $this; - } - - /** - * The result of the conversational query or event processing. Contains the - * same value as `[Streaming]DetectIntentResponse.query_result`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; - * @return \Google\Cloud\Dialogflow\V2\QueryResult|null - */ - public function getQueryResult() - { - return $this->query_result; - } - - public function hasQueryResult() - { - return isset($this->query_result); - } - - public function clearQueryResult() - { - unset($this->query_result); - } - - /** - * The result of the conversational query or event processing. Contains the - * same value as `[Streaming]DetectIntentResponse.query_result`. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.QueryResult query_result = 2; - * @param \Google\Cloud\Dialogflow\V2\QueryResult $var - * @return $this - */ - public function setQueryResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryResult::class); - $this->query_result = $var; - - return $this; - } - - /** - * Optional. The contents of the original request that was passed to - * `[Streaming]DetectIntent` call. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OriginalDetectIntentRequest original_detect_intent_request = 3; - * @return \Google\Cloud\Dialogflow\V2\OriginalDetectIntentRequest|null - */ - public function getOriginalDetectIntentRequest() - { - return $this->original_detect_intent_request; - } - - public function hasOriginalDetectIntentRequest() - { - return isset($this->original_detect_intent_request); - } - - public function clearOriginalDetectIntentRequest() - { - unset($this->original_detect_intent_request); - } - - /** - * Optional. The contents of the original request that was passed to - * `[Streaming]DetectIntent` call. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.OriginalDetectIntentRequest original_detect_intent_request = 3; - * @param \Google\Cloud\Dialogflow\V2\OriginalDetectIntentRequest $var - * @return $this - */ - public function setOriginalDetectIntentRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OriginalDetectIntentRequest::class); - $this->original_detect_intent_request = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookResponse.php b/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookResponse.php deleted file mode 100644 index df629dd7b5f3..000000000000 --- a/owl-bot-staging/Dialogflow/v2/proto/src/Google/Cloud/Dialogflow/V2/WebhookResponse.php +++ /dev/null @@ -1,430 +0,0 @@ -google.cloud.dialogflow.v2.WebhookResponse - */ -class WebhookResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The text response message intended for the end-user. - * It is recommended to use `fulfillment_messages.text.text[0]` instead. - * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] - * sent to the integration or API caller. - * - * Generated from protobuf field string fulfillment_text = 1; - */ - protected $fulfillment_text = ''; - /** - * Optional. The rich response messages intended for the end-user. - * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] - * sent to the integration or API caller. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; - */ - private $fulfillment_messages; - /** - * Optional. A custom field used to identify the webhook source. - * Arbitrary strings are supported. - * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] - * sent to the integration or API caller. - * - * Generated from protobuf field string source = 3; - */ - protected $source = ''; - /** - * Optional. This field can be used to pass custom data from your webhook to - * the integration or API caller. Arbitrary JSON objects are supported. When - * provided, Dialogflow uses this field to populate - * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] - * sent to the integration or API caller. This field is also used by the - * [Google Assistant - * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) - * for rich response messages. - * See the format definition at [Google Assistant Dialogflow webhook - * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) - * - * Generated from protobuf field .google.protobuf.Struct payload = 4; - */ - protected $payload = null; - /** - * Optional. The collection of output contexts that will overwrite currently - * active contexts for the session and reset their lifespans. - * When provided, Dialogflow uses this field to populate - * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] - * sent to the integration or API caller. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; - */ - private $output_contexts; - /** - * Optional. Invokes the supplied events. - * When this field is set, Dialogflow ignores the `fulfillment_text`, - * `fulfillment_messages`, and `payload` fields. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput followup_event_input = 6; - */ - protected $followup_event_input = null; - /** - * Optional. Additional session entity types to replace or extend developer - * entity types with. The entity synonyms apply to all languages and persist - * for the session. Setting this data from a webhook overwrites - * the session entity types that have been set using `detectIntent`, - * `streamingDetectIntent` or - * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] - * management methods. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; - */ - private $session_entity_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $fulfillment_text - * Optional. The text response message intended for the end-user. - * It is recommended to use `fulfillment_messages.text.text[0]` instead. - * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] - * sent to the integration or API caller. - * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $fulfillment_messages - * Optional. The rich response messages intended for the end-user. - * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] - * sent to the integration or API caller. - * @type string $source - * Optional. A custom field used to identify the webhook source. - * Arbitrary strings are supported. - * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] - * sent to the integration or API caller. - * @type \Google\Protobuf\Struct $payload - * Optional. This field can be used to pass custom data from your webhook to - * the integration or API caller. Arbitrary JSON objects are supported. When - * provided, Dialogflow uses this field to populate - * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] - * sent to the integration or API caller. This field is also used by the - * [Google Assistant - * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) - * for rich response messages. - * See the format definition at [Google Assistant Dialogflow webhook - * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) - * @type array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $output_contexts - * Optional. The collection of output contexts that will overwrite currently - * active contexts for the session and reset their lifespans. - * When provided, Dialogflow uses this field to populate - * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] - * sent to the integration or API caller. - * @type \Google\Cloud\Dialogflow\V2\EventInput $followup_event_input - * Optional. Invokes the supplied events. - * When this field is set, Dialogflow ignores the `fulfillment_text`, - * `fulfillment_messages`, and `payload` fields. - * @type array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $session_entity_types - * Optional. Additional session entity types to replace or extend developer - * entity types with. The entity synonyms apply to all languages and persist - * for the session. Setting this data from a webhook overwrites - * the session entity types that have been set using `detectIntent`, - * `streamingDetectIntent` or - * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] - * management methods. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\V2\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The text response message intended for the end-user. - * It is recommended to use `fulfillment_messages.text.text[0]` instead. - * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] - * sent to the integration or API caller. - * - * Generated from protobuf field string fulfillment_text = 1; - * @return string - */ - public function getFulfillmentText() - { - return $this->fulfillment_text; - } - - /** - * Optional. The text response message intended for the end-user. - * It is recommended to use `fulfillment_messages.text.text[0]` instead. - * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] - * sent to the integration or API caller. - * - * Generated from protobuf field string fulfillment_text = 1; - * @param string $var - * @return $this - */ - public function setFulfillmentText($var) - { - GPBUtil::checkString($var, True); - $this->fulfillment_text = $var; - - return $this; - } - - /** - * Optional. The rich response messages intended for the end-user. - * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] - * sent to the integration or API caller. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFulfillmentMessages() - { - return $this->fulfillment_messages; - } - - /** - * Optional. The rich response messages intended for the end-user. - * When provided, Dialogflow uses this field to populate - * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] - * sent to the integration or API caller. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; - * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFulfillmentMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message::class); - $this->fulfillment_messages = $arr; - - return $this; - } - - /** - * Optional. A custom field used to identify the webhook source. - * Arbitrary strings are supported. - * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] - * sent to the integration or API caller. - * - * Generated from protobuf field string source = 3; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Optional. A custom field used to identify the webhook source. - * Arbitrary strings are supported. - * When provided, Dialogflow uses this field to populate - * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] - * sent to the integration or API caller. - * - * Generated from protobuf field string source = 3; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * Optional. This field can be used to pass custom data from your webhook to - * the integration or API caller. Arbitrary JSON objects are supported. When - * provided, Dialogflow uses this field to populate - * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] - * sent to the integration or API caller. This field is also used by the - * [Google Assistant - * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) - * for rich response messages. - * See the format definition at [Google Assistant Dialogflow webhook - * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) - * - * Generated from protobuf field .google.protobuf.Struct payload = 4; - * @return \Google\Protobuf\Struct|null - */ - public function getPayload() - { - return $this->payload; - } - - public function hasPayload() - { - return isset($this->payload); - } - - public function clearPayload() - { - unset($this->payload); - } - - /** - * Optional. This field can be used to pass custom data from your webhook to - * the integration or API caller. Arbitrary JSON objects are supported. When - * provided, Dialogflow uses this field to populate - * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] - * sent to the integration or API caller. This field is also used by the - * [Google Assistant - * integration](https://cloud.google.com/dialogflow/docs/integrations/aog) - * for rich response messages. - * See the format definition at [Google Assistant Dialogflow webhook - * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) - * - * Generated from protobuf field .google.protobuf.Struct payload = 4; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->payload = $var; - - return $this; - } - - /** - * Optional. The collection of output contexts that will overwrite currently - * active contexts for the session and reset their lifespans. - * When provided, Dialogflow uses this field to populate - * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] - * sent to the integration or API caller. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOutputContexts() - { - return $this->output_contexts; - } - - /** - * Optional. The collection of output contexts that will overwrite currently - * active contexts for the session and reset their lifespans. - * When provided, Dialogflow uses this field to populate - * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] - * sent to the integration or API caller. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; - * @param array<\Google\Cloud\Dialogflow\V2\Context>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOutputContexts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); - $this->output_contexts = $arr; - - return $this; - } - - /** - * Optional. Invokes the supplied events. - * When this field is set, Dialogflow ignores the `fulfillment_text`, - * `fulfillment_messages`, and `payload` fields. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput followup_event_input = 6; - * @return \Google\Cloud\Dialogflow\V2\EventInput|null - */ - public function getFollowupEventInput() - { - return $this->followup_event_input; - } - - public function hasFollowupEventInput() - { - return isset($this->followup_event_input); - } - - public function clearFollowupEventInput() - { - unset($this->followup_event_input); - } - - /** - * Optional. Invokes the supplied events. - * When this field is set, Dialogflow ignores the `fulfillment_text`, - * `fulfillment_messages`, and `payload` fields. - * - * Generated from protobuf field .google.cloud.dialogflow.v2.EventInput followup_event_input = 6; - * @param \Google\Cloud\Dialogflow\V2\EventInput $var - * @return $this - */ - public function setFollowupEventInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class); - $this->followup_event_input = $var; - - return $this; - } - - /** - * Optional. Additional session entity types to replace or extend developer - * entity types with. The entity synonyms apply to all languages and persist - * for the session. Setting this data from a webhook overwrites - * the session entity types that have been set using `detectIntent`, - * `streamingDetectIntent` or - * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] - * management methods. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSessionEntityTypes() - { - return $this->session_entity_types; - } - - /** - * Optional. Additional session entity types to replace or extend developer - * entity types with. The entity synonyms apply to all languages and persist - * for the session. Setting this data from a webhook overwrites - * the session entity types that have been set using `detectIntent`, - * `streamingDetectIntent` or - * [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] - * management methods. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; - * @param array<\Google\Cloud\Dialogflow\V2\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSessionEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SessionEntityType::class); - $this->session_entity_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/delete_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/delete_agent.php deleted file mode 100644 index 6a566c87c5b5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/delete_agent.php +++ /dev/null @@ -1,65 +0,0 @@ -`. Please see - * {@see AgentsClient::projectName()} for help formatting this field. - */ -function delete_agent_sample(string $formattedParent): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Call the API and handle any network failures. - try { - $agentsClient->deleteAgent($formattedParent); - 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 -{ - $formattedParent = AgentsClient::projectName('[PROJECT]'); - - delete_agent_sample($formattedParent); -} -// [END dialogflow_v2_generated_Agents_DeleteAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/export_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/export_agent.php deleted file mode 100644 index aa0b05ec1335..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/export_agent.php +++ /dev/null @@ -1,99 +0,0 @@ -`. Please see - * {@see AgentsClient::projectName()} for help formatting this field. - * @param string $agentUri The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the agent - * to. The format of this URI must be `gs:///`. If - * left unspecified, the serialized agent is returned inline. - * - * Dialogflow performs a write operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have write permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - */ -function export_agent_sample(string $formattedParent, string $agentUri): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $agentsClient->exportAgent($formattedParent, $agentUri); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportAgentResponse $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 = AgentsClient::projectName('[PROJECT]'); - $agentUri = '[AGENT_URI]'; - - export_agent_sample($formattedParent, $agentUri); -} -// [END dialogflow_v2_generated_Agents_ExportAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_agent.php deleted file mode 100644 index 50c7f1b26a0d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_agent.php +++ /dev/null @@ -1,67 +0,0 @@ -`. Please see - * {@see AgentsClient::projectName()} for help formatting this field. - */ -function get_agent_sample(string $formattedParent): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Call the API and handle any network failures. - try { - /** @var Agent $response */ - $response = $agentsClient->getAgent($formattedParent); - 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 = AgentsClient::projectName('[PROJECT]'); - - get_agent_sample($formattedParent); -} -// [END dialogflow_v2_generated_Agents_GetAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_location.php deleted file mode 100644 index 31f5636f0173..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Agents_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_validation_result.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_validation_result.php deleted file mode 100644 index 0aeae9968fb0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/get_validation_result.php +++ /dev/null @@ -1,68 +0,0 @@ -`. Please see - * {@see AgentsClient::projectName()} for help formatting this field. - */ -function get_validation_result_sample(string $formattedParent): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Call the API and handle any network failures. - try { - /** @var ValidationResult $response */ - $response = $agentsClient->getValidationResult($formattedParent); - 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 = AgentsClient::projectName('[PROJECT]'); - - get_validation_result_sample($formattedParent); -} -// [END dialogflow_v2_generated_Agents_GetValidationResult_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/import_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/import_agent.php deleted file mode 100644 index c810d6d346c1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/import_agent.php +++ /dev/null @@ -1,102 +0,0 @@ -`. Please see - * {@see AgentsClient::projectName()} for help formatting this field. - */ -function import_agent_sample(string $formattedParent): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $agentsClient->importAgent($formattedParent); - $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 -{ - $formattedParent = AgentsClient::projectName('[PROJECT]'); - - import_agent_sample($formattedParent); -} -// [END dialogflow_v2_generated_Agents_ImportAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/list_locations.php deleted file mode 100644 index c1a90db03466..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Agents_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/restore_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/restore_agent.php deleted file mode 100644 index 2576c7a2ccc6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/restore_agent.php +++ /dev/null @@ -1,100 +0,0 @@ -`. Please see - * {@see AgentsClient::projectName()} for help formatting this field. - */ -function restore_agent_sample(string $formattedParent): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $agentsClient->restoreAgent($formattedParent); - $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 -{ - $formattedParent = AgentsClient::projectName('[PROJECT]'); - - restore_agent_sample($formattedParent); -} -// [END dialogflow_v2_generated_Agents_RestoreAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/search_agents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/search_agents.php deleted file mode 100644 index 69eeaff5244e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/search_agents.php +++ /dev/null @@ -1,78 +0,0 @@ -`. Please see - * {@see AgentsClient::projectName()} for help formatting this field. - */ -function search_agents_sample(string $formattedParent): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $agentsClient->searchAgents($formattedParent); - - /** @var Agent $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 = AgentsClient::projectName('[PROJECT]'); - - search_agents_sample($formattedParent); -} -// [END dialogflow_v2_generated_Agents_SearchAgents_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/set_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/set_agent.php deleted file mode 100644 index a4149c56d3d7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/set_agent.php +++ /dev/null @@ -1,99 +0,0 @@ -`. Please see - * {@see AgentsClient::projectName()} for help formatting this field. - * @param string $agentDisplayName The name of this agent. - * @param string $agentDefaultLanguageCode The default language of the agent as a language tag. See - * [Language - * Support](https://cloud.google.com/dialogflow/docs/reference/language) - * for a list of the currently supported language codes. This field cannot be - * set by the `Update` method. - * @param string $agentTimeZone The time zone of this agent from the - * [time zone database](https://www.iana.org/time-zones), e.g., - * America/New_York, Europe/Paris. - */ -function set_agent_sample( - string $formattedAgentParent, - string $agentDisplayName, - string $agentDefaultLanguageCode, - string $agentTimeZone -): void { - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $agent = (new Agent()) - ->setParent($formattedAgentParent) - ->setDisplayName($agentDisplayName) - ->setDefaultLanguageCode($agentDefaultLanguageCode) - ->setTimeZone($agentTimeZone); - - // Call the API and handle any network failures. - try { - /** @var Agent $response */ - $response = $agentsClient->setAgent($agent); - 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 -{ - $formattedAgentParent = AgentsClient::projectName('[PROJECT]'); - $agentDisplayName = '[DISPLAY_NAME]'; - $agentDefaultLanguageCode = '[DEFAULT_LANGUAGE_CODE]'; - $agentTimeZone = '[TIME_ZONE]'; - - set_agent_sample( - $formattedAgentParent, - $agentDisplayName, - $agentDefaultLanguageCode, - $agentTimeZone - ); -} -// [END dialogflow_v2_generated_Agents_SetAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/train_agent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/train_agent.php deleted file mode 100644 index 52e6ece194ac..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AgentsClient/train_agent.php +++ /dev/null @@ -1,89 +0,0 @@ -`. Please see - * {@see AgentsClient::projectName()} for help formatting this field. - */ -function train_agent_sample(string $formattedParent): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $agentsClient->trainAgent($formattedParent); - $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 -{ - $formattedParent = AgentsClient::projectName('[PROJECT]'); - - train_agent_sample($formattedParent); -} -// [END dialogflow_v2_generated_Agents_TrainAgent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/get_location.php deleted file mode 100644 index 4c45237cb172..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_AnswerRecords_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_answer_records.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_answer_records.php deleted file mode 100644 index 383b871f120b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_answer_records.php +++ /dev/null @@ -1,74 +0,0 @@ -/locations/`. Please see - * {@see AnswerRecordsClient::projectName()} for help formatting this field. - */ -function list_answer_records_sample(string $formattedParent): void -{ - // Create a client. - $answerRecordsClient = new AnswerRecordsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $answerRecordsClient->listAnswerRecords($formattedParent); - - /** @var AnswerRecord $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 = AnswerRecordsClient::projectName('[PROJECT]'); - - list_answer_records_sample($formattedParent); -} -// [END dialogflow_v2_generated_AnswerRecords_ListAnswerRecords_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_locations.php deleted file mode 100644 index 67f38d2cc8fc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_AnswerRecords_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/update_answer_record.php b/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/update_answer_record.php deleted file mode 100644 index dbb982702e80..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/AnswerRecordsClient/update_answer_record.php +++ /dev/null @@ -1,61 +0,0 @@ -setAnswerFeedback($answerRecordAnswerFeedback); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var AnswerRecord $response */ - $response = $answerRecordsClient->updateAnswerRecord($answerRecord, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_AnswerRecords_UpdateAnswerRecord_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/create_context.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/create_context.php deleted file mode 100644 index f34d47416957..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/create_context.php +++ /dev/null @@ -1,95 +0,0 @@ -/agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. Please see - * {@see ContextsClient::sessionName()} for help formatting this field. - * @param string $contextName The unique identifier of the context. Format: - * `projects//agent/sessions//contexts/`, - * or `projects//agent/environments//users//sessions//contexts/`. - * - * The `Context ID` is always converted to lowercase, may only contain - * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. - * - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * The following context names are reserved for internal use by Dialogflow. - * You should not use these contexts or create contexts with these names: - * - * * `__system_counters__` - * * `*_id_dialog_context` - * * `*_dialog_params_size` - */ -function create_context_sample(string $formattedParent, string $contextName): void -{ - // Create a client. - $contextsClient = new ContextsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $context = (new Context()) - ->setName($contextName); - - // Call the API and handle any network failures. - try { - /** @var Context $response */ - $response = $contextsClient->createContext($formattedParent, $context); - 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 = ContextsClient::sessionName('[PROJECT]', '[SESSION]'); - $contextName = '[NAME]'; - - create_context_sample($formattedParent, $contextName); -} -// [END dialogflow_v2_generated_Contexts_CreateContext_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_all_contexts.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_all_contexts.php deleted file mode 100644 index 9943ce9523ac..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_all_contexts.php +++ /dev/null @@ -1,69 +0,0 @@ -/agent/sessions/` or `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified we assume default 'draft' environment. - * If `User ID` is not specified, we assume default '-' user. Please see - * {@see ContextsClient::sessionName()} for help formatting this field. - */ -function delete_all_contexts_sample(string $formattedParent): void -{ - // Create a client. - $contextsClient = new ContextsClient(); - - // Call the API and handle any network failures. - try { - $contextsClient->deleteAllContexts($formattedParent); - 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 -{ - $formattedParent = ContextsClient::sessionName('[PROJECT]', '[SESSION]'); - - delete_all_contexts_sample($formattedParent); -} -// [END dialogflow_v2_generated_Contexts_DeleteAllContexts_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_context.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_context.php deleted file mode 100644 index 9139cff88fab..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/delete_context.php +++ /dev/null @@ -1,69 +0,0 @@ -/agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. Please see - * {@see ContextsClient::contextName()} for help formatting this field. - */ -function delete_context_sample(string $formattedName): void -{ - // Create a client. - $contextsClient = new ContextsClient(); - - // Call the API and handle any network failures. - try { - $contextsClient->deleteContext($formattedName); - 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 = ContextsClient::contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); - - delete_context_sample($formattedName); -} -// [END dialogflow_v2_generated_Contexts_DeleteContext_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_context.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_context.php deleted file mode 100644 index 327dd437a96f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_context.php +++ /dev/null @@ -1,71 +0,0 @@ -/agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. Please see - * {@see ContextsClient::contextName()} for help formatting this field. - */ -function get_context_sample(string $formattedName): void -{ - // Create a client. - $contextsClient = new ContextsClient(); - - // Call the API and handle any network failures. - try { - /** @var Context $response */ - $response = $contextsClient->getContext($formattedName); - 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 = ContextsClient::contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); - - get_context_sample($formattedName); -} -// [END dialogflow_v2_generated_Contexts_GetContext_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_location.php deleted file mode 100644 index 1e34a3e5b84b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Contexts_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_contexts.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_contexts.php deleted file mode 100644 index 156c35a9edf3..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_contexts.php +++ /dev/null @@ -1,76 +0,0 @@ -/agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. Please see - * {@see ContextsClient::sessionName()} for help formatting this field. - */ -function list_contexts_sample(string $formattedParent): void -{ - // Create a client. - $contextsClient = new ContextsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $contextsClient->listContexts($formattedParent); - - /** @var Context $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 = ContextsClient::sessionName('[PROJECT]', '[SESSION]'); - - list_contexts_sample($formattedParent); -} -// [END dialogflow_v2_generated_Contexts_ListContexts_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_locations.php deleted file mode 100644 index b0269323ae6f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Contexts_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/update_context.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/update_context.php deleted file mode 100644 index 02496e0818b3..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ContextsClient/update_context.php +++ /dev/null @@ -1,85 +0,0 @@ -/agent/sessions//contexts/`, - * or `projects//agent/environments//users//sessions//contexts/`. - * - * The `Context ID` is always converted to lowercase, may only contain - * characters in a-zA-Z0-9_-% and may be at most 250 bytes long. - * - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * The following context names are reserved for internal use by Dialogflow. - * You should not use these contexts or create contexts with these names: - * - * * `__system_counters__` - * * `*_id_dialog_context` - * * `*_dialog_params_size` - */ -function update_context_sample(string $contextName): void -{ - // Create a client. - $contextsClient = new ContextsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $context = (new Context()) - ->setName($contextName); - - // Call the API and handle any network failures. - try { - /** @var Context $response */ - $response = $contextsClient->updateContext($context); - 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 -{ - $contextName = '[NAME]'; - - update_context_sample($contextName); -} -// [END dialogflow_v2_generated_Contexts_UpdateContext_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php deleted file mode 100644 index bd0bf6bf824c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/create_conversation_dataset.php +++ /dev/null @@ -1,95 +0,0 @@ -/locations/` - * @param string $conversationDatasetDisplayName The display name of the dataset. Maximum of 64 bytes. - */ -function create_conversation_dataset_sample( - string $parent, - string $conversationDatasetDisplayName -): void { - // Create a client. - $conversationDatasetsClient = new ConversationDatasetsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $conversationDataset = (new ConversationDataset()) - ->setDisplayName($conversationDatasetDisplayName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationDatasetsClient->createConversationDataset($parent, $conversationDataset); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConversationDataset $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 -{ - $parent = '[PARENT]'; - $conversationDatasetDisplayName = '[DISPLAY_NAME]'; - - create_conversation_dataset_sample($parent, $conversationDatasetDisplayName); -} -// [END dialogflow_v2_generated_ConversationDatasets_CreateConversationDataset_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php deleted file mode 100644 index a7ca14130f04..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/delete_conversation_dataset.php +++ /dev/null @@ -1,90 +0,0 @@ -/locations//conversationDatasets/` - * Please see {@see ConversationDatasetsClient::conversationDatasetName()} for help formatting this field. - */ -function delete_conversation_dataset_sample(string $formattedName): void -{ - // Create a client. - $conversationDatasetsClient = new ConversationDatasetsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationDatasetsClient->deleteConversationDataset($formattedName); - $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 = ConversationDatasetsClient::conversationDatasetName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION_DATASET]' - ); - - delete_conversation_dataset_sample($formattedName); -} -// [END dialogflow_v2_generated_ConversationDatasets_DeleteConversationDataset_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_conversation_dataset.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_conversation_dataset.php deleted file mode 100644 index 23594786b5bc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_conversation_dataset.php +++ /dev/null @@ -1,72 +0,0 @@ -/locations//conversationDatasets/` - * Please see {@see ConversationDatasetsClient::conversationDatasetName()} for help formatting this field. - */ -function get_conversation_dataset_sample(string $formattedName): void -{ - // Create a client. - $conversationDatasetsClient = new ConversationDatasetsClient(); - - // Call the API and handle any network failures. - try { - /** @var ConversationDataset $response */ - $response = $conversationDatasetsClient->getConversationDataset($formattedName); - 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 = ConversationDatasetsClient::conversationDatasetName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION_DATASET]' - ); - - get_conversation_dataset_sample($formattedName); -} -// [END dialogflow_v2_generated_ConversationDatasets_GetConversationDataset_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_location.php deleted file mode 100644 index 7ae630003275..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_ConversationDatasets_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/import_conversation_data.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/import_conversation_data.php deleted file mode 100644 index 34195388d043..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/import_conversation_data.php +++ /dev/null @@ -1,99 +0,0 @@ -/locations//conversationDatasets/` - * Please see {@see ConversationDatasetsClient::conversationDatasetName()} for help formatting this field. - */ -function import_conversation_data_sample(string $formattedName): void -{ - // Create a client. - $conversationDatasetsClient = new ConversationDatasetsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $inputConfig = new InputConfig(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationDatasetsClient->importConversationData($formattedName, $inputConfig); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportConversationDataOperationResponse $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 = ConversationDatasetsClient::conversationDatasetName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION_DATASET]' - ); - - import_conversation_data_sample($formattedName); -} -// [END dialogflow_v2_generated_ConversationDatasets_ImportConversationData_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_conversation_datasets.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_conversation_datasets.php deleted file mode 100644 index 94496edfd14a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_conversation_datasets.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations/` - * Please see {@see ConversationDatasetsClient::locationName()} for help formatting this field. - */ -function list_conversation_datasets_sample(string $formattedParent): void -{ - // Create a client. - $conversationDatasetsClient = new ConversationDatasetsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $conversationDatasetsClient->listConversationDatasets($formattedParent); - - /** @var ConversationDataset $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 = ConversationDatasetsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_conversation_datasets_sample($formattedParent); -} -// [END dialogflow_v2_generated_ConversationDatasets_ListConversationDatasets_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_locations.php deleted file mode 100644 index 8eed2dab7c09..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationDatasetsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_ConversationDatasets_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model.php deleted file mode 100644 index d860bc74438f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model.php +++ /dev/null @@ -1,109 +0,0 @@ -/locations//conversationDatasets/` - * Please see {@see ConversationModelsClient::conversationDatasetName()} for help formatting this field. - */ -function create_conversation_model_sample( - string $conversationModelDisplayName, - string $formattedConversationModelDatasetsDataset -): void { - // Create a client. - $conversationModelsClient = new ConversationModelsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $inputDataset = (new InputDataset()) - ->setDataset($formattedConversationModelDatasetsDataset); - $conversationModelDatasets = [$inputDataset,]; - $conversationModel = (new ConversationModel()) - ->setDisplayName($conversationModelDisplayName) - ->setDatasets($conversationModelDatasets); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationModelsClient->createConversationModel($conversationModel); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConversationModel $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 -{ - $conversationModelDisplayName = '[DISPLAY_NAME]'; - $formattedConversationModelDatasetsDataset = ConversationModelsClient::conversationDatasetName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION_DATASET]' - ); - - create_conversation_model_sample( - $conversationModelDisplayName, - $formattedConversationModelDatasetsDataset - ); -} -// [END dialogflow_v2_generated_ConversationModels_CreateConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model_evaluation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model_evaluation.php deleted file mode 100644 index 01fa5edadfaf..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/create_conversation_model_evaluation.php +++ /dev/null @@ -1,90 +0,0 @@ -/locations//conversationModels/` - * Please see {@see ConversationModelsClient::conversationModelName()} for help formatting this field. - */ -function create_conversation_model_evaluation_sample(string $formattedParent): void -{ - // Create a client. - $conversationModelsClient = new ConversationModelsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $conversationModelEvaluation = new ConversationModelEvaluation(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationModelsClient->createConversationModelEvaluation( - $formattedParent, - $conversationModelEvaluation - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConversationModelEvaluation $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 = ConversationModelsClient::conversationModelName( - '[PROJECT]', - '[LOCATION]', - '[CONVERSATION_MODEL]' - ); - - create_conversation_model_evaluation_sample($formattedParent); -} -// [END dialogflow_v2_generated_ConversationModels_CreateConversationModelEvaluation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/delete_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/delete_conversation_model.php deleted file mode 100644 index e7bf8d38290c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/delete_conversation_model.php +++ /dev/null @@ -1,84 +0,0 @@ -/conversationModels/` - */ -function delete_conversation_model_sample(string $name): void -{ - // Create a client. - $conversationModelsClient = new ConversationModelsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationModelsClient->deleteConversationModel($name); - $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 -{ - $name = '[NAME]'; - - delete_conversation_model_sample($name); -} -// [END dialogflow_v2_generated_ConversationModels_DeleteConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/deploy_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/deploy_conversation_model.php deleted file mode 100644 index 953c43c9be97..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/deploy_conversation_model.php +++ /dev/null @@ -1,87 +0,0 @@ -/conversationModels/` - */ -function deploy_conversation_model_sample(string $name): void -{ - // Create a client. - $conversationModelsClient = new ConversationModelsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationModelsClient->deployConversationModel($name); - $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 -{ - $name = '[NAME]'; - - deploy_conversation_model_sample($name); -} -// [END dialogflow_v2_generated_ConversationModels_DeployConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model.php deleted file mode 100644 index 7e452efa6591..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model.php +++ /dev/null @@ -1,66 +0,0 @@ -/conversationModels/` - */ -function get_conversation_model_sample(string $name): void -{ - // Create a client. - $conversationModelsClient = new ConversationModelsClient(); - - // Call the API and handle any network failures. - try { - /** @var ConversationModel $response */ - $response = $conversationModelsClient->getConversationModel($name); - 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 -{ - $name = '[NAME]'; - - get_conversation_model_sample($name); -} -// [END dialogflow_v2_generated_ConversationModels_GetConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model_evaluation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model_evaluation.php deleted file mode 100644 index 76b76eb683e4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_conversation_model_evaluation.php +++ /dev/null @@ -1,67 +0,0 @@ -/conversationModels//evaluations/` - */ -function get_conversation_model_evaluation_sample(string $name): void -{ - // Create a client. - $conversationModelsClient = new ConversationModelsClient(); - - // Call the API and handle any network failures. - try { - /** @var ConversationModelEvaluation $response */ - $response = $conversationModelsClient->getConversationModelEvaluation($name); - 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 -{ - $name = '[NAME]'; - - get_conversation_model_evaluation_sample($name); -} -// [END dialogflow_v2_generated_ConversationModels_GetConversationModelEvaluation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_location.php deleted file mode 100644 index c1cbdff88eef..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_ConversationModels_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_model_evaluations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_model_evaluations.php deleted file mode 100644 index 7339240d4d43..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_model_evaluations.php +++ /dev/null @@ -1,71 +0,0 @@ -/conversationModels/` - */ -function list_conversation_model_evaluations_sample(string $parent): void -{ - // Create a client. - $conversationModelsClient = new ConversationModelsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $conversationModelsClient->listConversationModelEvaluations($parent); - - /** @var ConversationModelEvaluation $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 -{ - $parent = '[PARENT]'; - - list_conversation_model_evaluations_sample($parent); -} -// [END dialogflow_v2_generated_ConversationModels_ListConversationModelEvaluations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_models.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_models.php deleted file mode 100644 index 06886c759433..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_conversation_models.php +++ /dev/null @@ -1,71 +0,0 @@ -` - */ -function list_conversation_models_sample(string $parent): void -{ - // Create a client. - $conversationModelsClient = new ConversationModelsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $conversationModelsClient->listConversationModels($parent); - - /** @var ConversationModel $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 -{ - $parent = '[PARENT]'; - - list_conversation_models_sample($parent); -} -// [END dialogflow_v2_generated_ConversationModels_ListConversationModels_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_locations.php deleted file mode 100644 index 6366d82ab9d6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_ConversationModels_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/undeploy_conversation_model.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/undeploy_conversation_model.php deleted file mode 100644 index 46282f73ea7f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationModelsClient/undeploy_conversation_model.php +++ /dev/null @@ -1,87 +0,0 @@ -/conversationModels/` - */ -function undeploy_conversation_model_sample(string $name): void -{ - // Create a client. - $conversationModelsClient = new ConversationModelsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationModelsClient->undeployConversationModel($name); - $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 -{ - $name = '[NAME]'; - - undeploy_conversation_model_sample($name); -} -// [END dialogflow_v2_generated_ConversationModels_UndeployConversationModel_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php deleted file mode 100644 index f1acaafdca1b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/clear_suggestion_feature_config.php +++ /dev/null @@ -1,107 +0,0 @@ -/locations//conversationProfiles/`. - * @param int $participantRole The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * @param int $suggestionFeatureType The type of the suggestion feature to remove. - */ -function clear_suggestion_feature_config_sample( - string $conversationProfile, - int $participantRole, - int $suggestionFeatureType -): void { - // Create a client. - $conversationProfilesClient = new ConversationProfilesClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationProfilesClient->clearSuggestionFeatureConfig( - $conversationProfile, - $participantRole, - $suggestionFeatureType - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConversationProfile $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 -{ - $conversationProfile = '[CONVERSATION_PROFILE]'; - $participantRole = Role::ROLE_UNSPECIFIED; - $suggestionFeatureType = Type::TYPE_UNSPECIFIED; - - clear_suggestion_feature_config_sample( - $conversationProfile, - $participantRole, - $suggestionFeatureType - ); -} -// [END dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/create_conversation_profile.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/create_conversation_profile.php deleted file mode 100644 index 35bf9f51a8d9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/create_conversation_profile.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations/`. Please see - * {@see ConversationProfilesClient::projectName()} for help formatting this field. - * @param string $conversationProfileDisplayName Human readable name for this profile. Max length 1024 bytes. - */ -function create_conversation_profile_sample( - string $formattedParent, - string $conversationProfileDisplayName -): void { - // Create a client. - $conversationProfilesClient = new ConversationProfilesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $conversationProfile = (new ConversationProfile()) - ->setDisplayName($conversationProfileDisplayName); - - // Call the API and handle any network failures. - try { - /** @var ConversationProfile $response */ - $response = $conversationProfilesClient->createConversationProfile( - $formattedParent, - $conversationProfile - ); - 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 = ConversationProfilesClient::projectName('[PROJECT]'); - $conversationProfileDisplayName = '[DISPLAY_NAME]'; - - create_conversation_profile_sample($formattedParent, $conversationProfileDisplayName); -} -// [END dialogflow_v2_generated_ConversationProfiles_CreateConversationProfile_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/delete_conversation_profile.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/delete_conversation_profile.php deleted file mode 100644 index 43eaedb46d5b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/delete_conversation_profile.php +++ /dev/null @@ -1,69 +0,0 @@ -/locations//conversationProfiles/`. Please see - * {@see ConversationProfilesClient::conversationProfileName()} for help formatting this field. - */ -function delete_conversation_profile_sample(string $formattedName): void -{ - // Create a client. - $conversationProfilesClient = new ConversationProfilesClient(); - - // Call the API and handle any network failures. - try { - $conversationProfilesClient->deleteConversationProfile($formattedName); - 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 = ConversationProfilesClient::conversationProfileName( - '[PROJECT]', - '[CONVERSATION_PROFILE]' - ); - - delete_conversation_profile_sample($formattedName); -} -// [END dialogflow_v2_generated_ConversationProfiles_DeleteConversationProfile_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_conversation_profile.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_conversation_profile.php deleted file mode 100644 index 9b041dbbd200..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_conversation_profile.php +++ /dev/null @@ -1,71 +0,0 @@ -/locations//conversationProfiles/`. Please see - * {@see ConversationProfilesClient::conversationProfileName()} for help formatting this field. - */ -function get_conversation_profile_sample(string $formattedName): void -{ - // Create a client. - $conversationProfilesClient = new ConversationProfilesClient(); - - // Call the API and handle any network failures. - try { - /** @var ConversationProfile $response */ - $response = $conversationProfilesClient->getConversationProfile($formattedName); - 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 = ConversationProfilesClient::conversationProfileName( - '[PROJECT]', - '[CONVERSATION_PROFILE]' - ); - - get_conversation_profile_sample($formattedName); -} -// [END dialogflow_v2_generated_ConversationProfiles_GetConversationProfile_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_location.php deleted file mode 100644 index 8a45817c9f46..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_ConversationProfiles_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_conversation_profiles.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_conversation_profiles.php deleted file mode 100644 index 8ca68b838171..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_conversation_profiles.php +++ /dev/null @@ -1,72 +0,0 @@ -/locations/`. Please see - * {@see ConversationProfilesClient::projectName()} for help formatting this field. - */ -function list_conversation_profiles_sample(string $formattedParent): void -{ - // Create a client. - $conversationProfilesClient = new ConversationProfilesClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $conversationProfilesClient->listConversationProfiles($formattedParent); - - /** @var ConversationProfile $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 = ConversationProfilesClient::projectName('[PROJECT]'); - - list_conversation_profiles_sample($formattedParent); -} -// [END dialogflow_v2_generated_ConversationProfiles_ListConversationProfiles_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_locations.php deleted file mode 100644 index 148aeddbe4fa..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_ConversationProfiles_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php deleted file mode 100644 index d0d3c9d38e9e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/set_suggestion_feature_config.php +++ /dev/null @@ -1,110 +0,0 @@ -/locations//conversationProfiles/`. - * @param int $participantRole The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - */ -function set_suggestion_feature_config_sample( - string $conversationProfile, - int $participantRole -): void { - // Create a client. - $conversationProfilesClient = new ConversationProfilesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $suggestionFeatureConfig = new SuggestionFeatureConfig(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $conversationProfilesClient->setSuggestionFeatureConfig( - $conversationProfile, - $participantRole, - $suggestionFeatureConfig - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConversationProfile $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 -{ - $conversationProfile = '[CONVERSATION_PROFILE]'; - $participantRole = Role::ROLE_UNSPECIFIED; - - set_suggestion_feature_config_sample($conversationProfile, $participantRole); -} -// [END dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/update_conversation_profile.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/update_conversation_profile.php deleted file mode 100644 index b26048c43bfb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationProfilesClient/update_conversation_profile.php +++ /dev/null @@ -1,79 +0,0 @@ -setDisplayName($conversationProfileDisplayName); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var ConversationProfile $response */ - $response = $conversationProfilesClient->updateConversationProfile( - $conversationProfile, - $updateMask - ); - 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 -{ - $conversationProfileDisplayName = '[DISPLAY_NAME]'; - - update_conversation_profile_sample($conversationProfileDisplayName); -} -// [END dialogflow_v2_generated_ConversationProfiles_UpdateConversationProfile_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/complete_conversation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/complete_conversation.php deleted file mode 100644 index 21bae124175b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/complete_conversation.php +++ /dev/null @@ -1,69 +0,0 @@ -/locations//conversations/`. Please see - * {@see ConversationsClient::conversationName()} for help formatting this field. - */ -function complete_conversation_sample(string $formattedName): void -{ - // Create a client. - $conversationsClient = new ConversationsClient(); - - // Call the API and handle any network failures. - try { - /** @var Conversation $response */ - $response = $conversationsClient->completeConversation($formattedName); - 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 = ConversationsClient::conversationName('[PROJECT]', '[CONVERSATION]'); - - complete_conversation_sample($formattedName); -} -// [END dialogflow_v2_generated_Conversations_CompleteConversation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/create_conversation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/create_conversation.php deleted file mode 100644 index 0058b3844d75..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/create_conversation.php +++ /dev/null @@ -1,102 +0,0 @@ -/locations/`. Please see - * {@see ConversationsClient::projectName()} for help formatting this field. - * @param string $formattedConversationConversationProfile The Conversation Profile to be used to configure this - * Conversation. This field cannot be updated. - * Format: `projects//locations//conversationProfiles/`. Please see - * {@see ConversationsClient::conversationProfileName()} for help formatting this field. - */ -function create_conversation_sample( - string $formattedParent, - string $formattedConversationConversationProfile -): void { - // Create a client. - $conversationsClient = new ConversationsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $conversation = (new Conversation()) - ->setConversationProfile($formattedConversationConversationProfile); - - // Call the API and handle any network failures. - try { - /** @var Conversation $response */ - $response = $conversationsClient->createConversation($formattedParent, $conversation); - 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 = ConversationsClient::projectName('[PROJECT]'); - $formattedConversationConversationProfile = ConversationsClient::conversationProfileName( - '[PROJECT]', - '[CONVERSATION_PROFILE]' - ); - - create_conversation_sample($formattedParent, $formattedConversationConversationProfile); -} -// [END dialogflow_v2_generated_Conversations_CreateConversation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_conversation.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_conversation.php deleted file mode 100644 index b2b22f9c1260..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_conversation.php +++ /dev/null @@ -1,68 +0,0 @@ -/locations//conversations/`. Please see - * {@see ConversationsClient::conversationName()} for help formatting this field. - */ -function get_conversation_sample(string $formattedName): void -{ - // Create a client. - $conversationsClient = new ConversationsClient(); - - // Call the API and handle any network failures. - try { - /** @var Conversation $response */ - $response = $conversationsClient->getConversation($formattedName); - 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 = ConversationsClient::conversationName('[PROJECT]', '[CONVERSATION]'); - - get_conversation_sample($formattedName); -} -// [END dialogflow_v2_generated_Conversations_GetConversation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_location.php deleted file mode 100644 index da5654088478..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Conversations_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_conversations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_conversations.php deleted file mode 100644 index 1a0a89e1d2f6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_conversations.php +++ /dev/null @@ -1,72 +0,0 @@ -/locations/`. Please see - * {@see ConversationsClient::projectName()} for help formatting this field. - */ -function list_conversations_sample(string $formattedParent): void -{ - // Create a client. - $conversationsClient = new ConversationsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $conversationsClient->listConversations($formattedParent); - - /** @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 = ConversationsClient::projectName('[PROJECT]'); - - list_conversations_sample($formattedParent); -} -// [END dialogflow_v2_generated_Conversations_ListConversations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_locations.php deleted file mode 100644 index 05a399ae5d23..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Conversations_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_messages.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_messages.php deleted file mode 100644 index 844f41f4bf32..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ConversationsClient/list_messages.php +++ /dev/null @@ -1,77 +0,0 @@ - - * [first item's create_time of previous request]` and empty page_token. - * - * @param string $formattedParent The name of the conversation to list messages for. - * Format: `projects//locations//conversations/` - * Please see {@see ConversationsClient::conversationName()} for help formatting this field. - */ -function list_messages_sample(string $formattedParent): void -{ - // Create a client. - $conversationsClient = new ConversationsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $conversationsClient->listMessages($formattedParent); - - /** @var Message $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 = ConversationsClient::conversationName('[PROJECT]', '[CONVERSATION]'); - - list_messages_sample($formattedParent); -} -// [END dialogflow_v2_generated_Conversations_ListMessages_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/create_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/create_document.php deleted file mode 100644 index 87db832c0b28..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/create_document.php +++ /dev/null @@ -1,112 +0,0 @@ -/locations//knowledgeBases/`. Please see - * {@see DocumentsClient::knowledgeBaseName()} for help formatting this field. - * @param string $documentDisplayName The display name of the document. The name must be 1024 bytes or - * less; otherwise, the creation request fails. - * @param string $documentMimeType The MIME type of this document. - * @param int $documentKnowledgeTypesElement The knowledge type of document content. - */ -function create_document_sample( - string $formattedParent, - string $documentDisplayName, - string $documentMimeType, - int $documentKnowledgeTypesElement -): void { - // Create a client. - $documentsClient = new DocumentsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $documentKnowledgeTypes = [$documentKnowledgeTypesElement,]; - $document = (new Document()) - ->setDisplayName($documentDisplayName) - ->setMimeType($documentMimeType) - ->setKnowledgeTypes($documentKnowledgeTypes); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentsClient->createDocument($formattedParent, $document); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Document $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 = DocumentsClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - $documentDisplayName = '[DISPLAY_NAME]'; - $documentMimeType = '[MIME_TYPE]'; - $documentKnowledgeTypesElement = KnowledgeType::KNOWLEDGE_TYPE_UNSPECIFIED; - - create_document_sample( - $formattedParent, - $documentDisplayName, - $documentMimeType, - $documentKnowledgeTypesElement - ); -} -// [END dialogflow_v2_generated_Documents_CreateDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/delete_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/delete_document.php deleted file mode 100644 index c9ea62d3ec8e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/delete_document.php +++ /dev/null @@ -1,86 +0,0 @@ -/locations//knowledgeBases//documents/`. Please see - * {@see DocumentsClient::documentName()} for help formatting this field. - */ -function delete_document_sample(string $formattedName): void -{ - // Create a client. - $documentsClient = new DocumentsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentsClient->deleteDocument($formattedName); - $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 = DocumentsClient::documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - - delete_document_sample($formattedName); -} -// [END dialogflow_v2_generated_Documents_DeleteDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/export_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/export_document.php deleted file mode 100644 index b13f17f549c2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/export_document.php +++ /dev/null @@ -1,89 +0,0 @@ -/locations//knowledgeBases//documents/`. Please see - * {@see DocumentsClient::documentName()} for help formatting this field. - */ -function export_document_sample(string $formattedName): void -{ - // Create a client. - $documentsClient = new DocumentsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentsClient->exportDocument($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Document $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 = DocumentsClient::documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - - export_document_sample($formattedName); -} -// [END dialogflow_v2_generated_Documents_ExportDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_document.php deleted file mode 100644 index b121f8bf3e81..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_document.php +++ /dev/null @@ -1,68 +0,0 @@ -/locations//knowledgeBases//documents/`. Please see - * {@see DocumentsClient::documentName()} for help formatting this field. - */ -function get_document_sample(string $formattedName): void -{ - // Create a client. - $documentsClient = new DocumentsClient(); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $documentsClient->getDocument($formattedName); - 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 = DocumentsClient::documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - - get_document_sample($formattedName); -} -// [END dialogflow_v2_generated_Documents_GetDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_location.php deleted file mode 100644 index 88fc99f2603a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Documents_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/import_documents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/import_documents.php deleted file mode 100644 index 70de52c51255..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/import_documents.php +++ /dev/null @@ -1,110 +0,0 @@ -/locations//knowledgeBases/`. Please see - * {@see DocumentsClient::knowledgeBaseName()} for help formatting this field. - * @param string $documentTemplateMimeType The MIME type of the document. - * @param int $documentTemplateKnowledgeTypesElement The knowledge type of document content. - */ -function import_documents_sample( - string $formattedParent, - string $documentTemplateMimeType, - int $documentTemplateKnowledgeTypesElement -): void { - // Create a client. - $documentsClient = new DocumentsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $documentTemplateKnowledgeTypes = [$documentTemplateKnowledgeTypesElement,]; - $documentTemplate = (new ImportDocumentTemplate()) - ->setMimeType($documentTemplateMimeType) - ->setKnowledgeTypes($documentTemplateKnowledgeTypes); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentsClient->importDocuments($formattedParent, $documentTemplate); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportDocumentsResponse $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 = DocumentsClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - $documentTemplateMimeType = '[MIME_TYPE]'; - $documentTemplateKnowledgeTypesElement = KnowledgeType::KNOWLEDGE_TYPE_UNSPECIFIED; - - import_documents_sample( - $formattedParent, - $documentTemplateMimeType, - $documentTemplateKnowledgeTypesElement - ); -} -// [END dialogflow_v2_generated_Documents_ImportDocuments_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_documents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_documents.php deleted file mode 100644 index 17f89159977c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_documents.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//knowledgeBases/`. Please see - * {@see DocumentsClient::knowledgeBaseName()} for help formatting this field. - */ -function list_documents_sample(string $formattedParent): void -{ - // Create a client. - $documentsClient = new DocumentsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $documentsClient->listDocuments($formattedParent); - - /** @var Document $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 = DocumentsClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - - list_documents_sample($formattedParent); -} -// [END dialogflow_v2_generated_Documents_ListDocuments_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_locations.php deleted file mode 100644 index 880cffa907ee..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Documents_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/reload_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/reload_document.php deleted file mode 100644 index e99ac519bddc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/reload_document.php +++ /dev/null @@ -1,94 +0,0 @@ -/locations//knowledgeBases//documents/` - * Please see {@see DocumentsClient::documentName()} for help formatting this field. - */ -function reload_document_sample(string $formattedName): void -{ - // Create a client. - $documentsClient = new DocumentsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentsClient->reloadDocument($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Document $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 = DocumentsClient::documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - - reload_document_sample($formattedName); -} -// [END dialogflow_v2_generated_Documents_ReloadDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/update_document.php b/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/update_document.php deleted file mode 100644 index 931a71194e3f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/DocumentsClient/update_document.php +++ /dev/null @@ -1,101 +0,0 @@ -setDisplayName($documentDisplayName) - ->setMimeType($documentMimeType) - ->setKnowledgeTypes($documentKnowledgeTypes); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentsClient->updateDocument($document); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Document $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 -{ - $documentDisplayName = '[DISPLAY_NAME]'; - $documentMimeType = '[MIME_TYPE]'; - $documentKnowledgeTypesElement = KnowledgeType::KNOWLEDGE_TYPE_UNSPECIFIED; - - update_document_sample($documentDisplayName, $documentMimeType, $documentKnowledgeTypesElement); -} -// [END dialogflow_v2_generated_Documents_UpdateDocument_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_create_entities.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_create_entities.php deleted file mode 100644 index 09b5645c2a02..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_create_entities.php +++ /dev/null @@ -1,121 +0,0 @@ -/agent/entityTypes/`. Please see - * {@see EntityTypesClient::entityTypeName()} for help formatting this field. - * @param string $entitiesValue The primary value associated with this entity entry. - * For example, if the entity type is *vegetable*, the value could be - * *scallions*. - * - * For `KIND_MAP` entity types: - * - * * A reference value to be used in place of synonyms. - * - * For `KIND_LIST` entity types: - * - * * A string that can contain references to other entity types (with or - * without aliases). - * @param string $entitiesSynonymsElement A collection of value synonyms. For example, if the entity type - * is *vegetable*, and `value` is *scallions*, a synonym could be *green - * onions*. - * - * For `KIND_LIST` entity types: - * - * * This collection must contain exactly one synonym equal to `value`. - */ -function batch_create_entities_sample( - string $formattedParent, - string $entitiesValue, - string $entitiesSynonymsElement -): void { - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $entitiesSynonyms = [$entitiesSynonymsElement,]; - $entity = (new Entity()) - ->setValue($entitiesValue) - ->setSynonyms($entitiesSynonyms); - $entities = [$entity,]; - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $entityTypesClient->batchCreateEntities($formattedParent, $entities); - $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 -{ - $formattedParent = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $entitiesValue = '[VALUE]'; - $entitiesSynonymsElement = '[SYNONYMS]'; - - batch_create_entities_sample($formattedParent, $entitiesValue, $entitiesSynonymsElement); -} -// [END dialogflow_v2_generated_EntityTypes_BatchCreateEntities_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entities.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entities.php deleted file mode 100644 index cf7d4a263026..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entities.php +++ /dev/null @@ -1,96 +0,0 @@ -/agent/entityTypes/`. Please see - * {@see EntityTypesClient::entityTypeName()} for help formatting this field. - * @param string $entityValuesElement The reference `values` of the entities to delete. Note that - * these are not fully-qualified names, i.e. they don't start with - * `projects/`. - */ -function batch_delete_entities_sample(string $formattedParent, string $entityValuesElement): void -{ - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $entityValues = [$entityValuesElement,]; - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $entityTypesClient->batchDeleteEntities($formattedParent, $entityValues); - $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 -{ - $formattedParent = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $entityValuesElement = '[ENTITY_VALUES]'; - - batch_delete_entities_sample($formattedParent, $entityValuesElement); -} -// [END dialogflow_v2_generated_EntityTypes_BatchDeleteEntities_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entity_types.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entity_types.php deleted file mode 100644 index 6e8a38460aa6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_delete_entity_types.php +++ /dev/null @@ -1,97 +0,0 @@ -/agent`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - * @param string $entityTypeNamesElement The names entity types to delete. All names must point to the - * same agent as `parent`. - */ -function batch_delete_entity_types_sample( - string $formattedParent, - string $entityTypeNamesElement -): void { - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $entityTypeNames = [$entityTypeNamesElement,]; - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $entityTypesClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); - $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 -{ - $formattedParent = EntityTypesClient::agentName('[PROJECT]'); - $entityTypeNamesElement = '[ENTITY_TYPE_NAMES]'; - - batch_delete_entity_types_sample($formattedParent, $entityTypeNamesElement); -} -// [END dialogflow_v2_generated_EntityTypes_BatchDeleteEntityTypes_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entities.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entities.php deleted file mode 100644 index 4322ae722973..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entities.php +++ /dev/null @@ -1,124 +0,0 @@ -/agent/entityTypes/`. Please see - * {@see EntityTypesClient::entityTypeName()} for help formatting this field. - * @param string $entitiesValue The primary value associated with this entity entry. - * For example, if the entity type is *vegetable*, the value could be - * *scallions*. - * - * For `KIND_MAP` entity types: - * - * * A reference value to be used in place of synonyms. - * - * For `KIND_LIST` entity types: - * - * * A string that can contain references to other entity types (with or - * without aliases). - * @param string $entitiesSynonymsElement A collection of value synonyms. For example, if the entity type - * is *vegetable*, and `value` is *scallions*, a synonym could be *green - * onions*. - * - * For `KIND_LIST` entity types: - * - * * This collection must contain exactly one synonym equal to `value`. - */ -function batch_update_entities_sample( - string $formattedParent, - string $entitiesValue, - string $entitiesSynonymsElement -): void { - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $entitiesSynonyms = [$entitiesSynonymsElement,]; - $entity = (new Entity()) - ->setValue($entitiesValue) - ->setSynonyms($entitiesSynonyms); - $entities = [$entity,]; - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $entityTypesClient->batchUpdateEntities($formattedParent, $entities); - $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 -{ - $formattedParent = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $entitiesValue = '[VALUE]'; - $entitiesSynonymsElement = '[SYNONYMS]'; - - batch_update_entities_sample($formattedParent, $entitiesValue, $entitiesSynonymsElement); -} -// [END dialogflow_v2_generated_EntityTypes_BatchUpdateEntities_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entity_types.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entity_types.php deleted file mode 100644 index 232403a7967d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/batch_update_entity_types.php +++ /dev/null @@ -1,92 +0,0 @@ -/agent`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - */ -function batch_update_entity_types_sample(string $formattedParent): void -{ - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $entityTypesClient->batchUpdateEntityTypes($formattedParent); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchUpdateEntityTypesResponse $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 = EntityTypesClient::agentName('[PROJECT]'); - - batch_update_entity_types_sample($formattedParent); -} -// [END dialogflow_v2_generated_EntityTypes_BatchUpdateEntityTypes_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/create_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/create_entity_type.php deleted file mode 100644 index dc4cce6aa718..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/create_entity_type.php +++ /dev/null @@ -1,84 +0,0 @@ -/agent`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - * @param string $entityTypeDisplayName The name of the entity type. - * @param int $entityTypeKind Indicates the kind of entity type. - */ -function create_entity_type_sample( - string $formattedParent, - string $entityTypeDisplayName, - int $entityTypeKind -): void { - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $entityType = (new EntityType()) - ->setDisplayName($entityTypeDisplayName) - ->setKind($entityTypeKind); - - // Call the API and handle any network failures. - try { - /** @var EntityType $response */ - $response = $entityTypesClient->createEntityType($formattedParent, $entityType); - 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 = EntityTypesClient::agentName('[PROJECT]'); - $entityTypeDisplayName = '[DISPLAY_NAME]'; - $entityTypeKind = Kind::KIND_UNSPECIFIED; - - create_entity_type_sample($formattedParent, $entityTypeDisplayName, $entityTypeKind); -} -// [END dialogflow_v2_generated_EntityTypes_CreateEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/delete_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/delete_entity_type.php deleted file mode 100644 index 5748edf82816..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/delete_entity_type.php +++ /dev/null @@ -1,69 +0,0 @@ -/agent/entityTypes/`. Please see - * {@see EntityTypesClient::entityTypeName()} for help formatting this field. - */ -function delete_entity_type_sample(string $formattedName): void -{ - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Call the API and handle any network failures. - try { - $entityTypesClient->deleteEntityType($formattedName); - 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 = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - - delete_entity_type_sample($formattedName); -} -// [END dialogflow_v2_generated_EntityTypes_DeleteEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_entity_type.php deleted file mode 100644 index b685238b0d6d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_entity_type.php +++ /dev/null @@ -1,67 +0,0 @@ -/agent/entityTypes/`. Please see - * {@see EntityTypesClient::entityTypeName()} for help formatting this field. - */ -function get_entity_type_sample(string $formattedName): void -{ - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Call the API and handle any network failures. - try { - /** @var EntityType $response */ - $response = $entityTypesClient->getEntityType($formattedName); - 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 = EntityTypesClient::entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - - get_entity_type_sample($formattedName); -} -// [END dialogflow_v2_generated_EntityTypes_GetEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_location.php deleted file mode 100644 index 51363603853e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_EntityTypes_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_entity_types.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_entity_types.php deleted file mode 100644 index f15ab41a2438..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_entity_types.php +++ /dev/null @@ -1,72 +0,0 @@ -/agent`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - */ -function list_entity_types_sample(string $formattedParent): void -{ - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $entityTypesClient->listEntityTypes($formattedParent); - - /** @var EntityType $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 = EntityTypesClient::agentName('[PROJECT]'); - - list_entity_types_sample($formattedParent); -} -// [END dialogflow_v2_generated_EntityTypes_ListEntityTypes_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_locations.php deleted file mode 100644 index bf04677e2266..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_EntityTypes_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/update_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/update_entity_type.php deleted file mode 100644 index 6a8325f6f610..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EntityTypesClient/update_entity_type.php +++ /dev/null @@ -1,77 +0,0 @@ -setDisplayName($entityTypeDisplayName) - ->setKind($entityTypeKind); - - // Call the API and handle any network failures. - try { - /** @var EntityType $response */ - $response = $entityTypesClient->updateEntityType($entityType); - 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 -{ - $entityTypeDisplayName = '[DISPLAY_NAME]'; - $entityTypeKind = Kind::KIND_UNSPECIFIED; - - update_entity_type_sample($entityTypeDisplayName, $entityTypeKind); -} -// [END dialogflow_v2_generated_EntityTypes_UpdateEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/create_environment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/create_environment.php deleted file mode 100644 index 380c9a53b612..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/create_environment.php +++ /dev/null @@ -1,75 +0,0 @@ -/agent` - * - `projects//locations//agent` - * Please see {@see EnvironmentsClient::agentName()} for help formatting this field. - * @param string $environmentId The unique id of the new environment. - */ -function create_environment_sample(string $formattedParent, string $environmentId): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $environment = new Environment(); - - // Call the API and handle any network failures. - try { - /** @var Environment $response */ - $response = $environmentsClient->createEnvironment($formattedParent, $environment, $environmentId); - 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 = EnvironmentsClient::agentName('[PROJECT]'); - $environmentId = '[ENVIRONMENT_ID]'; - - create_environment_sample($formattedParent, $environmentId); -} -// [END dialogflow_v2_generated_Environments_CreateEnvironment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/delete_environment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/delete_environment.php deleted file mode 100644 index d45813d8fbc0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/delete_environment.php +++ /dev/null @@ -1,71 +0,0 @@ -/agent/environments/` - * - `projects//locations//agent/environments/` - * - * The environment ID for the default environment is `-`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - */ -function delete_environment_sample(string $formattedName): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Call the API and handle any network failures. - try { - $environmentsClient->deleteEnvironment($formattedName); - 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 = EnvironmentsClient::environmentName('[PROJECT]', '[ENVIRONMENT]'); - - delete_environment_sample($formattedName); -} -// [END dialogflow_v2_generated_Environments_DeleteEnvironment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment.php deleted file mode 100644 index 3c4e7c3168fa..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment.php +++ /dev/null @@ -1,73 +0,0 @@ -/agent/environments/` - * - `projects//locations//agent/environments/` - * - * The environment ID for the default environment is `-`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - */ -function get_environment_sample(string $formattedName): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Call the API and handle any network failures. - try { - /** @var Environment $response */ - $response = $environmentsClient->getEnvironment($formattedName); - 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 = EnvironmentsClient::environmentName('[PROJECT]', '[ENVIRONMENT]'); - - get_environment_sample($formattedName); -} -// [END dialogflow_v2_generated_Environments_GetEnvironment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment_history.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment_history.php deleted file mode 100644 index c45844906edc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_environment_history.php +++ /dev/null @@ -1,78 +0,0 @@ -/agent/environments/` - * - `projects//locations//agent/environments/` - * - * The environment ID for the default environment is `-`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - */ -function get_environment_history_sample(string $formattedParent): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $environmentsClient->getEnvironmentHistory($formattedParent); - - /** @var Entry $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 = EnvironmentsClient::environmentName('[PROJECT]', '[ENVIRONMENT]'); - - get_environment_history_sample($formattedParent); -} -// [END dialogflow_v2_generated_Environments_GetEnvironmentHistory_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_location.php deleted file mode 100644 index 27b2a0f62e63..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Environments_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_environments.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_environments.php deleted file mode 100644 index 100b48c84eb0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_environments.php +++ /dev/null @@ -1,75 +0,0 @@ -/agent` - * - `projects//locations//agent` - * Please see {@see EnvironmentsClient::agentName()} for help formatting this field. - */ -function list_environments_sample(string $formattedParent): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $environmentsClient->listEnvironments($formattedParent); - - /** @var Environment $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 = EnvironmentsClient::agentName('[PROJECT]'); - - list_environments_sample($formattedParent); -} -// [END dialogflow_v2_generated_Environments_ListEnvironments_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_locations.php deleted file mode 100644 index 07d7be30e536..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Environments_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/update_environment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/update_environment.php deleted file mode 100644 index af5123c261bb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/EnvironmentsClient/update_environment.php +++ /dev/null @@ -1,69 +0,0 @@ -updateEnvironment($environment, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Environments_UpdateEnvironment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_fulfillment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_fulfillment.php deleted file mode 100644 index c9c592e7244a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_fulfillment.php +++ /dev/null @@ -1,67 +0,0 @@ -/agent/fulfillment`. Please see - * {@see FulfillmentsClient::fulfillmentName()} for help formatting this field. - */ -function get_fulfillment_sample(string $formattedName): void -{ - // Create a client. - $fulfillmentsClient = new FulfillmentsClient(); - - // Call the API and handle any network failures. - try { - /** @var Fulfillment $response */ - $response = $fulfillmentsClient->getFulfillment($formattedName); - 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 = FulfillmentsClient::fulfillmentName('[PROJECT]'); - - get_fulfillment_sample($formattedName); -} -// [END dialogflow_v2_generated_Fulfillments_GetFulfillment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_location.php deleted file mode 100644 index c146dfd4f52c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Fulfillments_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/list_locations.php deleted file mode 100644 index 808b1eff5ec9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Fulfillments_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/update_fulfillment.php b/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/update_fulfillment.php deleted file mode 100644 index c5d24f04f450..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/FulfillmentsClient/update_fulfillment.php +++ /dev/null @@ -1,77 +0,0 @@ -/agent/fulfillment` - * - `projects//locations//agent/fulfillment` - * - * This field is not used for Fulfillment in an Environment. - */ -function update_fulfillment_sample(string $fulfillmentName): void -{ - // Create a client. - $fulfillmentsClient = new FulfillmentsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $fulfillment = (new Fulfillment()) - ->setName($fulfillmentName); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var Fulfillment $response */ - $response = $fulfillmentsClient->updateFulfillment($fulfillment, $updateMask); - 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 -{ - $fulfillmentName = '[NAME]'; - - update_fulfillment_sample($fulfillmentName); -} -// [END dialogflow_v2_generated_Fulfillments_UpdateFulfillment_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_delete_intents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_delete_intents.php deleted file mode 100644 index 0709129cd8d1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_delete_intents.php +++ /dev/null @@ -1,97 +0,0 @@ -/agent`. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - * @param string $intentsDisplayName The name of this intent. - */ -function batch_delete_intents_sample(string $formattedParent, string $intentsDisplayName): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $intent = (new Intent()) - ->setDisplayName($intentsDisplayName); - $intents = [$intent,]; - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $intentsClient->batchDeleteIntents($formattedParent, $intents); - $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 -{ - $formattedParent = IntentsClient::agentName('[PROJECT]'); - $intentsDisplayName = '[DISPLAY_NAME]'; - - batch_delete_intents_sample($formattedParent, $intentsDisplayName); -} -// [END dialogflow_v2_generated_Intents_BatchDeleteIntents_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_update_intents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_update_intents.php deleted file mode 100644 index a9faa4b5d3a4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/batch_update_intents.php +++ /dev/null @@ -1,92 +0,0 @@ -/agent`. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - */ -function batch_update_intents_sample(string $formattedParent): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $intentsClient->batchUpdateIntents($formattedParent); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchUpdateIntentsResponse $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 = IntentsClient::agentName('[PROJECT]'); - - batch_update_intents_sample($formattedParent); -} -// [END dialogflow_v2_generated_Intents_BatchUpdateIntents_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/create_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/create_intent.php deleted file mode 100644 index 2307c22737e6..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/create_intent.php +++ /dev/null @@ -1,77 +0,0 @@ -/agent`. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - * @param string $intentDisplayName The name of this intent. - */ -function create_intent_sample(string $formattedParent, string $intentDisplayName): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $intent = (new Intent()) - ->setDisplayName($intentDisplayName); - - // Call the API and handle any network failures. - try { - /** @var Intent $response */ - $response = $intentsClient->createIntent($formattedParent, $intent); - 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 = IntentsClient::agentName('[PROJECT]'); - $intentDisplayName = '[DISPLAY_NAME]'; - - create_intent_sample($formattedParent, $intentDisplayName); -} -// [END dialogflow_v2_generated_Intents_CreateIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/delete_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/delete_intent.php deleted file mode 100644 index 4a3d19ec1f44..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/delete_intent.php +++ /dev/null @@ -1,70 +0,0 @@ -/agent/intents/`. Please see - * {@see IntentsClient::intentName()} for help formatting this field. - */ -function delete_intent_sample(string $formattedName): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Call the API and handle any network failures. - try { - $intentsClient->deleteIntent($formattedName); - 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 = IntentsClient::intentName('[PROJECT]', '[INTENT]'); - - delete_intent_sample($formattedName); -} -// [END dialogflow_v2_generated_Intents_DeleteIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_intent.php deleted file mode 100644 index e6e2fad64fc0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_intent.php +++ /dev/null @@ -1,67 +0,0 @@ -/agent/intents/`. Please see - * {@see IntentsClient::intentName()} for help formatting this field. - */ -function get_intent_sample(string $formattedName): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Call the API and handle any network failures. - try { - /** @var Intent $response */ - $response = $intentsClient->getIntent($formattedName); - 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 = IntentsClient::intentName('[PROJECT]', '[INTENT]'); - - get_intent_sample($formattedName); -} -// [END dialogflow_v2_generated_Intents_GetIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_location.php deleted file mode 100644 index 177e67b62277..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Intents_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_intents.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_intents.php deleted file mode 100644 index 770f91e1140f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_intents.php +++ /dev/null @@ -1,80 +0,0 @@ -/agent` or `projects//locations//agent`. - * - * Alternatively, you can specify the environment to list intents for. - * Format: `projects//agent/environments/` - * or `projects//locations//agent/environments/`. - * Note: training phrases of the intents will not be returned for non-draft - * environment. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - */ -function list_intents_sample(string $formattedParent): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $intentsClient->listIntents($formattedParent); - - /** @var Intent $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 = IntentsClient::agentName('[PROJECT]'); - - list_intents_sample($formattedParent); -} -// [END dialogflow_v2_generated_Intents_ListIntents_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_locations.php deleted file mode 100644 index 30cb797e8312..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Intents_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/update_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/update_intent.php deleted file mode 100644 index 0b54b3704900..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/IntentsClient/update_intent.php +++ /dev/null @@ -1,73 +0,0 @@ -setDisplayName($intentDisplayName); - - // Call the API and handle any network failures. - try { - /** @var Intent $response */ - $response = $intentsClient->updateIntent($intent); - 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 -{ - $intentDisplayName = '[DISPLAY_NAME]'; - - update_intent_sample($intentDisplayName); -} -// [END dialogflow_v2_generated_Intents_UpdateIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/create_knowledge_base.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/create_knowledge_base.php deleted file mode 100644 index f6bbbd05697b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/create_knowledge_base.php +++ /dev/null @@ -1,76 +0,0 @@ -/locations/`. Please see - * {@see KnowledgeBasesClient::projectName()} for help formatting this field. - * @param string $knowledgeBaseDisplayName The display name of the knowledge base. The name must be 1024 - * bytes or less; otherwise, the creation request fails. - */ -function create_knowledge_base_sample( - string $formattedParent, - string $knowledgeBaseDisplayName -): void { - // Create a client. - $knowledgeBasesClient = new KnowledgeBasesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $knowledgeBase = (new KnowledgeBase()) - ->setDisplayName($knowledgeBaseDisplayName); - - // Call the API and handle any network failures. - try { - /** @var KnowledgeBase $response */ - $response = $knowledgeBasesClient->createKnowledgeBase($formattedParent, $knowledgeBase); - 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 = KnowledgeBasesClient::projectName('[PROJECT]'); - $knowledgeBaseDisplayName = '[DISPLAY_NAME]'; - - create_knowledge_base_sample($formattedParent, $knowledgeBaseDisplayName); -} -// [END dialogflow_v2_generated_KnowledgeBases_CreateKnowledgeBase_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/delete_knowledge_base.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/delete_knowledge_base.php deleted file mode 100644 index 903609bbdc00..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/delete_knowledge_base.php +++ /dev/null @@ -1,66 +0,0 @@ -/locations//knowledgeBases/`. Please see - * {@see KnowledgeBasesClient::knowledgeBaseName()} for help formatting this field. - */ -function delete_knowledge_base_sample(string $formattedName): void -{ - // Create a client. - $knowledgeBasesClient = new KnowledgeBasesClient(); - - // Call the API and handle any network failures. - try { - $knowledgeBasesClient->deleteKnowledgeBase($formattedName); - 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 = KnowledgeBasesClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - - delete_knowledge_base_sample($formattedName); -} -// [END dialogflow_v2_generated_KnowledgeBases_DeleteKnowledgeBase_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_knowledge_base.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_knowledge_base.php deleted file mode 100644 index bda173eafa0a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_knowledge_base.php +++ /dev/null @@ -1,68 +0,0 @@ -/locations//knowledgeBases/`. Please see - * {@see KnowledgeBasesClient::knowledgeBaseName()} for help formatting this field. - */ -function get_knowledge_base_sample(string $formattedName): void -{ - // Create a client. - $knowledgeBasesClient = new KnowledgeBasesClient(); - - // Call the API and handle any network failures. - try { - /** @var KnowledgeBase $response */ - $response = $knowledgeBasesClient->getKnowledgeBase($formattedName); - 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 = KnowledgeBasesClient::knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - - get_knowledge_base_sample($formattedName); -} -// [END dialogflow_v2_generated_KnowledgeBases_GetKnowledgeBase_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_location.php deleted file mode 100644 index 8362d31264fc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_KnowledgeBases_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_knowledge_bases.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_knowledge_bases.php deleted file mode 100644 index de802bdfe9c4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_knowledge_bases.php +++ /dev/null @@ -1,72 +0,0 @@ -/locations/`. Please see - * {@see KnowledgeBasesClient::projectName()} for help formatting this field. - */ -function list_knowledge_bases_sample(string $formattedParent): void -{ - // Create a client. - $knowledgeBasesClient = new KnowledgeBasesClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $knowledgeBasesClient->listKnowledgeBases($formattedParent); - - /** @var KnowledgeBase $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 = KnowledgeBasesClient::projectName('[PROJECT]'); - - list_knowledge_bases_sample($formattedParent); -} -// [END dialogflow_v2_generated_KnowledgeBases_ListKnowledgeBases_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_locations.php deleted file mode 100644 index c20bb9d82c39..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_KnowledgeBases_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/update_knowledge_base.php b/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/update_knowledge_base.php deleted file mode 100644 index de83978a7890..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/KnowledgeBasesClient/update_knowledge_base.php +++ /dev/null @@ -1,70 +0,0 @@ -setDisplayName($knowledgeBaseDisplayName); - - // Call the API and handle any network failures. - try { - /** @var KnowledgeBase $response */ - $response = $knowledgeBasesClient->updateKnowledgeBase($knowledgeBase); - 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 -{ - $knowledgeBaseDisplayName = '[DISPLAY_NAME]'; - - update_knowledge_base_sample($knowledgeBaseDisplayName); -} -// [END dialogflow_v2_generated_KnowledgeBases_UpdateKnowledgeBase_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/analyze_content.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/analyze_content.php deleted file mode 100644 index ea2a07165aaa..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/analyze_content.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//conversations//participants/`. Please see - * {@see ParticipantsClient::participantName()} for help formatting this field. - */ -function analyze_content_sample(string $formattedParticipant): void -{ - // Create a client. - $participantsClient = new ParticipantsClient(); - - // Call the API and handle any network failures. - try { - /** @var AnalyzeContentResponse $response */ - $response = $participantsClient->analyzeContent($formattedParticipant); - 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 -{ - $formattedParticipant = ParticipantsClient::participantName( - '[PROJECT]', - '[CONVERSATION]', - '[PARTICIPANT]' - ); - - analyze_content_sample($formattedParticipant); -} -// [END dialogflow_v2_generated_Participants_AnalyzeContent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/create_participant.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/create_participant.php deleted file mode 100644 index ac93afe4f345..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/create_participant.php +++ /dev/null @@ -1,71 +0,0 @@ -/locations//conversations/`. Please see - * {@see ParticipantsClient::conversationName()} for help formatting this field. - */ -function create_participant_sample(string $formattedParent): void -{ - // Create a client. - $participantsClient = new ParticipantsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $participant = new Participant(); - - // Call the API and handle any network failures. - try { - /** @var Participant $response */ - $response = $participantsClient->createParticipant($formattedParent, $participant); - 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 = ParticipantsClient::conversationName('[PROJECT]', '[CONVERSATION]'); - - create_participant_sample($formattedParent); -} -// [END dialogflow_v2_generated_Participants_CreateParticipant_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_location.php deleted file mode 100644 index a4717b996ff4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Participants_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_participant.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_participant.php deleted file mode 100644 index ed68078dfcf9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/get_participant.php +++ /dev/null @@ -1,72 +0,0 @@ -/locations//conversations//participants/`. Please see - * {@see ParticipantsClient::participantName()} for help formatting this field. - */ -function get_participant_sample(string $formattedName): void -{ - // Create a client. - $participantsClient = new ParticipantsClient(); - - // Call the API and handle any network failures. - try { - /** @var Participant $response */ - $response = $participantsClient->getParticipant($formattedName); - 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 = ParticipantsClient::participantName( - '[PROJECT]', - '[CONVERSATION]', - '[PARTICIPANT]' - ); - - get_participant_sample($formattedName); -} -// [END dialogflow_v2_generated_Participants_GetParticipant_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_locations.php deleted file mode 100644 index 440555880149..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Participants_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_participants.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_participants.php deleted file mode 100644 index 8359a672d1f7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/list_participants.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//conversations/`. Please see - * {@see ParticipantsClient::conversationName()} for help formatting this field. - */ -function list_participants_sample(string $formattedParent): void -{ - // Create a client. - $participantsClient = new ParticipantsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $participantsClient->listParticipants($formattedParent); - - /** @var Participant $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 = ParticipantsClient::conversationName('[PROJECT]', '[CONVERSATION]'); - - list_participants_sample($formattedParent); -} -// [END dialogflow_v2_generated_Participants_ListParticipants_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/streaming_analyze_content.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/streaming_analyze_content.php deleted file mode 100644 index ca78aadb5c28..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/streaming_analyze_content.php +++ /dev/null @@ -1,97 +0,0 @@ -/locations//conversations//participants/`. Please see - * {@see ParticipantsClient::participantName()} for help formatting this field. - */ -function streaming_analyze_content_sample(string $formattedParticipant): void -{ - // Create a client. - $participantsClient = new ParticipantsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $request = (new StreamingAnalyzeContentRequest()) - ->setParticipant($formattedParticipant); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $participantsClient->streamingAnalyzeContent(); - $stream->writeAll([$request,]); - - /** @var StreamingAnalyzeContentResponse $element */ - foreach ($stream->closeWriteAndReadAll() 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 -{ - $formattedParticipant = ParticipantsClient::participantName( - '[PROJECT]', - '[CONVERSATION]', - '[PARTICIPANT]' - ); - - streaming_analyze_content_sample($formattedParticipant); -} -// [END dialogflow_v2_generated_Participants_StreamingAnalyzeContent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_articles.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_articles.php deleted file mode 100644 index 5abba2ea21fb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_articles.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//conversations//participants/`. Please see - * {@see ParticipantsClient::participantName()} for help formatting this field. - */ -function suggest_articles_sample(string $formattedParent): void -{ - // Create a client. - $participantsClient = new ParticipantsClient(); - - // Call the API and handle any network failures. - try { - /** @var SuggestArticlesResponse $response */ - $response = $participantsClient->suggestArticles($formattedParent); - 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 = ParticipantsClient::participantName( - '[PROJECT]', - '[CONVERSATION]', - '[PARTICIPANT]' - ); - - suggest_articles_sample($formattedParent); -} -// [END dialogflow_v2_generated_Participants_SuggestArticles_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_faq_answers.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_faq_answers.php deleted file mode 100644 index 305452d83d07..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_faq_answers.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//conversations//participants/`. Please see - * {@see ParticipantsClient::participantName()} for help formatting this field. - */ -function suggest_faq_answers_sample(string $formattedParent): void -{ - // Create a client. - $participantsClient = new ParticipantsClient(); - - // Call the API and handle any network failures. - try { - /** @var SuggestFaqAnswersResponse $response */ - $response = $participantsClient->suggestFaqAnswers($formattedParent); - 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 = ParticipantsClient::participantName( - '[PROJECT]', - '[CONVERSATION]', - '[PARTICIPANT]' - ); - - suggest_faq_answers_sample($formattedParent); -} -// [END dialogflow_v2_generated_Participants_SuggestFaqAnswers_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_smart_replies.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_smart_replies.php deleted file mode 100644 index adc3807aeaf4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/suggest_smart_replies.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//conversations//participants/`. Please see - * {@see ParticipantsClient::participantName()} for help formatting this field. - */ -function suggest_smart_replies_sample(string $formattedParent): void -{ - // Create a client. - $participantsClient = new ParticipantsClient(); - - // Call the API and handle any network failures. - try { - /** @var SuggestSmartRepliesResponse $response */ - $response = $participantsClient->suggestSmartReplies($formattedParent); - 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 = ParticipantsClient::participantName( - '[PROJECT]', - '[CONVERSATION]', - '[PARTICIPANT]' - ); - - suggest_smart_replies_sample($formattedParent); -} -// [END dialogflow_v2_generated_Participants_SuggestSmartReplies_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/update_participant.php b/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/update_participant.php deleted file mode 100644 index 97b1187d7947..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/ParticipantsClient/update_participant.php +++ /dev/null @@ -1,58 +0,0 @@ -updateParticipant($participant, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Participants_UpdateParticipant_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/create_session_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/create_session_entity_type.php deleted file mode 100644 index b5513f20f7c3..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/create_session_entity_type.php +++ /dev/null @@ -1,140 +0,0 @@ -/agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. Please see - * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. - * @param string $sessionEntityTypeName The unique identifier of this session entity type. Format: - * `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * `` must be the display name of an existing entity - * type in the same agent that will be overridden or supplemented. - * @param int $sessionEntityTypeEntityOverrideMode Indicates whether the additional data should override or - * supplement the custom entity type definition. - * @param string $sessionEntityTypeEntitiesValue The primary value associated with this entity entry. - * For example, if the entity type is *vegetable*, the value could be - * *scallions*. - * - * For `KIND_MAP` entity types: - * - * * A reference value to be used in place of synonyms. - * - * For `KIND_LIST` entity types: - * - * * A string that can contain references to other entity types (with or - * without aliases). - * @param string $sessionEntityTypeEntitiesSynonymsElement A collection of value synonyms. For example, if the entity type - * is *vegetable*, and `value` is *scallions*, a synonym could be *green - * onions*. - * - * For `KIND_LIST` entity types: - * - * * This collection must contain exactly one synonym equal to `value`. - */ -function create_session_entity_type_sample( - string $formattedParent, - string $sessionEntityTypeName, - int $sessionEntityTypeEntityOverrideMode, - string $sessionEntityTypeEntitiesValue, - string $sessionEntityTypeEntitiesSynonymsElement -): void { - // Create a client. - $sessionEntityTypesClient = new SessionEntityTypesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $sessionEntityTypeEntitiesSynonyms = [$sessionEntityTypeEntitiesSynonymsElement,]; - $entity = (new Entity()) - ->setValue($sessionEntityTypeEntitiesValue) - ->setSynonyms($sessionEntityTypeEntitiesSynonyms); - $sessionEntityTypeEntities = [$entity,]; - $sessionEntityType = (new SessionEntityType()) - ->setName($sessionEntityTypeName) - ->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode) - ->setEntities($sessionEntityTypeEntities); - - // Call the API and handle any network failures. - try { - /** @var SessionEntityType $response */ - $response = $sessionEntityTypesClient->createSessionEntityType( - $formattedParent, - $sessionEntityType - ); - 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 = SessionEntityTypesClient::sessionName('[PROJECT]', '[SESSION]'); - $sessionEntityTypeName = '[NAME]'; - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityTypeEntitiesValue = '[VALUE]'; - $sessionEntityTypeEntitiesSynonymsElement = '[SYNONYMS]'; - - create_session_entity_type_sample( - $formattedParent, - $sessionEntityTypeName, - $sessionEntityTypeEntityOverrideMode, - $sessionEntityTypeEntitiesValue, - $sessionEntityTypeEntitiesSynonymsElement - ); -} -// [END dialogflow_v2_generated_SessionEntityTypes_CreateSessionEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/delete_session_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/delete_session_entity_type.php deleted file mode 100644 index b6f56f0de7cf..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/delete_session_entity_type.php +++ /dev/null @@ -1,78 +0,0 @@ -/agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. Please see - * {@see SessionEntityTypesClient::sessionEntityTypeName()} for help formatting this field. - */ -function delete_session_entity_type_sample(string $formattedName): void -{ - // Create a client. - $sessionEntityTypesClient = new SessionEntityTypesClient(); - - // Call the API and handle any network failures. - try { - $sessionEntityTypesClient->deleteSessionEntityType($formattedName); - 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 = SessionEntityTypesClient::sessionEntityTypeName( - '[PROJECT]', - '[SESSION]', - '[ENTITY_TYPE]' - ); - - delete_session_entity_type_sample($formattedName); -} -// [END dialogflow_v2_generated_SessionEntityTypes_DeleteSessionEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_location.php deleted file mode 100644 index 5590902a38e5..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_SessionEntityTypes_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_session_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_session_entity_type.php deleted file mode 100644 index c4ff566fb7fc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/get_session_entity_type.php +++ /dev/null @@ -1,80 +0,0 @@ -/agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. Please see - * {@see SessionEntityTypesClient::sessionEntityTypeName()} for help formatting this field. - */ -function get_session_entity_type_sample(string $formattedName): void -{ - // Create a client. - $sessionEntityTypesClient = new SessionEntityTypesClient(); - - // Call the API and handle any network failures. - try { - /** @var SessionEntityType $response */ - $response = $sessionEntityTypesClient->getSessionEntityType($formattedName); - 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 = SessionEntityTypesClient::sessionEntityTypeName( - '[PROJECT]', - '[SESSION]', - '[ENTITY_TYPE]' - ); - - get_session_entity_type_sample($formattedName); -} -// [END dialogflow_v2_generated_SessionEntityTypes_GetSessionEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_locations.php deleted file mode 100644 index 5673a2ad0429..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_SessionEntityTypes_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_session_entity_types.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_session_entity_types.php deleted file mode 100644 index 57f99fff2eaf..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/list_session_entity_types.php +++ /dev/null @@ -1,80 +0,0 @@ -/agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. Please see - * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. - */ -function list_session_entity_types_sample(string $formattedParent): void -{ - // Create a client. - $sessionEntityTypesClient = new SessionEntityTypesClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $sessionEntityTypesClient->listSessionEntityTypes($formattedParent); - - /** @var SessionEntityType $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 = SessionEntityTypesClient::sessionName('[PROJECT]', '[SESSION]'); - - list_session_entity_types_sample($formattedParent); -} -// [END dialogflow_v2_generated_SessionEntityTypes_ListSessionEntityTypes_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/update_session_entity_type.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/update_session_entity_type.php deleted file mode 100644 index 931ba432a559..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionEntityTypesClient/update_session_entity_type.php +++ /dev/null @@ -1,124 +0,0 @@ -/agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * - * `` must be the display name of an existing entity - * type in the same agent that will be overridden or supplemented. - * @param int $sessionEntityTypeEntityOverrideMode Indicates whether the additional data should override or - * supplement the custom entity type definition. - * @param string $sessionEntityTypeEntitiesValue The primary value associated with this entity entry. - * For example, if the entity type is *vegetable*, the value could be - * *scallions*. - * - * For `KIND_MAP` entity types: - * - * * A reference value to be used in place of synonyms. - * - * For `KIND_LIST` entity types: - * - * * A string that can contain references to other entity types (with or - * without aliases). - * @param string $sessionEntityTypeEntitiesSynonymsElement A collection of value synonyms. For example, if the entity type - * is *vegetable*, and `value` is *scallions*, a synonym could be *green - * onions*. - * - * For `KIND_LIST` entity types: - * - * * This collection must contain exactly one synonym equal to `value`. - */ -function update_session_entity_type_sample( - string $sessionEntityTypeName, - int $sessionEntityTypeEntityOverrideMode, - string $sessionEntityTypeEntitiesValue, - string $sessionEntityTypeEntitiesSynonymsElement -): void { - // Create a client. - $sessionEntityTypesClient = new SessionEntityTypesClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $sessionEntityTypeEntitiesSynonyms = [$sessionEntityTypeEntitiesSynonymsElement,]; - $entity = (new Entity()) - ->setValue($sessionEntityTypeEntitiesValue) - ->setSynonyms($sessionEntityTypeEntitiesSynonyms); - $sessionEntityTypeEntities = [$entity,]; - $sessionEntityType = (new SessionEntityType()) - ->setName($sessionEntityTypeName) - ->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode) - ->setEntities($sessionEntityTypeEntities); - - // Call the API and handle any network failures. - try { - /** @var SessionEntityType $response */ - $response = $sessionEntityTypesClient->updateSessionEntityType($sessionEntityType); - 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 -{ - $sessionEntityTypeName = '[NAME]'; - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityTypeEntitiesValue = '[VALUE]'; - $sessionEntityTypeEntitiesSynonymsElement = '[SYNONYMS]'; - - update_session_entity_type_sample( - $sessionEntityTypeName, - $sessionEntityTypeEntityOverrideMode, - $sessionEntityTypeEntitiesValue, - $sessionEntityTypeEntitiesSynonymsElement - ); -} -// [END dialogflow_v2_generated_SessionEntityTypes_UpdateSessionEntityType_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/detect_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/detect_intent.php deleted file mode 100644 index 569dcb6ebdb2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/detect_intent.php +++ /dev/null @@ -1,100 +0,0 @@ -/agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment (`Environment ID` might be referred to as - * environment name at some places). If `User ID` is not specified, we are - * using "-". It's up to the API caller to choose an appropriate `Session ID` - * and `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). Please see - * {@see SessionsClient::sessionName()} for help formatting this field. - */ -function detect_intent_sample(string $formattedSession): void -{ - // Create a client. - $sessionsClient = new SessionsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $queryInput = new QueryInput(); - - // Call the API and handle any network failures. - try { - /** @var DetectIntentResponse $response */ - $response = $sessionsClient->detectIntent($formattedSession, $queryInput); - 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 -{ - $formattedSession = SessionsClient::sessionName('[PROJECT]', '[SESSION]'); - - detect_intent_sample($formattedSession); -} -// [END dialogflow_v2_generated_Sessions_DetectIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/get_location.php deleted file mode 100644 index f12b6d2c5964..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Sessions_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/list_locations.php deleted file mode 100644 index 972718b7fa62..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Sessions_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/streaming_detect_intent.php b/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/streaming_detect_intent.php deleted file mode 100644 index 9c7a2254b249..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/SessionsClient/streaming_detect_intent.php +++ /dev/null @@ -1,109 +0,0 @@ -/agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment. If `User ID` is not specified, we are using - * "-". It's up to the API caller to choose an appropriate `Session ID` and - * `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). Please see - * {@see SessionsClient::sessionName()} for help formatting this field. - */ -function streaming_detect_intent_sample(string $formattedSession): void -{ - // Create a client. - $sessionsClient = new SessionsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $queryInput = new QueryInput(); - $request = (new StreamingDetectIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $sessionsClient->streamingDetectIntent(); - $stream->writeAll([$request,]); - - /** @var StreamingDetectIntentResponse $element */ - foreach ($stream->closeWriteAndReadAll() 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 -{ - $formattedSession = SessionsClient::sessionName('[PROJECT]', '[SESSION]'); - - streaming_detect_intent_sample($formattedSession); -} -// [END dialogflow_v2_generated_Sessions_StreamingDetectIntent_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/create_version.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/create_version.php deleted file mode 100644 index e089e250e1ed..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/create_version.php +++ /dev/null @@ -1,75 +0,0 @@ -/agent` - * - `projects//locations//agent` - * Please see {@see VersionsClient::agentName()} for help formatting this field. - */ -function create_version_sample(string $formattedParent): void -{ - // Create a client. - $versionsClient = new VersionsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $version = new Version(); - - // Call the API and handle any network failures. - try { - /** @var Version $response */ - $response = $versionsClient->createVersion($formattedParent, $version); - 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 = VersionsClient::agentName('[PROJECT]'); - - create_version_sample($formattedParent); -} -// [END dialogflow_v2_generated_Versions_CreateVersion_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/delete_version.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/delete_version.php deleted file mode 100644 index 0210b6fa6bf1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/delete_version.php +++ /dev/null @@ -1,69 +0,0 @@ -/agent/versions/` - * - `projects//locations//agent/versions/` - * Please see {@see VersionsClient::versionName()} for help formatting this field. - */ -function delete_version_sample(string $formattedName): void -{ - // Create a client. - $versionsClient = new VersionsClient(); - - // Call the API and handle any network failures. - try { - $versionsClient->deleteVersion($formattedName); - 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 = VersionsClient::versionName('[PROJECT]', '[VERSION]'); - - delete_version_sample($formattedName); -} -// [END dialogflow_v2_generated_Versions_DeleteVersion_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_location.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_location.php deleted file mode 100644 index 2a4e47d09c7c..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Versions_GetLocation_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_version.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_version.php deleted file mode 100644 index 9a5a28ce621d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/get_version.php +++ /dev/null @@ -1,71 +0,0 @@ -/agent/versions/` - * - `projects//locations//agent/versions/` - * Please see {@see VersionsClient::versionName()} for help formatting this field. - */ -function get_version_sample(string $formattedName): void -{ - // Create a client. - $versionsClient = new VersionsClient(); - - // Call the API and handle any network failures. - try { - /** @var Version $response */ - $response = $versionsClient->getVersion($formattedName); - 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 = VersionsClient::versionName('[PROJECT]', '[VERSION]'); - - get_version_sample($formattedName); -} -// [END dialogflow_v2_generated_Versions_GetVersion_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_locations.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_locations.php deleted file mode 100644 index 9041a7fb8603..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $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()); - } -} -// [END dialogflow_v2_generated_Versions_ListLocations_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_versions.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_versions.php deleted file mode 100644 index d093ad705a0f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/list_versions.php +++ /dev/null @@ -1,75 +0,0 @@ -/agent` - * - `projects//locations//agent` - * Please see {@see VersionsClient::agentName()} for help formatting this field. - */ -function list_versions_sample(string $formattedParent): void -{ - // Create a client. - $versionsClient = new VersionsClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $versionsClient->listVersions($formattedParent); - - /** @var Version $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 = VersionsClient::agentName('[PROJECT]'); - - list_versions_sample($formattedParent); -} -// [END dialogflow_v2_generated_Versions_ListVersions_sync] diff --git a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/update_version.php b/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/update_version.php deleted file mode 100644 index 1d7662bb6779..000000000000 --- a/owl-bot-staging/Dialogflow/v2/samples/V2/VersionsClient/update_version.php +++ /dev/null @@ -1,62 +0,0 @@ -updateVersion($version, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v2_generated_Versions_UpdateVersion_sync] diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/AgentsClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/AgentsClient.php deleted file mode 100644 index f35575682398..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/AgentsClient.php +++ /dev/null @@ -1,34 +0,0 @@ -projectName('[PROJECT]'); - * $agentsClient->deleteAgent($formattedParent); - * } finally { - * $agentsClient->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. - */ -class AgentsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Agents'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $agentNameTemplate; - - private static $locationNameTemplate; - - private static $projectNameTemplate; - - private static $projectAgentNameTemplate; - - private static $projectLocationAgentNameTemplate; - - 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/agents_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/agents_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/agents_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/agents_rest_client_config.php', - ], - ], - ]; - } - - private static function getAgentNameTemplate() - { - if (self::$agentNameTemplate == null) { - self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$agentNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectAgentNameTemplate() - { - if (self::$projectAgentNameTemplate == null) { - self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$projectAgentNameTemplate; - } - - private static function getProjectLocationAgentNameTemplate() - { - if (self::$projectLocationAgentNameTemplate == null) { - self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); - } - - return self::$projectLocationAgentNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'agent' => self::getAgentNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectAgent' => self::getProjectAgentNameTemplate(), - 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * - * @return string The formatted agent resource. - */ - public static function agentName($project) - { - return self::getAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * 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 project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_agent resource. - * - * @param string $project - * - * @return string The formatted project_agent resource. - */ - public static function projectAgentName($project) - { - return self::getProjectAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted project_location_agent resource. - */ - public static function projectLocationAgentName($project, $location) - { - return self::getProjectLocationAgentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - agent: projects/{project}/agent - * - location: projects/{project}/locations/{location} - * - project: projects/{project} - * - projectAgent: projects/{project}/agent - * - projectLocationAgent: projects/{project}/locations/{location}/agent - * - * 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 'dialogflow.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); - } - - /** - * Deletes the specified agent. - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $formattedParent = $agentsClient->projectName('[PROJECT]'); - * $agentsClient->deleteAgent($formattedParent); - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project that the agent to delete is associated with. - * Format: `projects/`. - * @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 deleteAgent($parent, array $optionalArgs = []) - { - $request = new DeleteAgentRequest(); - $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('DeleteAgent', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Exports the specified agent to a ZIP file. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: - * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse] - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $formattedParent = $agentsClient->projectName('[PROJECT]'); - * $agentUri = 'agent_uri'; - * $operationResponse = $agentsClient->exportAgent($formattedParent, $agentUri); - * $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 = $agentsClient->exportAgent($formattedParent, $agentUri); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $agentsClient->resumeOperation($operationName, 'exportAgent'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project that the agent to export is associated with. - * Format: `projects/`. - * @param string $agentUri Required. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the agent - * to. The format of this URI must be `gs:///`. If - * left unspecified, the serialized agent is returned inline. - * - * Dialogflow performs a write operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have write permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * @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 exportAgent($parent, $agentUri, array $optionalArgs = []) - { - $request = new ExportAgentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAgentUri($agentUri); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ExportAgent', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves the specified agent. - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $formattedParent = $agentsClient->projectName('[PROJECT]'); - * $response = $agentsClient->getAgent($formattedParent); - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project that the agent to fetch is associated with. - * Format: `projects/`. - * @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\Dialogflow\V2\Agent - * - * @throws ApiException if the remote call fails - */ - public function getAgent($parent, array $optionalArgs = []) - { - $request = new GetAgentRequest(); - $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('GetAgent', Agent::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets agent validation result. Agent validation is performed during - * training time and is updated automatically when training is completed. - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $formattedParent = $agentsClient->projectName('[PROJECT]'); - * $response = $agentsClient->getValidationResult($formattedParent); - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project that the agent is associated with. - * Format: `projects/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language for which you want a validation result. If not - * specified, the agent's default language is used. [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) - * are supported. Note: languages must be enabled in the agent before they can - * be used. - * @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\Dialogflow\V2\ValidationResult - * - * @throws ApiException if the remote call fails - */ - public function getValidationResult($parent, array $optionalArgs = []) - { - $request = new GetValidationResultRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetValidationResult', ValidationResult::class, $optionalArgs, $request)->wait(); - } - - /** - * Imports the specified agent from a ZIP file. - * - * Uploads new intents and entity types without deleting the existing ones. - * Intents and entity types with the same name are replaced with the new - * versions from - * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After - * the import, the imported draft agent will be trained automatically (unless - * disabled in agent settings). However, once the import is done, training may - * not be completed yet. Please call - * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the - * operation it returns in order to train explicitly. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * The operation only tracks when importing is complete, not when it is done - * training. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $formattedParent = $agentsClient->projectName('[PROJECT]'); - * $operationResponse = $agentsClient->importAgent($formattedParent); - * $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 = $agentsClient->importAgent($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $agentsClient->resumeOperation($operationName, 'importAgent'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project that the agent to import is associated with. - * Format: `projects/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $agentUri - * The URI to a Google Cloud Storage file containing the agent to import. - * Note: The URI must start with "gs://". - * - * Dialogflow performs a read operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have read permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * @type string $agentContent - * Zip compressed raw byte content for agent. - * @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 importAgent($parent, array $optionalArgs = []) - { - $request = new ImportAgentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['agentUri'])) { - $request->setAgentUri($optionalArgs['agentUri']); - } - - if (isset($optionalArgs['agentContent'])) { - $request->setAgentContent($optionalArgs['agentContent']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportAgent', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Restores the specified agent from a ZIP file. - * - * Replaces the current agent version with a new one. All the intents and - * entity types in the older version are deleted. After the restore, the - * restored draft agent will be trained automatically (unless disabled in - * agent settings). However, once the restore is done, training may not be - * completed yet. Please call - * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the - * operation it returns in order to train explicitly. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * The operation only tracks when restoring is complete, not when it is done - * training. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $formattedParent = $agentsClient->projectName('[PROJECT]'); - * $operationResponse = $agentsClient->restoreAgent($formattedParent); - * $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 = $agentsClient->restoreAgent($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $agentsClient->resumeOperation($operationName, 'restoreAgent'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project that the agent to restore is associated with. - * Format: `projects/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $agentUri - * The URI to a Google Cloud Storage file containing the agent to restore. - * Note: The URI must start with "gs://". - * - * Dialogflow performs a read operation for the Cloud Storage object - * on the caller's behalf, so your request authentication must - * have read permissions for the object. For more information, see - * [Dialogflow access - * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). - * @type string $agentContent - * Zip compressed raw byte content for agent. - * @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 restoreAgent($parent, array $optionalArgs = []) - { - $request = new RestoreAgentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['agentUri'])) { - $request->setAgentUri($optionalArgs['agentUri']); - } - - if (isset($optionalArgs['agentContent'])) { - $request->setAgentContent($optionalArgs['agentContent']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RestoreAgent', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Returns the list of agents. - * - * Since there is at most one conversational agent per project, this method is - * useful primarily for listing all agents across projects the caller has - * access to. One can achieve that with a wildcard project collection id "-". - * Refer to [List - * Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $formattedParent = $agentsClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $agentsClient->searchAgents($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $agentsClient->searchAgents($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to list agents from. - * Format: `projects/`. - * @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 searchAgents($parent, array $optionalArgs = []) - { - $request = new SearchAgentsRequest(); - $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('SearchAgents', $optionalArgs, SearchAgentsResponse::class, $request); - } - - /** - * Creates/updates the specified agent. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $agent = new Agent(); - * $response = $agentsClient->setAgent($agent); - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param Agent $agent Required. The agent to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. The mask to control which fields get 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\Dialogflow\V2\Agent - * - * @throws ApiException if the remote call fails - */ - public function setAgent($agent, array $optionalArgs = []) - { - $request = new SetAgentRequest(); - $requestParamHeaders = []; - $request->setAgent($agent); - $requestParamHeaders['agent.parent'] = $agent->getParent(); - 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('SetAgent', Agent::class, $optionalArgs, $request)->wait(); - } - - /** - * Trains the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $formattedParent = $agentsClient->projectName('[PROJECT]'); - * $operationResponse = $agentsClient->trainAgent($formattedParent); - * $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 = $agentsClient->trainAgent($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $agentsClient->resumeOperation($operationName, 'trainAgent'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project that the agent to train is associated with. - * Format: `projects/`. - * @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 trainAgent($parent, array $optionalArgs = []) - { - $request = new TrainAgentRequest(); - $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->startOperationsCall('TrainAgent', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * $response = $agentsClient->getLocation(); - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $agentsClient = new AgentsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $agentsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $agentsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $agentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AnswerRecordsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AnswerRecordsGapicClient.php deleted file mode 100644 index 55d74bb8000d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/AnswerRecordsGapicClient.php +++ /dev/null @@ -1,626 +0,0 @@ -projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $answerRecordsClient->listAnswerRecords($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $answerRecordsClient->listAnswerRecords($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $answerRecordsClient->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. - */ -class AnswerRecordsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.AnswerRecords'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $answerRecordNameTemplate; - - private static $locationNameTemplate; - - private static $projectNameTemplate; - - private static $projectAnswerRecordNameTemplate; - - private static $projectLocationAnswerRecordNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/answer_records_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/answer_records_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/answer_records_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/answer_records_rest_client_config.php', - ], - ], - ]; - } - - private static function getAnswerRecordNameTemplate() - { - if (self::$answerRecordNameTemplate == null) { - self::$answerRecordNameTemplate = new PathTemplate('projects/{project}/answerRecords/{answer_record}'); - } - - return self::$answerRecordNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectAnswerRecordNameTemplate() - { - if (self::$projectAnswerRecordNameTemplate == null) { - self::$projectAnswerRecordNameTemplate = new PathTemplate('projects/{project}/answerRecords/{answer_record}'); - } - - return self::$projectAnswerRecordNameTemplate; - } - - private static function getProjectLocationAnswerRecordNameTemplate() - { - if (self::$projectLocationAnswerRecordNameTemplate == null) { - self::$projectLocationAnswerRecordNameTemplate = new PathTemplate('projects/{project}/locations/{location}/answerRecords/{answer_record}'); - } - - return self::$projectLocationAnswerRecordNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'answerRecord' => self::getAnswerRecordNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectAnswerRecord' => self::getProjectAnswerRecordNameTemplate(), - 'projectLocationAnswerRecord' => self::getProjectLocationAnswerRecordNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * answer_record resource. - * - * @param string $project - * @param string $answerRecord - * - * @return string The formatted answer_record resource. - */ - public static function answerRecordName($project, $answerRecord) - { - return self::getAnswerRecordNameTemplate()->render([ - 'project' => $project, - 'answer_record' => $answerRecord, - ]); - } - - /** - * 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 project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_answer_record resource. - * - * @param string $project - * @param string $answerRecord - * - * @return string The formatted project_answer_record resource. - */ - public static function projectAnswerRecordName($project, $answerRecord) - { - return self::getProjectAnswerRecordNameTemplate()->render([ - 'project' => $project, - 'answer_record' => $answerRecord, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_answer_record resource. - * - * @param string $project - * @param string $location - * @param string $answerRecord - * - * @return string The formatted project_location_answer_record resource. - */ - public static function projectLocationAnswerRecordName($project, $location, $answerRecord) - { - return self::getProjectLocationAnswerRecordNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'answer_record' => $answerRecord, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - answerRecord: projects/{project}/answerRecords/{answer_record} - * - location: projects/{project}/locations/{location} - * - project: projects/{project} - * - projectAnswerRecord: projects/{project}/answerRecords/{answer_record} - * - projectLocationAnswerRecord: projects/{project}/locations/{location}/answerRecords/{answer_record} - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Returns the list of all answer records in the specified project in reverse - * chronological order. - * - * Sample code: - * ``` - * $answerRecordsClient = new AnswerRecordsClient(); - * try { - * $formattedParent = $answerRecordsClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $answerRecordsClient->listAnswerRecords($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $answerRecordsClient->listAnswerRecords($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $answerRecordsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to list all answer records for in reverse - * chronological order. Format: `projects//locations/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. Filters to restrict results to specific answer records. - * - * Marked deprecated as it hasn't been, and isn't currently, supported. - * - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @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 listAnswerRecords($parent, array $optionalArgs = []) - { - $request = new ListAnswerRecordsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListAnswerRecords', $optionalArgs, ListAnswerRecordsResponse::class, $request); - } - - /** - * Updates the specified answer record. - * - * Sample code: - * ``` - * $answerRecordsClient = new AnswerRecordsClient(); - * try { - * $answerRecord = new AnswerRecord(); - * $updateMask = new FieldMask(); - * $response = $answerRecordsClient->updateAnswerRecord($answerRecord, $updateMask); - * } finally { - * $answerRecordsClient->close(); - * } - * ``` - * - * @param AnswerRecord $answerRecord Required. Answer record to update. - * @param FieldMask $updateMask Required. The mask to control which fields get 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\Dialogflow\V2\AnswerRecord - * - * @throws ApiException if the remote call fails - */ - public function updateAnswerRecord($answerRecord, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAnswerRecordRequest(); - $requestParamHeaders = []; - $request->setAnswerRecord($answerRecord); - $request->setUpdateMask($updateMask); - $requestParamHeaders['answer_record.name'] = $answerRecord->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateAnswerRecord', AnswerRecord::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $answerRecordsClient = new AnswerRecordsClient(); - * try { - * $response = $answerRecordsClient->getLocation(); - * } finally { - * $answerRecordsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $answerRecordsClient = new AnswerRecordsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $answerRecordsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $answerRecordsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $answerRecordsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ContextsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ContextsGapicClient.php deleted file mode 100644 index 39dc80d2ba39..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ContextsGapicClient.php +++ /dev/null @@ -1,974 +0,0 @@ -sessionName('[PROJECT]', '[SESSION]'); - * $context = new Context(); - * $response = $contextsClient->createContext($formattedParent, $context); - * } finally { - * $contextsClient->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. - */ -class ContextsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Contexts'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $contextNameTemplate; - - private static $projectEnvironmentUserSessionNameTemplate; - - private static $projectEnvironmentUserSessionContextNameTemplate; - - private static $projectLocationEnvironmentUserSessionNameTemplate; - - private static $projectLocationEnvironmentUserSessionContextNameTemplate; - - private static $projectLocationSessionNameTemplate; - - private static $projectLocationSessionContextNameTemplate; - - private static $projectSessionNameTemplate; - - private static $projectSessionContextNameTemplate; - - private static $sessionNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/contexts_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/contexts_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/contexts_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/contexts_rest_client_config.php', - ], - ], - ]; - } - - private static function getContextNameTemplate() - { - if (self::$contextNameTemplate == null) { - self::$contextNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}/contexts/{context}'); - } - - return self::$contextNameTemplate; - } - - private static function getProjectEnvironmentUserSessionNameTemplate() - { - if (self::$projectEnvironmentUserSessionNameTemplate == null) { - self::$projectEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}'); - } - - return self::$projectEnvironmentUserSessionNameTemplate; - } - - private static function getProjectEnvironmentUserSessionContextNameTemplate() - { - if (self::$projectEnvironmentUserSessionContextNameTemplate == null) { - self::$projectEnvironmentUserSessionContextNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}'); - } - - return self::$projectEnvironmentUserSessionContextNameTemplate; - } - - private static function getProjectLocationEnvironmentUserSessionNameTemplate() - { - if (self::$projectLocationEnvironmentUserSessionNameTemplate == null) { - self::$projectLocationEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}'); - } - - return self::$projectLocationEnvironmentUserSessionNameTemplate; - } - - private static function getProjectLocationEnvironmentUserSessionContextNameTemplate() - { - if (self::$projectLocationEnvironmentUserSessionContextNameTemplate == null) { - self::$projectLocationEnvironmentUserSessionContextNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}'); - } - - return self::$projectLocationEnvironmentUserSessionContextNameTemplate; - } - - private static function getProjectLocationSessionNameTemplate() - { - if (self::$projectLocationSessionNameTemplate == null) { - self::$projectLocationSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}'); - } - - return self::$projectLocationSessionNameTemplate; - } - - private static function getProjectLocationSessionContextNameTemplate() - { - if (self::$projectLocationSessionContextNameTemplate == null) { - self::$projectLocationSessionContextNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}'); - } - - return self::$projectLocationSessionContextNameTemplate; - } - - private static function getProjectSessionNameTemplate() - { - if (self::$projectSessionNameTemplate == null) { - self::$projectSessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); - } - - return self::$projectSessionNameTemplate; - } - - private static function getProjectSessionContextNameTemplate() - { - if (self::$projectSessionContextNameTemplate == null) { - self::$projectSessionContextNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}/contexts/{context}'); - } - - return self::$projectSessionContextNameTemplate; - } - - private static function getSessionNameTemplate() - { - if (self::$sessionNameTemplate == null) { - self::$sessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); - } - - return self::$sessionNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'context' => self::getContextNameTemplate(), - 'projectEnvironmentUserSession' => self::getProjectEnvironmentUserSessionNameTemplate(), - 'projectEnvironmentUserSessionContext' => self::getProjectEnvironmentUserSessionContextNameTemplate(), - 'projectLocationEnvironmentUserSession' => self::getProjectLocationEnvironmentUserSessionNameTemplate(), - 'projectLocationEnvironmentUserSessionContext' => self::getProjectLocationEnvironmentUserSessionContextNameTemplate(), - 'projectLocationSession' => self::getProjectLocationSessionNameTemplate(), - 'projectLocationSessionContext' => self::getProjectLocationSessionContextNameTemplate(), - 'projectSession' => self::getProjectSessionNameTemplate(), - 'projectSessionContext' => self::getProjectSessionContextNameTemplate(), - 'session' => self::getSessionNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a context - * resource. - * - * @param string $project - * @param string $session - * @param string $context - * - * @return string The formatted context resource. - */ - public static function contextName($project, $session, $context) - { - return self::getContextNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - 'context' => $context, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_environment_user_session resource. - * - * @param string $project - * @param string $environment - * @param string $user - * @param string $session - * - * @return string The formatted project_environment_user_session resource. - */ - public static function projectEnvironmentUserSessionName($project, $environment, $user, $session) - { - return self::getProjectEnvironmentUserSessionNameTemplate()->render([ - 'project' => $project, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_environment_user_session_context resource. - * - * @param string $project - * @param string $environment - * @param string $user - * @param string $session - * @param string $context - * - * @return string The formatted project_environment_user_session_context resource. - */ - public static function projectEnvironmentUserSessionContextName($project, $environment, $user, $session, $context) - { - return self::getProjectEnvironmentUserSessionContextNameTemplate()->render([ - 'project' => $project, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - 'context' => $context, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_environment_user_session resource. - * - * @param string $project - * @param string $location - * @param string $environment - * @param string $user - * @param string $session - * - * @return string The formatted project_location_environment_user_session resource. - */ - public static function projectLocationEnvironmentUserSessionName($project, $location, $environment, $user, $session) - { - return self::getProjectLocationEnvironmentUserSessionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_environment_user_session_context resource. - * - * @param string $project - * @param string $location - * @param string $environment - * @param string $user - * @param string $session - * @param string $context - * - * @return string The formatted project_location_environment_user_session_context resource. - */ - public static function projectLocationEnvironmentUserSessionContextName($project, $location, $environment, $user, $session, $context) - { - return self::getProjectLocationEnvironmentUserSessionContextNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - 'context' => $context, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_session resource. - * - * @param string $project - * @param string $location - * @param string $session - * - * @return string The formatted project_location_session resource. - */ - public static function projectLocationSessionName($project, $location, $session) - { - return self::getProjectLocationSessionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_session_context resource. - * - * @param string $project - * @param string $location - * @param string $session - * @param string $context - * - * @return string The formatted project_location_session_context resource. - */ - public static function projectLocationSessionContextName($project, $location, $session, $context) - { - return self::getProjectLocationSessionContextNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - 'context' => $context, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_session resource. - * - * @param string $project - * @param string $session - * - * @return string The formatted project_session resource. - */ - public static function projectSessionName($project, $session) - { - return self::getProjectSessionNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_session_context resource. - * - * @param string $project - * @param string $session - * @param string $context - * - * @return string The formatted project_session_context resource. - */ - public static function projectSessionContextName($project, $session, $context) - { - return self::getProjectSessionContextNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - 'context' => $context, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a session - * resource. - * - * @param string $project - * @param string $session - * - * @return string The formatted session resource. - */ - public static function sessionName($project, $session) - { - return self::getSessionNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - context: projects/{project}/agent/sessions/{session}/contexts/{context} - * - projectEnvironmentUserSession: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session} - * - projectEnvironmentUserSessionContext: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context} - * - projectLocationEnvironmentUserSession: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session} - * - projectLocationEnvironmentUserSessionContext: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context} - * - projectLocationSession: projects/{project}/locations/{location}/agent/sessions/{session} - * - projectLocationSessionContext: projects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context} - * - projectSession: projects/{project}/agent/sessions/{session} - * - projectSessionContext: projects/{project}/agent/sessions/{session}/contexts/{context} - * - session: projects/{project}/agent/sessions/{session} - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Creates a context. - * - * If the specified context already exists, overrides the context. - * - * Sample code: - * ``` - * $contextsClient = new ContextsClient(); - * try { - * $formattedParent = $contextsClient->sessionName('[PROJECT]', '[SESSION]'); - * $context = new Context(); - * $response = $contextsClient->createContext($formattedParent, $context); - * } finally { - * $contextsClient->close(); - * } - * ``` - * - * @param string $parent Required. The session to create a context for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @param Context $context Required. The context 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\Dialogflow\V2\Context - * - * @throws ApiException if the remote call fails - */ - public function createContext($parent, $context, array $optionalArgs = []) - { - $request = new CreateContextRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setContext($context); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateContext', Context::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes all active contexts in the specified session. - * - * Sample code: - * ``` - * $contextsClient = new ContextsClient(); - * try { - * $formattedParent = $contextsClient->sessionName('[PROJECT]', '[SESSION]'); - * $contextsClient->deleteAllContexts($formattedParent); - * } finally { - * $contextsClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the session to delete all contexts from. Format: - * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified we assume default 'draft' environment. - * If `User ID` is not specified, we assume default '-' user. - * @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 deleteAllContexts($parent, array $optionalArgs = []) - { - $request = new DeleteAllContextsRequest(); - $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('DeleteAllContexts', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified context. - * - * Sample code: - * ``` - * $contextsClient = new ContextsClient(); - * try { - * $formattedName = $contextsClient->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); - * $contextsClient->deleteContext($formattedName); - * } finally { - * $contextsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the context to delete. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @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 deleteContext($name, array $optionalArgs = []) - { - $request = new DeleteContextRequest(); - $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('DeleteContext', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the specified context. - * - * Sample code: - * ``` - * $contextsClient = new ContextsClient(); - * try { - * $formattedName = $contextsClient->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); - * $response = $contextsClient->getContext($formattedName); - * } finally { - * $contextsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the context. Format: - * `projects//agent/sessions//contexts/` - * or `projects//agent/environments//users//sessions//contexts/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @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\Dialogflow\V2\Context - * - * @throws ApiException if the remote call fails - */ - public function getContext($name, array $optionalArgs = []) - { - $request = new GetContextRequest(); - $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('GetContext', Context::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all contexts in the specified session. - * - * Sample code: - * ``` - * $contextsClient = new ContextsClient(); - * try { - * $formattedParent = $contextsClient->sessionName('[PROJECT]', '[SESSION]'); - * // Iterate over pages of elements - * $pagedResponse = $contextsClient->listContexts($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contextsClient->listContexts($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contextsClient->close(); - * } - * ``` - * - * @param string $parent Required. The session to list all contexts from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @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 listContexts($parent, array $optionalArgs = []) - { - $request = new ListContextsRequest(); - $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('ListContexts', $optionalArgs, ListContextsResponse::class, $request); - } - - /** - * Updates the specified context. - * - * Sample code: - * ``` - * $contextsClient = new ContextsClient(); - * try { - * $context = new Context(); - * $response = $contextsClient->updateContext($context); - * } finally { - * $contextsClient->close(); - * } - * ``` - * - * @param Context $context Required. The context to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. The mask to control which fields get 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\Dialogflow\V2\Context - * - * @throws ApiException if the remote call fails - */ - public function updateContext($context, array $optionalArgs = []) - { - $request = new UpdateContextRequest(); - $requestParamHeaders = []; - $request->setContext($context); - $requestParamHeaders['context.name'] = $context->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('UpdateContext', Context::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $contextsClient = new ContextsClient(); - * try { - * $response = $contextsClient->getLocation(); - * } finally { - * $contextsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $contextsClient = new ContextsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $contextsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contextsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contextsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationDatasetsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationDatasetsGapicClient.php deleted file mode 100644 index 68607280054e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationDatasetsGapicClient.php +++ /dev/null @@ -1,813 +0,0 @@ -createConversationDataset($parent, $conversationDataset); - * $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 = $conversationDatasetsClient->createConversationDataset($parent, $conversationDataset); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationDatasetsClient->resumeOperation($operationName, 'createConversationDataset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationDatasetsClient->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. - */ -class ConversationDatasetsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.ConversationDatasets'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $conversationDatasetNameTemplate; - - private static $locationNameTemplate; - - 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/conversation_datasets_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/conversation_datasets_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/conversation_datasets_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/conversation_datasets_rest_client_config.php', - ], - ], - ]; - } - - private static function getConversationDatasetNameTemplate() - { - if (self::$conversationDatasetNameTemplate == null) { - self::$conversationDatasetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationDatasets/{conversation_dataset}'); - } - - return self::$conversationDatasetNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'conversationDataset' => self::getConversationDatasetNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * conversation_dataset resource. - * - * @param string $project - * @param string $location - * @param string $conversationDataset - * - * @return string The formatted conversation_dataset resource. - */ - public static function conversationDatasetName($project, $location, $conversationDataset) - { - return self::getConversationDatasetNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation_dataset' => $conversationDataset, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - conversationDataset: projects/{project}/locations/{location}/conversationDatasets/{conversation_dataset} - * - location: projects/{project}/locations/{location} - * - * 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 'dialogflow.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); - } - - /** - * Creates a new conversation dataset. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata] - * - `response`: - * [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset] - * - * Sample code: - * ``` - * $conversationDatasetsClient = new ConversationDatasetsClient(); - * try { - * $parent = 'parent'; - * $conversationDataset = new ConversationDataset(); - * $operationResponse = $conversationDatasetsClient->createConversationDataset($parent, $conversationDataset); - * $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 = $conversationDatasetsClient->createConversationDataset($parent, $conversationDataset); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationDatasetsClient->resumeOperation($operationName, 'createConversationDataset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationDatasetsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to create conversation dataset for. Format: - * `projects//locations/` - * @param ConversationDataset $conversationDataset Required. The conversation dataset 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 createConversationDataset($parent, $conversationDataset, array $optionalArgs = []) - { - $request = new CreateConversationDatasetRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setConversationDataset($conversationDataset); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateConversationDataset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes the specified conversation dataset. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Sample code: - * ``` - * $conversationDatasetsClient = new ConversationDatasetsClient(); - * try { - * $formattedName = $conversationDatasetsClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); - * $operationResponse = $conversationDatasetsClient->deleteConversationDataset($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 = $conversationDatasetsClient->deleteConversationDataset($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationDatasetsClient->resumeOperation($operationName, 'deleteConversationDataset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationDatasetsClient->close(); - * } - * ``` - * - * @param string $name Required. The conversation dataset to delete. Format: - * `projects//locations//conversationDatasets/` - * @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 deleteConversationDataset($name, array $optionalArgs = []) - { - $request = new DeleteConversationDatasetRequest(); - $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('DeleteConversationDataset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves the specified conversation dataset. - * - * Sample code: - * ``` - * $conversationDatasetsClient = new ConversationDatasetsClient(); - * try { - * $formattedName = $conversationDatasetsClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); - * $response = $conversationDatasetsClient->getConversationDataset($formattedName); - * } finally { - * $conversationDatasetsClient->close(); - * } - * ``` - * - * @param string $name Required. The conversation dataset to retrieve. Format: - * `projects//locations//conversationDatasets/` - * @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\Dialogflow\V2\ConversationDataset - * - * @throws ApiException if the remote call fails - */ - public function getConversationDataset($name, array $optionalArgs = []) - { - $request = new GetConversationDatasetRequest(); - $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('GetConversationDataset', ConversationDataset::class, $optionalArgs, $request)->wait(); - } - - /** - * Import data into the specified conversation dataset. Note that it - * is not allowed to import data to a conversation dataset that - * already has data in it. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata] - * - `response`: - * [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse] - * - * Sample code: - * ``` - * $conversationDatasetsClient = new ConversationDatasetsClient(); - * try { - * $formattedName = $conversationDatasetsClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); - * $inputConfig = new InputConfig(); - * $operationResponse = $conversationDatasetsClient->importConversationData($formattedName, $inputConfig); - * $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 = $conversationDatasetsClient->importConversationData($formattedName, $inputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationDatasetsClient->resumeOperation($operationName, 'importConversationData'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationDatasetsClient->close(); - * } - * ``` - * - * @param string $name Required. Dataset resource name. Format: - * `projects//locations//conversationDatasets/` - * @param InputConfig $inputConfig Required. Configuration describing where to import data from. - * @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 importConversationData($name, $inputConfig, array $optionalArgs = []) - { - $request = new ImportConversationDataRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setInputConfig($inputConfig); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportConversationData', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Returns the list of all conversation datasets in the specified - * project and location. - * - * Sample code: - * ``` - * $conversationDatasetsClient = new ConversationDatasetsClient(); - * try { - * $formattedParent = $conversationDatasetsClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $conversationDatasetsClient->listConversationDatasets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationDatasetsClient->listConversationDatasets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationDatasetsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location name to list all conversation datasets - * for. Format: `projects//locations/` - * @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 listConversationDatasets($parent, array $optionalArgs = []) - { - $request = new ListConversationDatasetsRequest(); - $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('ListConversationDatasets', $optionalArgs, ListConversationDatasetsResponse::class, $request); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $conversationDatasetsClient = new ConversationDatasetsClient(); - * try { - * $response = $conversationDatasetsClient->getLocation(); - * } finally { - * $conversationDatasetsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $conversationDatasetsClient = new ConversationDatasetsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $conversationDatasetsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationDatasetsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationDatasetsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationModelsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationModelsGapicClient.php deleted file mode 100644 index d4f950b4e5eb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationModelsGapicClient.php +++ /dev/null @@ -1,1193 +0,0 @@ -createConversationModel($conversationModel); - * $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 = $conversationModelsClient->createConversationModel($conversationModel); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'createConversationModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationModelsClient->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. - */ -class ConversationModelsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.ConversationModels'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $conversationModelNameTemplate; - - private static $conversationModelEvaluationNameTemplate; - - private static $projectConversationModelNameTemplate; - - private static $projectConversationModelEvaluationNameTemplate; - - private static $projectLocationConversationModelNameTemplate; - - private static $projectLocationConversationModelEvaluationNameTemplate; - - 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/conversation_models_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/conversation_models_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/conversation_models_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/conversation_models_rest_client_config.php', - ], - ], - ]; - } - - private static function getConversationModelNameTemplate() - { - if (self::$conversationModelNameTemplate == null) { - self::$conversationModelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationModels/{conversation_model}'); - } - - return self::$conversationModelNameTemplate; - } - - private static function getConversationModelEvaluationNameTemplate() - { - if (self::$conversationModelEvaluationNameTemplate == null) { - self::$conversationModelEvaluationNameTemplate = new PathTemplate('projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation}'); - } - - return self::$conversationModelEvaluationNameTemplate; - } - - private static function getProjectConversationModelNameTemplate() - { - if (self::$projectConversationModelNameTemplate == null) { - self::$projectConversationModelNameTemplate = new PathTemplate('projects/{project}/conversationModels/{conversation_model}'); - } - - return self::$projectConversationModelNameTemplate; - } - - private static function getProjectConversationModelEvaluationNameTemplate() - { - if (self::$projectConversationModelEvaluationNameTemplate == null) { - self::$projectConversationModelEvaluationNameTemplate = new PathTemplate('projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation}'); - } - - return self::$projectConversationModelEvaluationNameTemplate; - } - - private static function getProjectLocationConversationModelNameTemplate() - { - if (self::$projectLocationConversationModelNameTemplate == null) { - self::$projectLocationConversationModelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationModels/{conversation_model}'); - } - - return self::$projectLocationConversationModelNameTemplate; - } - - private static function getProjectLocationConversationModelEvaluationNameTemplate() - { - if (self::$projectLocationConversationModelEvaluationNameTemplate == null) { - self::$projectLocationConversationModelEvaluationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation}'); - } - - return self::$projectLocationConversationModelEvaluationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'conversationModel' => self::getConversationModelNameTemplate(), - 'conversationModelEvaluation' => self::getConversationModelEvaluationNameTemplate(), - 'projectConversationModel' => self::getProjectConversationModelNameTemplate(), - 'projectConversationModelEvaluation' => self::getProjectConversationModelEvaluationNameTemplate(), - 'projectLocationConversationModel' => self::getProjectLocationConversationModelNameTemplate(), - 'projectLocationConversationModelEvaluation' => self::getProjectLocationConversationModelEvaluationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * conversation_model resource. - * - * @param string $project - * @param string $location - * @param string $conversationModel - * - * @return string The formatted conversation_model resource. - */ - public static function conversationModelName($project, $location, $conversationModel) - { - return self::getConversationModelNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation_model' => $conversationModel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * conversation_model_evaluation resource. - * - * @param string $project - * @param string $conversationModel - * @param string $evaluation - * - * @return string The formatted conversation_model_evaluation resource. - */ - public static function conversationModelEvaluationName($project, $conversationModel, $evaluation) - { - return self::getConversationModelEvaluationNameTemplate()->render([ - 'project' => $project, - 'conversation_model' => $conversationModel, - 'evaluation' => $evaluation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_conversation_model resource. - * - * @param string $project - * @param string $conversationModel - * - * @return string The formatted project_conversation_model resource. - */ - public static function projectConversationModelName($project, $conversationModel) - { - return self::getProjectConversationModelNameTemplate()->render([ - 'project' => $project, - 'conversation_model' => $conversationModel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_conversation_model_evaluation resource. - * - * @param string $project - * @param string $conversationModel - * @param string $evaluation - * - * @return string The formatted project_conversation_model_evaluation resource. - */ - public static function projectConversationModelEvaluationName($project, $conversationModel, $evaluation) - { - return self::getProjectConversationModelEvaluationNameTemplate()->render([ - 'project' => $project, - 'conversation_model' => $conversationModel, - 'evaluation' => $evaluation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_conversation_model resource. - * - * @param string $project - * @param string $location - * @param string $conversationModel - * - * @return string The formatted project_location_conversation_model resource. - */ - public static function projectLocationConversationModelName($project, $location, $conversationModel) - { - return self::getProjectLocationConversationModelNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation_model' => $conversationModel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_conversation_model_evaluation resource. - * - * @param string $project - * @param string $location - * @param string $conversationModel - * @param string $evaluation - * - * @return string The formatted project_location_conversation_model_evaluation resource. - */ - public static function projectLocationConversationModelEvaluationName($project, $location, $conversationModel, $evaluation) - { - return self::getProjectLocationConversationModelEvaluationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation_model' => $conversationModel, - 'evaluation' => $evaluation, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - conversationModel: projects/{project}/locations/{location}/conversationModels/{conversation_model} - * - conversationModelEvaluation: projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation} - * - projectConversationModel: projects/{project}/conversationModels/{conversation_model} - * - projectConversationModelEvaluation: projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation} - * - projectLocationConversationModel: projects/{project}/locations/{location}/conversationModels/{conversation_model} - * - projectLocationConversationModelEvaluation: projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation} - * - * 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 'dialogflow.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); - } - - /** - * Creates a model. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata] - * - `response`: - * [ConversationModel][google.cloud.dialogflow.v2.ConversationModel] - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $conversationModel = new ConversationModel(); - * $operationResponse = $conversationModelsClient->createConversationModel($conversationModel); - * $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 = $conversationModelsClient->createConversationModel($conversationModel); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'createConversationModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param ConversationModel $conversationModel Required. The conversation model to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * The project to create conversation model for. Format: - * `projects/` - * @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 createConversationModel($conversationModel, array $optionalArgs = []) - { - $request = new CreateConversationModelRequest(); - $requestParamHeaders = []; - $request->setConversationModel($conversationModel); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateConversationModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates evaluation of a conversation model. - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $formattedParent = $conversationModelsClient->conversationModelName('[PROJECT]', '[LOCATION]', '[CONVERSATION_MODEL]'); - * $conversationModelEvaluation = new ConversationModelEvaluation(); - * $operationResponse = $conversationModelsClient->createConversationModelEvaluation($formattedParent, $conversationModelEvaluation); - * $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 = $conversationModelsClient->createConversationModelEvaluation($formattedParent, $conversationModelEvaluation); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'createConversationModelEvaluation'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param string $parent Required. The conversation model resource name. Format: - * `projects//locations//conversationModels/` - * @param ConversationModelEvaluation $conversationModelEvaluation Required. The conversation model evaluation to be created. - * @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 createConversationModelEvaluation($parent, $conversationModelEvaluation, array $optionalArgs = []) - { - $request = new CreateConversationModelEvaluationRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setConversationModelEvaluation($conversationModelEvaluation); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateConversationModelEvaluation', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a model. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $name = 'name'; - * $operationResponse = $conversationModelsClient->deleteConversationModel($name); - * $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 = $conversationModelsClient->deleteConversationModel($name); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'deleteConversationModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param string $name Required. The conversation model to delete. Format: - * `projects//conversationModels/` - * @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 deleteConversationModel($name, array $optionalArgs = []) - { - $request = new DeleteConversationModelRequest(); - $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('DeleteConversationModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deploys a model. If a model is already deployed, deploying it - * has no effect. A model can only serve prediction requests after it gets - * deployed. For article suggestion, custom model will not be used unless - * it is deployed. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $name = 'name'; - * $operationResponse = $conversationModelsClient->deployConversationModel($name); - * $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 = $conversationModelsClient->deployConversationModel($name); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'deployConversationModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param string $name Required. The conversation model to deploy. Format: - * `projects//conversationModels/` - * @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 deployConversationModel($name, array $optionalArgs = []) - { - $request = new DeployConversationModelRequest(); - $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('DeployConversationModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets conversation model. - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $name = 'name'; - * $response = $conversationModelsClient->getConversationModel($name); - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param string $name Required. The conversation model to retrieve. Format: - * `projects//conversationModels/` - * @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\Dialogflow\V2\ConversationModel - * - * @throws ApiException if the remote call fails - */ - public function getConversationModel($name, array $optionalArgs = []) - { - $request = new GetConversationModelRequest(); - $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('GetConversationModel', ConversationModel::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets an evaluation of conversation model. - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $name = 'name'; - * $response = $conversationModelsClient->getConversationModelEvaluation($name); - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param string $name Required. The conversation model evaluation resource name. Format: - * `projects//conversationModels//evaluations/` - * @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\Dialogflow\V2\ConversationModelEvaluation - * - * @throws ApiException if the remote call fails - */ - public function getConversationModelEvaluation($name, array $optionalArgs = []) - { - $request = new GetConversationModelEvaluationRequest(); - $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('GetConversationModelEvaluation', ConversationModelEvaluation::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists evaluations of a conversation model. - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $conversationModelsClient->listConversationModelEvaluations($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationModelsClient->listConversationModelEvaluations($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param string $parent Required. The conversation model resource name. Format: - * `projects//conversationModels/` - * @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 listConversationModelEvaluations($parent, array $optionalArgs = []) - { - $request = new ListConversationModelEvaluationsRequest(); - $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('ListConversationModelEvaluations', $optionalArgs, ListConversationModelEvaluationsResponse::class, $request); - } - - /** - * Lists conversation models. - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $conversationModelsClient->listConversationModels($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationModelsClient->listConversationModels($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to list all conversation models for. - * Format: `projects/` - * @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 listConversationModels($parent, array $optionalArgs = []) - { - $request = new ListConversationModelsRequest(); - $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('ListConversationModels', $optionalArgs, ListConversationModelsResponse::class, $request); - } - - /** - * Undeploys a model. If the model is not deployed this method has no effect. - * If the model is currently being used: - * - For article suggestion, article suggestion will fallback to the default - * model if model is undeployed. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $name = 'name'; - * $operationResponse = $conversationModelsClient->undeployConversationModel($name); - * $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 = $conversationModelsClient->undeployConversationModel($name); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationModelsClient->resumeOperation($operationName, 'undeployConversationModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param string $name Required. The conversation model to undeploy. Format: - * `projects//conversationModels/` - * @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 undeployConversationModel($name, array $optionalArgs = []) - { - $request = new UndeployConversationModelRequest(); - $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('UndeployConversationModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * $response = $conversationModelsClient->getLocation(); - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $conversationModelsClient = new ConversationModelsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $conversationModelsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationModelsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationModelsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationProfilesGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationProfilesGapicClient.php deleted file mode 100644 index a3d5d0578f1a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationProfilesGapicClient.php +++ /dev/null @@ -1,1015 +0,0 @@ -clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); - * $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 = $conversationProfilesClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationProfilesClient->resumeOperation($operationName, 'clearSuggestionFeatureConfig'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationProfilesClient->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. - */ -class ConversationProfilesGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.ConversationProfiles'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $cXSecuritySettingsNameTemplate; - - private static $conversationProfileNameTemplate; - - private static $locationNameTemplate; - - private static $projectNameTemplate; - - private static $projectConversationProfileNameTemplate; - - private static $projectLocationConversationProfileNameTemplate; - - 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/conversation_profiles_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/conversation_profiles_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/conversation_profiles_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/conversation_profiles_rest_client_config.php', - ], - ], - ]; - } - - private static function getCXSecuritySettingsNameTemplate() - { - if (self::$cXSecuritySettingsNameTemplate == null) { - self::$cXSecuritySettingsNameTemplate = new PathTemplate('projects/{project}/locations/{location}/securitySettings/{security_settings}'); - } - - return self::$cXSecuritySettingsNameTemplate; - } - - private static function getConversationProfileNameTemplate() - { - if (self::$conversationProfileNameTemplate == null) { - self::$conversationProfileNameTemplate = new PathTemplate('projects/{project}/conversationProfiles/{conversation_profile}'); - } - - return self::$conversationProfileNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectConversationProfileNameTemplate() - { - if (self::$projectConversationProfileNameTemplate == null) { - self::$projectConversationProfileNameTemplate = new PathTemplate('projects/{project}/conversationProfiles/{conversation_profile}'); - } - - return self::$projectConversationProfileNameTemplate; - } - - private static function getProjectLocationConversationProfileNameTemplate() - { - if (self::$projectLocationConversationProfileNameTemplate == null) { - self::$projectLocationConversationProfileNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}'); - } - - return self::$projectLocationConversationProfileNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'cXSecuritySettings' => self::getCXSecuritySettingsNameTemplate(), - 'conversationProfile' => self::getConversationProfileNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectConversationProfile' => self::getProjectConversationProfileNameTemplate(), - 'projectLocationConversationProfile' => self::getProjectLocationConversationProfileNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cx_security_settings resource. - * - * @param string $project - * @param string $location - * @param string $securitySettings - * - * @return string The formatted cx_security_settings resource. - */ - public static function cXSecuritySettingsName($project, $location, $securitySettings) - { - return self::getCXSecuritySettingsNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'security_settings' => $securitySettings, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * conversation_profile resource. - * - * @param string $project - * @param string $conversationProfile - * - * @return string The formatted conversation_profile resource. - */ - public static function conversationProfileName($project, $conversationProfile) - { - return self::getConversationProfileNameTemplate()->render([ - 'project' => $project, - 'conversation_profile' => $conversationProfile, - ]); - } - - /** - * 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 project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_conversation_profile resource. - * - * @param string $project - * @param string $conversationProfile - * - * @return string The formatted project_conversation_profile resource. - */ - public static function projectConversationProfileName($project, $conversationProfile) - { - return self::getProjectConversationProfileNameTemplate()->render([ - 'project' => $project, - 'conversation_profile' => $conversationProfile, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_conversation_profile resource. - * - * @param string $project - * @param string $location - * @param string $conversationProfile - * - * @return string The formatted project_location_conversation_profile resource. - */ - public static function projectLocationConversationProfileName($project, $location, $conversationProfile) - { - return self::getProjectLocationConversationProfileNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation_profile' => $conversationProfile, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cXSecuritySettings: projects/{project}/locations/{location}/securitySettings/{security_settings} - * - conversationProfile: projects/{project}/conversationProfiles/{conversation_profile} - * - location: projects/{project}/locations/{location} - * - project: projects/{project} - * - projectConversationProfile: projects/{project}/conversationProfiles/{conversation_profile} - * - projectLocationConversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} - * - * 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 'dialogflow.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); - } - - /** - * Clears a suggestion feature from a conversation profile for the given - * participant role. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata] - * - `response`: - * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] - * - * Sample code: - * ``` - * $conversationProfilesClient = new ConversationProfilesClient(); - * try { - * $conversationProfile = 'conversation_profile'; - * $participantRole = Role::ROLE_UNSPECIFIED; - * $suggestionFeatureType = Type::TYPE_UNSPECIFIED; - * $operationResponse = $conversationProfilesClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); - * $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 = $conversationProfilesClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationProfilesClient->resumeOperation($operationName, 'clearSuggestionFeatureConfig'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationProfilesClient->close(); - * } - * ``` - * - * @param string $conversationProfile Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * @param int $participantRole Required. The participant role to remove the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\Participant\Role} - * @param int $suggestionFeatureType Required. The type of the suggestion feature to remove. - * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type} - * @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 clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType, array $optionalArgs = []) - { - $request = new ClearSuggestionFeatureConfigRequest(); - $requestParamHeaders = []; - $request->setConversationProfile($conversationProfile); - $request->setParticipantRole($participantRole); - $request->setSuggestionFeatureType($suggestionFeatureType); - $requestParamHeaders['conversation_profile'] = $conversationProfile; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ClearSuggestionFeatureConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a conversation profile in the specified project. - * - * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] - * aren't populated in the response. You can retrieve them via - * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] - * API. - * - * Sample code: - * ``` - * $conversationProfilesClient = new ConversationProfilesClient(); - * try { - * $formattedParent = $conversationProfilesClient->projectName('[PROJECT]'); - * $conversationProfile = new ConversationProfile(); - * $response = $conversationProfilesClient->createConversationProfile($formattedParent, $conversationProfile); - * } finally { - * $conversationProfilesClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to create a conversation profile for. - * Format: `projects//locations/`. - * @param ConversationProfile $conversationProfile Required. The conversation profile 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\Dialogflow\V2\ConversationProfile - * - * @throws ApiException if the remote call fails - */ - public function createConversationProfile($parent, $conversationProfile, array $optionalArgs = []) - { - $request = new CreateConversationProfileRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setConversationProfile($conversationProfile); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateConversationProfile', ConversationProfile::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified conversation profile. - * - * Sample code: - * ``` - * $conversationProfilesClient = new ConversationProfilesClient(); - * try { - * $formattedName = $conversationProfilesClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); - * $conversationProfilesClient->deleteConversationProfile($formattedName); - * } finally { - * $conversationProfilesClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the conversation profile to delete. - * Format: `projects//locations//conversationProfiles/`. - * @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 deleteConversationProfile($name, array $optionalArgs = []) - { - $request = new DeleteConversationProfileRequest(); - $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('DeleteConversationProfile', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the specified conversation profile. - * - * Sample code: - * ``` - * $conversationProfilesClient = new ConversationProfilesClient(); - * try { - * $formattedName = $conversationProfilesClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); - * $response = $conversationProfilesClient->getConversationProfile($formattedName); - * } finally { - * $conversationProfilesClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the conversation profile. - * Format: `projects//locations//conversationProfiles/`. - * @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\Dialogflow\V2\ConversationProfile - * - * @throws ApiException if the remote call fails - */ - public function getConversationProfile($name, array $optionalArgs = []) - { - $request = new GetConversationProfileRequest(); - $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('GetConversationProfile', ConversationProfile::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all conversation profiles in the specified project. - * - * Sample code: - * ``` - * $conversationProfilesClient = new ConversationProfilesClient(); - * try { - * $formattedParent = $conversationProfilesClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $conversationProfilesClient->listConversationProfiles($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationProfilesClient->listConversationProfiles($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationProfilesClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to list all conversation profiles from. - * Format: `projects//locations/`. - * @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 listConversationProfiles($parent, array $optionalArgs = []) - { - $request = new ListConversationProfilesRequest(); - $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('ListConversationProfiles', $optionalArgs, ListConversationProfilesResponse::class, $request); - } - - /** - * Adds or updates a suggestion feature in a conversation profile. - * If the conversation profile contains the type of suggestion feature for - * the participant role, it will update it. Otherwise it will insert the - * suggestion feature. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata] - * - `response`: - * [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] - * - * If a long running operation to add or update suggestion feature - * config for the same conversation profile, participant role and suggestion - * feature type exists, please cancel the existing long running operation - * before sending such request, otherwise the request will be rejected. - * - * Sample code: - * ``` - * $conversationProfilesClient = new ConversationProfilesClient(); - * try { - * $conversationProfile = 'conversation_profile'; - * $participantRole = Role::ROLE_UNSPECIFIED; - * $suggestionFeatureConfig = new SuggestionFeatureConfig(); - * $operationResponse = $conversationProfilesClient->setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig); - * $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 = $conversationProfilesClient->setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $conversationProfilesClient->resumeOperation($operationName, 'setSuggestionFeatureConfig'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $conversationProfilesClient->close(); - * } - * ``` - * - * @param string $conversationProfile Required. The Conversation Profile to add or update the suggestion feature - * config. Format: `projects//locations//conversationProfiles/`. - * @param int $participantRole Required. The participant role to add or update the suggestion feature - * config. Only HUMAN_AGENT or END_USER can be used. - * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\Participant\Role} - * @param SuggestionFeatureConfig $suggestionFeatureConfig Required. The suggestion feature config to add or update. - * @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 setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig, array $optionalArgs = []) - { - $request = new SetSuggestionFeatureConfigRequest(); - $requestParamHeaders = []; - $request->setConversationProfile($conversationProfile); - $request->setParticipantRole($participantRole); - $request->setSuggestionFeatureConfig($suggestionFeatureConfig); - $requestParamHeaders['conversation_profile'] = $conversationProfile; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('SetSuggestionFeatureConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the specified conversation profile. - * - * [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] - * aren't populated in the response. You can retrieve them via - * [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] - * API. - * - * Sample code: - * ``` - * $conversationProfilesClient = new ConversationProfilesClient(); - * try { - * $conversationProfile = new ConversationProfile(); - * $updateMask = new FieldMask(); - * $response = $conversationProfilesClient->updateConversationProfile($conversationProfile, $updateMask); - * } finally { - * $conversationProfilesClient->close(); - * } - * ``` - * - * @param ConversationProfile $conversationProfile Required. The conversation profile to update. - * @param FieldMask $updateMask Required. The mask to control which fields to update. - * @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\Dialogflow\V2\ConversationProfile - * - * @throws ApiException if the remote call fails - */ - public function updateConversationProfile($conversationProfile, $updateMask, array $optionalArgs = []) - { - $request = new UpdateConversationProfileRequest(); - $requestParamHeaders = []; - $request->setConversationProfile($conversationProfile); - $request->setUpdateMask($updateMask); - $requestParamHeaders['conversation_profile.name'] = $conversationProfile->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateConversationProfile', ConversationProfile::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $conversationProfilesClient = new ConversationProfilesClient(); - * try { - * $response = $conversationProfilesClient->getLocation(); - * } finally { - * $conversationProfilesClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $conversationProfilesClient = new ConversationProfilesClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $conversationProfilesClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationProfilesClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationProfilesClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationsGapicClient.php deleted file mode 100644 index a6b75df6c1b8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ConversationsGapicClient.php +++ /dev/null @@ -1,1086 +0,0 @@ -conversationName('[PROJECT]', '[CONVERSATION]'); - * $response = $conversationsClient->completeConversation($formattedName); - * } finally { - * $conversationsClient->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. - */ -class ConversationsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Conversations'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $conversationNameTemplate; - - private static $conversationProfileNameTemplate; - - private static $locationNameTemplate; - - private static $messageNameTemplate; - - private static $projectNameTemplate; - - private static $projectConversationNameTemplate; - - private static $projectConversationMessageNameTemplate; - - private static $projectConversationProfileNameTemplate; - - private static $projectLocationConversationNameTemplate; - - private static $projectLocationConversationMessageNameTemplate; - - private static $projectLocationConversationProfileNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/conversations_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/conversations_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/conversations_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/conversations_rest_client_config.php', - ], - ], - ]; - } - - private static function getConversationNameTemplate() - { - if (self::$conversationNameTemplate == null) { - self::$conversationNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}'); - } - - return self::$conversationNameTemplate; - } - - private static function getConversationProfileNameTemplate() - { - if (self::$conversationProfileNameTemplate == null) { - self::$conversationProfileNameTemplate = new PathTemplate('projects/{project}/conversationProfiles/{conversation_profile}'); - } - - return self::$conversationProfileNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getMessageNameTemplate() - { - if (self::$messageNameTemplate == null) { - self::$messageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); - } - - return self::$messageNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectConversationNameTemplate() - { - if (self::$projectConversationNameTemplate == null) { - self::$projectConversationNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}'); - } - - return self::$projectConversationNameTemplate; - } - - private static function getProjectConversationMessageNameTemplate() - { - if (self::$projectConversationMessageNameTemplate == null) { - self::$projectConversationMessageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); - } - - return self::$projectConversationMessageNameTemplate; - } - - private static function getProjectConversationProfileNameTemplate() - { - if (self::$projectConversationProfileNameTemplate == null) { - self::$projectConversationProfileNameTemplate = new PathTemplate('projects/{project}/conversationProfiles/{conversation_profile}'); - } - - return self::$projectConversationProfileNameTemplate; - } - - private static function getProjectLocationConversationNameTemplate() - { - if (self::$projectLocationConversationNameTemplate == null) { - self::$projectLocationConversationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}'); - } - - return self::$projectLocationConversationNameTemplate; - } - - private static function getProjectLocationConversationMessageNameTemplate() - { - if (self::$projectLocationConversationMessageNameTemplate == null) { - self::$projectLocationConversationMessageNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}'); - } - - return self::$projectLocationConversationMessageNameTemplate; - } - - private static function getProjectLocationConversationProfileNameTemplate() - { - if (self::$projectLocationConversationProfileNameTemplate == null) { - self::$projectLocationConversationProfileNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}'); - } - - return self::$projectLocationConversationProfileNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'conversation' => self::getConversationNameTemplate(), - 'conversationProfile' => self::getConversationProfileNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'message' => self::getMessageNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectConversation' => self::getProjectConversationNameTemplate(), - 'projectConversationMessage' => self::getProjectConversationMessageNameTemplate(), - 'projectConversationProfile' => self::getProjectConversationProfileNameTemplate(), - 'projectLocationConversation' => self::getProjectLocationConversationNameTemplate(), - 'projectLocationConversationMessage' => self::getProjectLocationConversationMessageNameTemplate(), - 'projectLocationConversationProfile' => self::getProjectLocationConversationProfileNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a conversation - * resource. - * - * @param string $project - * @param string $conversation - * - * @return string The formatted conversation resource. - */ - public static function conversationName($project, $conversation) - { - return self::getConversationNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * conversation_profile resource. - * - * @param string $project - * @param string $conversationProfile - * - * @return string The formatted conversation_profile resource. - */ - public static function conversationProfileName($project, $conversationProfile) - { - return self::getConversationProfileNameTemplate()->render([ - 'project' => $project, - 'conversation_profile' => $conversationProfile, - ]); - } - - /** - * 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 message - * resource. - * - * @param string $project - * @param string $conversation - * @param string $message - * - * @return string The formatted message resource. - */ - public static function messageName($project, $conversation, $message) - { - return self::getMessageNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - 'message' => $message, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_conversation resource. - * - * @param string $project - * @param string $conversation - * - * @return string The formatted project_conversation resource. - */ - public static function projectConversationName($project, $conversation) - { - return self::getProjectConversationNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_conversation_message resource. - * - * @param string $project - * @param string $conversation - * @param string $message - * - * @return string The formatted project_conversation_message resource. - */ - public static function projectConversationMessageName($project, $conversation, $message) - { - return self::getProjectConversationMessageNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - 'message' => $message, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_conversation_profile resource. - * - * @param string $project - * @param string $conversationProfile - * - * @return string The formatted project_conversation_profile resource. - */ - public static function projectConversationProfileName($project, $conversationProfile) - { - return self::getProjectConversationProfileNameTemplate()->render([ - 'project' => $project, - 'conversation_profile' => $conversationProfile, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_conversation resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * - * @return string The formatted project_location_conversation resource. - */ - public static function projectLocationConversationName($project, $location, $conversation) - { - return self::getProjectLocationConversationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_conversation_message resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * @param string $message - * - * @return string The formatted project_location_conversation_message resource. - */ - public static function projectLocationConversationMessageName($project, $location, $conversation, $message) - { - return self::getProjectLocationConversationMessageNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - 'message' => $message, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_conversation_profile resource. - * - * @param string $project - * @param string $location - * @param string $conversationProfile - * - * @return string The formatted project_location_conversation_profile resource. - */ - public static function projectLocationConversationProfileName($project, $location, $conversationProfile) - { - return self::getProjectLocationConversationProfileNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation_profile' => $conversationProfile, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - conversation: projects/{project}/conversations/{conversation} - * - conversationProfile: projects/{project}/conversationProfiles/{conversation_profile} - * - location: projects/{project}/locations/{location} - * - message: projects/{project}/conversations/{conversation}/messages/{message} - * - project: projects/{project} - * - projectConversation: projects/{project}/conversations/{conversation} - * - projectConversationMessage: projects/{project}/conversations/{conversation}/messages/{message} - * - projectConversationProfile: projects/{project}/conversationProfiles/{conversation_profile} - * - projectLocationConversation: projects/{project}/locations/{location}/conversations/{conversation} - * - projectLocationConversationMessage: projects/{project}/locations/{location}/conversations/{conversation}/messages/{message} - * - projectLocationConversationProfile: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Completes the specified conversation. Finished conversations are purged - * from the database after 30 days. - * - * Sample code: - * ``` - * $conversationsClient = new ConversationsClient(); - * try { - * $formattedName = $conversationsClient->conversationName('[PROJECT]', '[CONVERSATION]'); - * $response = $conversationsClient->completeConversation($formattedName); - * } finally { - * $conversationsClient->close(); - * } - * ``` - * - * @param string $name Required. Resource identifier of the conversation to close. - * Format: `projects//locations//conversations/`. - * @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\Dialogflow\V2\Conversation - * - * @throws ApiException if the remote call fails - */ - public function completeConversation($name, array $optionalArgs = []) - { - $request = new CompleteConversationRequest(); - $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('CompleteConversation', Conversation::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new conversation. Conversations are auto-completed after 24 - * hours. - * - * Conversation Lifecycle: - * There are two stages during a conversation: Automated Agent Stage and - * Assist Stage. - * - * For Automated Agent Stage, there will be a dialogflow agent responding to - * user queries. - * - * For Assist Stage, there's no dialogflow agent responding to user queries. - * But we will provide suggestions which are generated from conversation. - * - * If - * [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] - * is configured for a dialogflow agent, conversation will start from - * `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And - * during `Automated Agent Stage`, once an - * [Intent][google.cloud.dialogflow.v2.Intent] with - * [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] - * is triggered, conversation will transfer to Assist Stage. - * - * Sample code: - * ``` - * $conversationsClient = new ConversationsClient(); - * try { - * $formattedParent = $conversationsClient->projectName('[PROJECT]'); - * $conversation = new Conversation(); - * $response = $conversationsClient->createConversation($formattedParent, $conversation); - * } finally { - * $conversationsClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource identifier of the project creating the conversation. - * Format: `projects//locations/`. - * @param Conversation $conversation Required. The conversation to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $conversationId - * Optional. Identifier of the conversation. Generally it's auto generated by - * Google. Only set it if you cannot wait for the response to return a - * auto-generated one to you. - * - * The conversation ID must be compliant with the regression fomula - * "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. - * If the field is provided, the caller is resposible for - * 1. the uniqueness of the ID, otherwise the request will be rejected. - * 2. the consistency for whether to use custom ID or not under a project to - * better ensure uniqueness. - * @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\Dialogflow\V2\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(); - } - - /** - * Retrieves the specific conversation. - * - * Sample code: - * ``` - * $conversationsClient = new ConversationsClient(); - * try { - * $formattedName = $conversationsClient->conversationName('[PROJECT]', '[CONVERSATION]'); - * $response = $conversationsClient->getConversation($formattedName); - * } finally { - * $conversationsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the conversation. Format: - * `projects//locations//conversations/`. - * @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\Dialogflow\V2\Conversation - * - * @throws ApiException if the remote call fails - */ - public function getConversation($name, array $optionalArgs = []) - { - $request = new GetConversationRequest(); - $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('GetConversation', Conversation::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all conversations in the specified project. - * - * Sample code: - * ``` - * $conversationsClient = new ConversationsClient(); - * try { - * $formattedParent = $conversationsClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $conversationsClient->listConversations($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationsClient->listConversations($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project from which to list all conversation. - * Format: `projects//locations/`. - * @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 expression that filters conversations listed in the response. In - * general, the expression must specify the field name, a comparison operator, - * and the value to use for filtering: - *
    - *
  • The value must be a string, a number, or a boolean.
  • - *
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • - *
  • To filter on multiple expressions, separate the - * expressions with `AND` or `OR` (omitting both implies `AND`).
  • - *
  • For clarity, expressions can be enclosed in parentheses.
  • - *
- * Only `lifecycle_state` can be filtered on in this way. For example, - * the following expression only returns `COMPLETED` conversations: - * - * `lifecycle_state = "COMPLETED"` - * - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @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']); - } - - $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 messages that belong to a given conversation. - * `messages` are ordered by `create_time` in descending order. To fetch - * updates without duplication, send request with filter - * `create_time_epoch_microseconds > - * [first item's create_time of previous request]` and empty page_token. - * - * Sample code: - * ``` - * $conversationsClient = new ConversationsClient(); - * try { - * $formattedParent = $conversationsClient->conversationName('[PROJECT]', '[CONVERSATION]'); - * // Iterate over pages of elements - * $pagedResponse = $conversationsClient->listMessages($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationsClient->listMessages($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationsClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the conversation to list messages for. - * Format: `projects//locations//conversations/` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. Filter on message fields. Currently predicates on `create_time` - * and `create_time_epoch_microseconds` are supported. `create_time` only - * support milliseconds accuracy. E.g., - * `create_time_epoch_microseconds > 1551790877964485` or - * `create_time > 2017-01-15T01:30:15.01Z`. - * - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @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 listMessages($parent, array $optionalArgs = []) - { - $request = new ListMessagesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListMessages', $optionalArgs, ListMessagesResponse::class, $request); - } - - /** - * Suggests summary for a conversation based on specific historical messages. - * The range of the messages to be used for summary can be specified in the - * request. - * - * Sample code: - * ``` - * $conversationsClient = new ConversationsClient(); - * try { - * $formattedConversation = $conversationsClient->conversationName('[PROJECT]', '[CONVERSATION]'); - * $response = $conversationsClient->suggestConversationSummary($formattedConversation); - * } finally { - * $conversationsClient->close(); - * } - * ``` - * - * @param string $conversation Required. The conversation to fetch suggestion for. - * Format: `projects//locations//conversations/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $latestMessage - * The name of the latest conversation message used as context for - * compiling suggestion. If empty, the latest message of the conversation will - * be used. - * - * Format: `projects//locations//conversations//messages/`. - * @type int $contextSize - * Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 500 and at most 1000. - * @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\Dialogflow\V2\SuggestConversationSummaryResponse - * - * @throws ApiException if the remote call fails - */ - public function suggestConversationSummary($conversation, array $optionalArgs = []) - { - $request = new SuggestConversationSummaryRequest(); - $requestParamHeaders = []; - $request->setConversation($conversation); - $requestParamHeaders['conversation'] = $conversation; - if (isset($optionalArgs['latestMessage'])) { - $request->setLatestMessage($optionalArgs['latestMessage']); - } - - if (isset($optionalArgs['contextSize'])) { - $request->setContextSize($optionalArgs['contextSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SuggestConversationSummary', SuggestConversationSummaryResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $conversationsClient = new ConversationsClient(); - * try { - * $response = $conversationsClient->getLocation(); - * } finally { - * $conversationsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $conversationsClient = new ConversationsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $conversationsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $conversationsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $conversationsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/DocumentsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/DocumentsGapicClient.php deleted file mode 100644 index a39ea08f65fa..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/DocumentsGapicClient.php +++ /dev/null @@ -1,1266 +0,0 @@ -knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - * $document = new Document(); - * $operationResponse = $documentsClient->createDocument($formattedParent, $document); - * $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 = $documentsClient->createDocument($formattedParent, $document); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'createDocument'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $documentsClient->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. - */ -class DocumentsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Documents'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $documentNameTemplate; - - private static $knowledgeBaseNameTemplate; - - private static $projectKnowledgeBaseNameTemplate; - - private static $projectKnowledgeBaseDocumentNameTemplate; - - private static $projectLocationKnowledgeBaseNameTemplate; - - private static $projectLocationKnowledgeBaseDocumentNameTemplate; - - 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/documents_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/documents_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/documents_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/documents_rest_client_config.php', - ], - ], - ]; - } - - private static function getDocumentNameTemplate() - { - if (self::$documentNameTemplate == null) { - self::$documentNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}'); - } - - return self::$documentNameTemplate; - } - - private static function getKnowledgeBaseNameTemplate() - { - if (self::$knowledgeBaseNameTemplate == null) { - self::$knowledgeBaseNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}'); - } - - return self::$knowledgeBaseNameTemplate; - } - - private static function getProjectKnowledgeBaseNameTemplate() - { - if (self::$projectKnowledgeBaseNameTemplate == null) { - self::$projectKnowledgeBaseNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}'); - } - - return self::$projectKnowledgeBaseNameTemplate; - } - - private static function getProjectKnowledgeBaseDocumentNameTemplate() - { - if (self::$projectKnowledgeBaseDocumentNameTemplate == null) { - self::$projectKnowledgeBaseDocumentNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}'); - } - - return self::$projectKnowledgeBaseDocumentNameTemplate; - } - - private static function getProjectLocationKnowledgeBaseNameTemplate() - { - if (self::$projectLocationKnowledgeBaseNameTemplate == null) { - self::$projectLocationKnowledgeBaseNameTemplate = new PathTemplate('projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}'); - } - - return self::$projectLocationKnowledgeBaseNameTemplate; - } - - private static function getProjectLocationKnowledgeBaseDocumentNameTemplate() - { - if (self::$projectLocationKnowledgeBaseDocumentNameTemplate == null) { - self::$projectLocationKnowledgeBaseDocumentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document}'); - } - - return self::$projectLocationKnowledgeBaseDocumentNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'document' => self::getDocumentNameTemplate(), - 'knowledgeBase' => self::getKnowledgeBaseNameTemplate(), - 'projectKnowledgeBase' => self::getProjectKnowledgeBaseNameTemplate(), - 'projectKnowledgeBaseDocument' => self::getProjectKnowledgeBaseDocumentNameTemplate(), - 'projectLocationKnowledgeBase' => self::getProjectLocationKnowledgeBaseNameTemplate(), - 'projectLocationKnowledgeBaseDocument' => self::getProjectLocationKnowledgeBaseDocumentNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a document - * resource. - * - * @param string $project - * @param string $knowledgeBase - * @param string $document - * - * @return string The formatted document resource. - */ - public static function documentName($project, $knowledgeBase, $document) - { - return self::getDocumentNameTemplate()->render([ - 'project' => $project, - 'knowledge_base' => $knowledgeBase, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * knowledge_base resource. - * - * @param string $project - * @param string $knowledgeBase - * - * @return string The formatted knowledge_base resource. - */ - public static function knowledgeBaseName($project, $knowledgeBase) - { - return self::getKnowledgeBaseNameTemplate()->render([ - 'project' => $project, - 'knowledge_base' => $knowledgeBase, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_knowledge_base resource. - * - * @param string $project - * @param string $knowledgeBase - * - * @return string The formatted project_knowledge_base resource. - */ - public static function projectKnowledgeBaseName($project, $knowledgeBase) - { - return self::getProjectKnowledgeBaseNameTemplate()->render([ - 'project' => $project, - 'knowledge_base' => $knowledgeBase, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_knowledge_base_document resource. - * - * @param string $project - * @param string $knowledgeBase - * @param string $document - * - * @return string The formatted project_knowledge_base_document resource. - */ - public static function projectKnowledgeBaseDocumentName($project, $knowledgeBase, $document) - { - return self::getProjectKnowledgeBaseDocumentNameTemplate()->render([ - 'project' => $project, - 'knowledge_base' => $knowledgeBase, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_knowledge_base resource. - * - * @param string $project - * @param string $location - * @param string $knowledgeBase - * - * @return string The formatted project_location_knowledge_base resource. - */ - public static function projectLocationKnowledgeBaseName($project, $location, $knowledgeBase) - { - return self::getProjectLocationKnowledgeBaseNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'knowledge_base' => $knowledgeBase, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_knowledge_base_document resource. - * - * @param string $project - * @param string $location - * @param string $knowledgeBase - * @param string $document - * - * @return string The formatted project_location_knowledge_base_document resource. - */ - public static function projectLocationKnowledgeBaseDocumentName($project, $location, $knowledgeBase, $document) - { - return self::getProjectLocationKnowledgeBaseDocumentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'knowledge_base' => $knowledgeBase, - 'document' => $document, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - document: projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} - * - knowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} - * - projectKnowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} - * - projectKnowledgeBaseDocument: projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} - * - projectLocationKnowledgeBase: projects/{project}/locations/{location}/knowledgeBases/{knowledge_base} - * - projectLocationKnowledgeBaseDocument: projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document} - * - * 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 'dialogflow.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); - } - - /** - * Creates a new document. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [Document][google.cloud.dialogflow.v2.Document] - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * $formattedParent = $documentsClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - * $document = new Document(); - * $operationResponse = $documentsClient->createDocument($formattedParent, $document); - * $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 = $documentsClient->createDocument($formattedParent, $document); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'createDocument'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The knowledge base to create a document for. - * Format: `projects//locations//knowledgeBases/`. - * @param Document $document Required. The document 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 createDocument($parent, $document, array $optionalArgs = []) - { - $request = new CreateDocumentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDocument($document); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes the specified document. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * $formattedName = $documentsClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - * $operationResponse = $documentsClient->deleteDocument($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 = $documentsClient->deleteDocument($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'deleteDocument'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the document to delete. - * Format: `projects//locations//knowledgeBases//documents/`. - * @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 deleteDocument($name, array $optionalArgs = []) - { - $request = new DeleteDocumentRequest(); - $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('DeleteDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Exports a smart messaging candidate document into the specified - * destination. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [Document][google.cloud.dialogflow.v2.Document] - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * $formattedName = $documentsClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - * $operationResponse = $documentsClient->exportDocument($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 = $documentsClient->exportDocument($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'exportDocument'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the document to export. - * Format: `projects//locations//knowledgeBases//documents/`. - * @param array $optionalArgs { - * Optional. - * - * @type GcsDestination $gcsDestination - * Cloud Storage file path to export the document. - * @type bool $exportFullContent - * When enabled, export the full content of the document including empirical - * probability. - * @type bool $smartMessagingPartialUpdate - * When enabled, export the smart messaging allowlist document for partial - * update. - * @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 exportDocument($name, array $optionalArgs = []) - { - $request = new ExportDocumentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['gcsDestination'])) { - $request->setGcsDestination($optionalArgs['gcsDestination']); - } - - if (isset($optionalArgs['exportFullContent'])) { - $request->setExportFullContent($optionalArgs['exportFullContent']); - } - - if (isset($optionalArgs['smartMessagingPartialUpdate'])) { - $request->setSmartMessagingPartialUpdate($optionalArgs['smartMessagingPartialUpdate']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ExportDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves the specified document. - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * $formattedName = $documentsClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - * $response = $documentsClient->getDocument($formattedName); - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the document to retrieve. - * Format `projects//locations//knowledgeBases//documents/`. - * @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\Dialogflow\V2\Document - * - * @throws ApiException if the remote call fails - */ - public function getDocument($name, array $optionalArgs = []) - { - $request = new GetDocumentRequest(); - $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('GetDocument', Document::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates documents by importing data from external sources. - * Dialogflow supports up to 350 documents in each request. If you try to - * import more, Dialogflow will return an error. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: - * [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse] - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * $formattedParent = $documentsClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - * $documentTemplate = new ImportDocumentTemplate(); - * $operationResponse = $documentsClient->importDocuments($formattedParent, $documentTemplate); - * $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 = $documentsClient->importDocuments($formattedParent, $documentTemplate); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'importDocuments'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The knowledge base to import documents into. - * Format: `projects//locations//knowledgeBases/`. - * @param ImportDocumentTemplate $documentTemplate Required. Document template used for importing all the documents. - * @param array $optionalArgs { - * Optional. - * - * @type GcsSources $gcsSource - * The Google Cloud Storage location for the documents. - * The path can include a wildcard. - * - * These URIs may have the forms - * `gs:///`. - * `gs:////*.`. - * @type bool $importGcsCustomMetadata - * Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * @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 importDocuments($parent, $documentTemplate, array $optionalArgs = []) - { - $request = new ImportDocumentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDocumentTemplate($documentTemplate); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['gcsSource'])) { - $request->setGcsSource($optionalArgs['gcsSource']); - } - - if (isset($optionalArgs['importGcsCustomMetadata'])) { - $request->setImportGcsCustomMetadata($optionalArgs['importGcsCustomMetadata']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportDocuments', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Returns the list of all documents of the knowledge base. - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * $formattedParent = $documentsClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - * // Iterate over pages of elements - * $pagedResponse = $documentsClient->listDocuments($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $documentsClient->listDocuments($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The knowledge base to list all documents for. - * Format: `projects//locations//knowledgeBases/`. - * @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 - * The filter expression used to filter documents returned by the list method. - * The expression has the following syntax: - * - * [AND ] ... - * - * The following fields and operators are supported: - * - * * knowledge_types with has(:) operator - * * display_name with has(:) operator - * * state with equals(=) operator - * - * Examples: - * - * * "knowledge_types:FAQ" matches documents with FAQ knowledge type. - * * "display_name:customer" matches documents whose display name contains - * "customer". - * * "state=ACTIVE" matches documents with ACTIVE state. - * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. - * - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @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 listDocuments($parent, array $optionalArgs = []) - { - $request = new ListDocumentsRequest(); - $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('ListDocuments', $optionalArgs, ListDocumentsResponse::class, $request); - } - - /** - * Reloads the specified document from its specified source, content_uri or - * content. The previously loaded content of the document will be deleted. - * Note: Even when the content of the document has not changed, there still - * may be side effects because of internal implementation changes. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [Document][google.cloud.dialogflow.v2.Document] - * - * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - * only use `projects.knowledgeBases.documents`. - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * $formattedName = $documentsClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - * $operationResponse = $documentsClient->reloadDocument($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 = $documentsClient->reloadDocument($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'reloadDocument'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the document to reload. - * Format: `projects//locations//knowledgeBases//documents/` - * @param array $optionalArgs { - * Optional. - * - * @type string $contentUri - * Optional. The path of gcs source file for reloading document content. For - * now, only gcs uri is supported. - * - * For documents stored in Google Cloud Storage, these URIs must have - * the form `gs:///`. - * @type bool $importGcsCustomMetadata - * Optional. Whether to import custom metadata from Google Cloud Storage. - * Only valid when the document source is Google Cloud Storage URI. - * @type bool $smartMessagingPartialUpdate - * Optional. When enabled, the reload request is to apply partial update to - * the smart messaging allowlist. - * @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 reloadDocument($name, array $optionalArgs = []) - { - $request = new ReloadDocumentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['contentUri'])) { - $request->setContentUri($optionalArgs['contentUri']); - } - - if (isset($optionalArgs['importGcsCustomMetadata'])) { - $request->setImportGcsCustomMetadata($optionalArgs['importGcsCustomMetadata']); - } - - if (isset($optionalArgs['smartMessagingPartialUpdate'])) { - $request->setSmartMessagingPartialUpdate($optionalArgs['smartMessagingPartialUpdate']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ReloadDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the specified document. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - * - `response`: [Document][google.cloud.dialogflow.v2.Document] - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * $document = new Document(); - * $operationResponse = $documentsClient->updateDocument($document); - * $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 = $documentsClient->updateDocument($document); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $documentsClient->resumeOperation($operationName, 'updateDocument'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param Document $document Required. The document to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * @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 updateDocument($document, array $optionalArgs = []) - { - $request = new UpdateDocumentRequest(); - $requestParamHeaders = []; - $request->setDocument($document); - $requestParamHeaders['document.name'] = $document->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->startOperationsCall('UpdateDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * $response = $documentsClient->getLocation(); - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $documentsClient = new DocumentsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $documentsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $documentsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $documentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EntityTypesGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EntityTypesGapicClient.php deleted file mode 100644 index 9fc6709af2ed..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EntityTypesGapicClient.php +++ /dev/null @@ -1,1343 +0,0 @@ -entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - * $entities = []; - * $operationResponse = $entityTypesClient->batchCreateEntities($formattedParent, $entities); - * $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 = $entityTypesClient->batchCreateEntities($formattedParent, $entities); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchCreateEntities'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $entityTypesClient->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. - */ -class EntityTypesGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.EntityTypes'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $agentNameTemplate; - - private static $entityTypeNameTemplate; - - private static $projectAgentNameTemplate; - - private static $projectEntityTypeNameTemplate; - - private static $projectLocationAgentNameTemplate; - - private static $projectLocationEntityTypeNameTemplate; - - 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/entity_types_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/entity_types_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/entity_types_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/entity_types_rest_client_config.php', - ], - ], - ]; - } - - private static function getAgentNameTemplate() - { - if (self::$agentNameTemplate == null) { - self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$agentNameTemplate; - } - - private static function getEntityTypeNameTemplate() - { - if (self::$entityTypeNameTemplate == null) { - self::$entityTypeNameTemplate = new PathTemplate('projects/{project}/agent/entityTypes/{entity_type}'); - } - - return self::$entityTypeNameTemplate; - } - - private static function getProjectAgentNameTemplate() - { - if (self::$projectAgentNameTemplate == null) { - self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$projectAgentNameTemplate; - } - - private static function getProjectEntityTypeNameTemplate() - { - if (self::$projectEntityTypeNameTemplate == null) { - self::$projectEntityTypeNameTemplate = new PathTemplate('projects/{project}/agent/entityTypes/{entity_type}'); - } - - return self::$projectEntityTypeNameTemplate; - } - - private static function getProjectLocationAgentNameTemplate() - { - if (self::$projectLocationAgentNameTemplate == null) { - self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); - } - - return self::$projectLocationAgentNameTemplate; - } - - private static function getProjectLocationEntityTypeNameTemplate() - { - if (self::$projectLocationEntityTypeNameTemplate == null) { - self::$projectLocationEntityTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/entityTypes/{entity_type}'); - } - - return self::$projectLocationEntityTypeNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'agent' => self::getAgentNameTemplate(), - 'entityType' => self::getEntityTypeNameTemplate(), - 'projectAgent' => self::getProjectAgentNameTemplate(), - 'projectEntityType' => self::getProjectEntityTypeNameTemplate(), - 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), - 'projectLocationEntityType' => self::getProjectLocationEntityTypeNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * - * @return string The formatted agent resource. - */ - public static function agentName($project) - { - return self::getAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entity_type - * resource. - * - * @param string $project - * @param string $entityType - * - * @return string The formatted entity_type resource. - */ - public static function entityTypeName($project, $entityType) - { - return self::getEntityTypeNameTemplate()->render([ - 'project' => $project, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_agent resource. - * - * @param string $project - * - * @return string The formatted project_agent resource. - */ - public static function projectAgentName($project) - { - return self::getProjectAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_entity_type resource. - * - * @param string $project - * @param string $entityType - * - * @return string The formatted project_entity_type resource. - */ - public static function projectEntityTypeName($project, $entityType) - { - return self::getProjectEntityTypeNameTemplate()->render([ - 'project' => $project, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted project_location_agent resource. - */ - public static function projectLocationAgentName($project, $location) - { - return self::getProjectLocationAgentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_entity_type resource. - * - * @param string $project - * @param string $location - * @param string $entityType - * - * @return string The formatted project_location_entity_type resource. - */ - public static function projectLocationEntityTypeName($project, $location, $entityType) - { - return self::getProjectLocationEntityTypeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'entity_type' => $entityType, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - agent: projects/{project}/agent - * - entityType: projects/{project}/agent/entityTypes/{entity_type} - * - projectAgent: projects/{project}/agent - * - projectEntityType: projects/{project}/agent/entityTypes/{entity_type} - * - projectLocationAgent: projects/{project}/locations/{location}/agent - * - projectLocationEntityType: projects/{project}/locations/{location}/agent/entityTypes/{entity_type} - * - * 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 'dialogflow.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); - } - - /** - * Creates multiple new entities in the specified entity type. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $formattedParent = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - * $entities = []; - * $operationResponse = $entityTypesClient->batchCreateEntities($formattedParent, $entities); - * $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 = $entityTypesClient->batchCreateEntities($formattedParent, $entities); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchCreateEntities'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the entity type to create entities in. Format: - * `projects//agent/entityTypes/`. - * @param Entity[] $entities Required. The entities to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @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 batchCreateEntities($parent, $entities, array $optionalArgs = []) - { - $request = new BatchCreateEntitiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntities($entities); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BatchCreateEntities', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes entities in the specified entity type. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $formattedParent = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - * $entityValues = []; - * $operationResponse = $entityTypesClient->batchDeleteEntities($formattedParent, $entityValues); - * $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 = $entityTypesClient->batchDeleteEntities($formattedParent, $entityValues); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchDeleteEntities'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the entity type to delete entries for. Format: - * `projects//agent/entityTypes/`. - * @param string[] $entityValues Required. The reference `values` of the entities to delete. Note that - * these are not fully-qualified names, i.e. they don't start with - * `projects/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @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 batchDeleteEntities($parent, $entityValues, array $optionalArgs = []) - { - $request = new BatchDeleteEntitiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntityValues($entityValues); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BatchDeleteEntities', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes entity types in the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $formattedParent = $entityTypesClient->agentName('[PROJECT]'); - * $entityTypeNames = []; - * $operationResponse = $entityTypesClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); - * $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 = $entityTypesClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchDeleteEntityTypes'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the agent to delete all entities types for. Format: - * `projects//agent`. - * @param string[] $entityTypeNames Required. The names entity types to delete. All names must point to the - * same agent as `parent`. - * @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 batchDeleteEntityTypes($parent, $entityTypeNames, array $optionalArgs = []) - { - $request = new BatchDeleteEntityTypesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntityTypeNames($entityTypeNames); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BatchDeleteEntityTypes', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates or creates multiple entities in the specified entity type. This - * method does not affect entities in the entity type that aren't explicitly - * specified in the request. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $formattedParent = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - * $entities = []; - * $operationResponse = $entityTypesClient->batchUpdateEntities($formattedParent, $entities); - * $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 = $entityTypesClient->batchUpdateEntities($formattedParent, $entities); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchUpdateEntities'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the entity type to update or create entities in. - * Format: `projects//agent/entityTypes/`. - * @param Entity[] $entities Required. The entities to update or create. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type FieldMask $updateMask - * Optional. The mask to control which fields get 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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function batchUpdateEntities($parent, $entities, array $optionalArgs = []) - { - $request = new BatchUpdateEntitiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntities($entities); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - 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->startOperationsCall('BatchUpdateEntities', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates/Creates multiple entity types in the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: - * [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse] - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $formattedParent = $entityTypesClient->agentName('[PROJECT]'); - * $operationResponse = $entityTypesClient->batchUpdateEntityTypes($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 = $entityTypesClient->batchUpdateEntityTypes($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $entityTypesClient->resumeOperation($operationName, 'batchUpdateEntityTypes'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the agent to update or create entity types in. - * Format: `projects//agent`. - * @param array $optionalArgs { - * Optional. - * - * @type string $entityTypeBatchUri - * The URI to a Google Cloud Storage file containing entity types to update - * or create. The file format can either be a serialized proto (of - * EntityBatch type) or a JSON object. Note: The URI must start with - * "gs://". - * @type EntityTypeBatch $entityTypeBatchInline - * The collection of entity types to update or create. - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type FieldMask $updateMask - * Optional. The mask to control which fields get 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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function batchUpdateEntityTypes($parent, array $optionalArgs = []) - { - $request = new BatchUpdateEntityTypesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['entityTypeBatchUri'])) { - $request->setEntityTypeBatchUri($optionalArgs['entityTypeBatchUri']); - } - - if (isset($optionalArgs['entityTypeBatchInline'])) { - $request->setEntityTypeBatchInline($optionalArgs['entityTypeBatchInline']); - } - - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - 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->startOperationsCall('BatchUpdateEntityTypes', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates an entity type in the specified agent. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $formattedParent = $entityTypesClient->agentName('[PROJECT]'); - * $entityType = new EntityType(); - * $response = $entityTypesClient->createEntityType($formattedParent, $entityType); - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param string $parent Required. The agent to create a entity type for. - * Format: `projects//agent`. - * @param EntityType $entityType Required. The entity type to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @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\Dialogflow\V2\EntityType - * - * @throws ApiException if the remote call fails - */ - public function createEntityType($parent, $entityType, array $optionalArgs = []) - { - $request = new CreateEntityTypeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntityType($entityType); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEntityType', EntityType::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified entity type. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $formattedName = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - * $entityTypesClient->deleteEntityType($formattedName); - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the entity type to delete. - * Format: `projects//agent/entityTypes/`. - * @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 deleteEntityType($name, array $optionalArgs = []) - { - $request = new DeleteEntityTypeRequest(); - $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('DeleteEntityType', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the specified entity type. - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $formattedName = $entityTypesClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - * $response = $entityTypesClient->getEntityType($formattedName); - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the entity type. - * Format: `projects//agent/entityTypes/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @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\Dialogflow\V2\EntityType - * - * @throws ApiException if the remote call fails - */ - public function getEntityType($name, array $optionalArgs = []) - { - $request = new GetEntityTypeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEntityType', EntityType::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all entity types in the specified agent. - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $formattedParent = $entityTypesClient->agentName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $entityTypesClient->listEntityTypes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $entityTypesClient->listEntityTypes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param string $parent Required. The agent to list all entity types from. - * Format: `projects//agent`. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @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 listEntityTypes($parent, array $optionalArgs = []) - { - $request = new ListEntityTypesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - 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('ListEntityTypes', $optionalArgs, ListEntityTypesResponse::class, $request); - } - - /** - * Updates the specified entity type. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $entityType = new EntityType(); - * $response = $entityTypesClient->updateEntityType($entityType); - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param EntityType $entityType Required. The entity type to update. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type FieldMask $updateMask - * Optional. The mask to control which fields get 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\Dialogflow\V2\EntityType - * - * @throws ApiException if the remote call fails - */ - public function updateEntityType($entityType, array $optionalArgs = []) - { - $request = new UpdateEntityTypeRequest(); - $requestParamHeaders = []; - $request->setEntityType($entityType); - $requestParamHeaders['entity_type.name'] = $entityType->getName(); - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - 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('UpdateEntityType', EntityType::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * $response = $entityTypesClient->getLocation(); - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $entityTypesClient = new EntityTypesClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $entityTypesClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $entityTypesClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $entityTypesClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EnvironmentsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EnvironmentsGapicClient.php deleted file mode 100644 index 08d454a23387..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/EnvironmentsGapicClient.php +++ /dev/null @@ -1,965 +0,0 @@ -agentName('[PROJECT]'); - * $environment = new Environment(); - * $environmentId = 'environment_id'; - * $response = $environmentsClient->createEnvironment($formattedParent, $environment, $environmentId); - * } finally { - * $environmentsClient->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. - */ -class EnvironmentsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Environments'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $agentNameTemplate; - - private static $environmentNameTemplate; - - private static $projectAgentNameTemplate; - - private static $projectEnvironmentNameTemplate; - - private static $projectLocationAgentNameTemplate; - - private static $projectLocationEnvironmentNameTemplate; - - private static $projectLocationVersionNameTemplate; - - private static $projectVersionNameTemplate; - - private static $versionNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/environments_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/environments_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/environments_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/environments_rest_client_config.php', - ], - ], - ]; - } - - private static function getAgentNameTemplate() - { - if (self::$agentNameTemplate == null) { - self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$agentNameTemplate; - } - - private static function getEnvironmentNameTemplate() - { - if (self::$environmentNameTemplate == null) { - self::$environmentNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}'); - } - - return self::$environmentNameTemplate; - } - - private static function getProjectAgentNameTemplate() - { - if (self::$projectAgentNameTemplate == null) { - self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$projectAgentNameTemplate; - } - - private static function getProjectEnvironmentNameTemplate() - { - if (self::$projectEnvironmentNameTemplate == null) { - self::$projectEnvironmentNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}'); - } - - return self::$projectEnvironmentNameTemplate; - } - - private static function getProjectLocationAgentNameTemplate() - { - if (self::$projectLocationAgentNameTemplate == null) { - self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); - } - - return self::$projectLocationAgentNameTemplate; - } - - private static function getProjectLocationEnvironmentNameTemplate() - { - if (self::$projectLocationEnvironmentNameTemplate == null) { - self::$projectLocationEnvironmentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}'); - } - - return self::$projectLocationEnvironmentNameTemplate; - } - - private static function getProjectLocationVersionNameTemplate() - { - if (self::$projectLocationVersionNameTemplate == null) { - self::$projectLocationVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/versions/{version}'); - } - - return self::$projectLocationVersionNameTemplate; - } - - private static function getProjectVersionNameTemplate() - { - if (self::$projectVersionNameTemplate == null) { - self::$projectVersionNameTemplate = new PathTemplate('projects/{project}/agent/versions/{version}'); - } - - return self::$projectVersionNameTemplate; - } - - private static function getVersionNameTemplate() - { - if (self::$versionNameTemplate == null) { - self::$versionNameTemplate = new PathTemplate('projects/{project}/agent/versions/{version}'); - } - - return self::$versionNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'agent' => self::getAgentNameTemplate(), - 'environment' => self::getEnvironmentNameTemplate(), - 'projectAgent' => self::getProjectAgentNameTemplate(), - 'projectEnvironment' => self::getProjectEnvironmentNameTemplate(), - 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), - 'projectLocationEnvironment' => self::getProjectLocationEnvironmentNameTemplate(), - 'projectLocationVersion' => self::getProjectLocationVersionNameTemplate(), - 'projectVersion' => self::getProjectVersionNameTemplate(), - 'version' => self::getVersionNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * - * @return string The formatted agent resource. - */ - public static function agentName($project) - { - return self::getAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName($project, $environment) - { - return self::getEnvironmentNameTemplate()->render([ - 'project' => $project, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_agent resource. - * - * @param string $project - * - * @return string The formatted project_agent resource. - */ - public static function projectAgentName($project) - { - return self::getProjectAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_environment resource. - * - * @param string $project - * @param string $environment - * - * @return string The formatted project_environment resource. - */ - public static function projectEnvironmentName($project, $environment) - { - return self::getProjectEnvironmentNameTemplate()->render([ - 'project' => $project, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted project_location_agent resource. - */ - public static function projectLocationAgentName($project, $location) - { - return self::getProjectLocationAgentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_environment resource. - * - * @param string $project - * @param string $location - * @param string $environment - * - * @return string The formatted project_location_environment resource. - */ - public static function projectLocationEnvironmentName($project, $location, $environment) - { - return self::getProjectLocationEnvironmentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_version resource. - * - * @param string $project - * @param string $location - * @param string $version - * - * @return string The formatted project_location_version resource. - */ - public static function projectLocationVersionName($project, $location, $version) - { - return self::getProjectLocationVersionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_version resource. - * - * @param string $project - * @param string $version - * - * @return string The formatted project_version resource. - */ - public static function projectVersionName($project, $version) - { - return self::getProjectVersionNameTemplate()->render([ - 'project' => $project, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a version - * resource. - * - * @param string $project - * @param string $version - * - * @return string The formatted version resource. - */ - public static function versionName($project, $version) - { - return self::getVersionNameTemplate()->render([ - 'project' => $project, - 'version' => $version, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - agent: projects/{project}/agent - * - environment: projects/{project}/agent/environments/{environment} - * - projectAgent: projects/{project}/agent - * - projectEnvironment: projects/{project}/agent/environments/{environment} - * - projectLocationAgent: projects/{project}/locations/{location}/agent - * - projectLocationEnvironment: projects/{project}/locations/{location}/agent/environments/{environment} - * - projectLocationVersion: projects/{project}/locations/{location}/agent/versions/{version} - * - projectVersion: projects/{project}/agent/versions/{version} - * - version: projects/{project}/agent/versions/{version} - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Creates an agent environment. - * - * Sample code: - * ``` - * $environmentsClient = new EnvironmentsClient(); - * try { - * $formattedParent = $environmentsClient->agentName('[PROJECT]'); - * $environment = new Environment(); - * $environmentId = 'environment_id'; - * $response = $environmentsClient->createEnvironment($formattedParent, $environment, $environmentId); - * } finally { - * $environmentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The agent to create an environment for. - * Supported formats: - * - * - `projects//agent` - * - `projects//locations//agent` - * @param Environment $environment Required. The environment to create. - * @param string $environmentId Required. The unique id of the new environment. - * @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\Dialogflow\V2\Environment - * - * @throws ApiException if the remote call fails - */ - public function createEnvironment($parent, $environment, $environmentId, array $optionalArgs = []) - { - $request = new CreateEnvironmentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEnvironment($environment); - $request->setEnvironmentId($environmentId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEnvironment', Environment::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified agent environment. - * - * Sample code: - * ``` - * $environmentsClient = new EnvironmentsClient(); - * try { - * $formattedName = $environmentsClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); - * $environmentsClient->deleteEnvironment($formattedName); - * } finally { - * $environmentsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the environment to delete. - * / Format: - * - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * - * The environment ID for the default environment is `-`. - * @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 deleteEnvironment($name, array $optionalArgs = []) - { - $request = new DeleteEnvironmentRequest(); - $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('DeleteEnvironment', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the specified agent environment. - * - * Sample code: - * ``` - * $environmentsClient = new EnvironmentsClient(); - * try { - * $formattedName = $environmentsClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); - * $response = $environmentsClient->getEnvironment($formattedName); - * } finally { - * $environmentsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the environment. - * Supported formats: - * - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * - * The environment ID for the default environment is `-`. - * @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\Dialogflow\V2\Environment - * - * @throws ApiException if the remote call fails - */ - public function getEnvironment($name, array $optionalArgs = []) - { - $request = new GetEnvironmentRequest(); - $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('GetEnvironment', Environment::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the history of the specified environment. - * - * Sample code: - * ``` - * $environmentsClient = new EnvironmentsClient(); - * try { - * $formattedParent = $environmentsClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); - * // Iterate over pages of elements - * $pagedResponse = $environmentsClient->getEnvironmentHistory($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $environmentsClient->getEnvironmentHistory($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $environmentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the environment to retrieve history for. - * Supported formats: - * - * - `projects//agent/environments/` - * - `projects//locations//agent/environments/` - * - * The environment ID for the default environment is `-`. - * @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 getEnvironmentHistory($parent, array $optionalArgs = []) - { - $request = new GetEnvironmentHistoryRequest(); - $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('GetEnvironmentHistory', $optionalArgs, EnvironmentHistory::class, $request); - } - - /** - * Returns the list of all non-default environments of the specified agent. - * - * Sample code: - * ``` - * $environmentsClient = new EnvironmentsClient(); - * try { - * $formattedParent = $environmentsClient->agentName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $environmentsClient->listEnvironments($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $environmentsClient->listEnvironments($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $environmentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The agent to list all environments from. - * Format: - * - * - `projects//agent` - * - `projects//locations//agent` - * @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 listEnvironments($parent, array $optionalArgs = []) - { - $request = new ListEnvironmentsRequest(); - $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('ListEnvironments', $optionalArgs, ListEnvironmentsResponse::class, $request); - } - - /** - * Updates the specified agent environment. - * - * This method allows you to deploy new agent versions into the environment. - * When an environment is pointed to a new agent version by setting - * `environment.agent_version`, the environment is temporarily set to the - * `LOADING` state. During that time, the environment continues serving the - * previous version of the agent. After the new agent version is done loading, - * the environment is set back to the `RUNNING` state. - * You can use "-" as Environment ID in environment name to update an agent - * version in the default environment. WARNING: this will negate all recent - * changes to the draft agent and can't be undone. You may want to save the - * draft agent to a version before calling this method. - * - * Sample code: - * ``` - * $environmentsClient = new EnvironmentsClient(); - * try { - * $environment = new Environment(); - * $updateMask = new FieldMask(); - * $response = $environmentsClient->updateEnvironment($environment, $updateMask); - * } finally { - * $environmentsClient->close(); - * } - * ``` - * - * @param Environment $environment Required. The environment to update. - * @param FieldMask $updateMask Required. The mask to control which fields get updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $allowLoadToDraftAndDiscardChanges - * Optional. This field is used to prevent accidental overwrite of the default - * environment, which is an operation that cannot be undone. To confirm that - * the caller desires this overwrite, this field must be explicitly set to - * true when updating the default environment (environment ID = `-`). - * @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\Dialogflow\V2\Environment - * - * @throws ApiException if the remote call fails - */ - public function updateEnvironment($environment, $updateMask, array $optionalArgs = []) - { - $request = new UpdateEnvironmentRequest(); - $requestParamHeaders = []; - $request->setEnvironment($environment); - $request->setUpdateMask($updateMask); - $requestParamHeaders['environment.name'] = $environment->getName(); - if (isset($optionalArgs['allowLoadToDraftAndDiscardChanges'])) { - $request->setAllowLoadToDraftAndDiscardChanges($optionalArgs['allowLoadToDraftAndDiscardChanges']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEnvironment', Environment::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $environmentsClient = new EnvironmentsClient(); - * try { - * $response = $environmentsClient->getLocation(); - * } finally { - * $environmentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $environmentsClient = new EnvironmentsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $environmentsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $environmentsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $environmentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/FulfillmentsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/FulfillmentsGapicClient.php deleted file mode 100644 index b052d43c9c09..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/FulfillmentsGapicClient.php +++ /dev/null @@ -1,507 +0,0 @@ -fulfillmentName('[PROJECT]'); - * $response = $fulfillmentsClient->getFulfillment($formattedName); - * } finally { - * $fulfillmentsClient->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. - */ -class FulfillmentsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Fulfillments'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $fulfillmentNameTemplate; - - private static $projectFulfillmentNameTemplate; - - private static $projectLocationFulfillmentNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/fulfillments_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/fulfillments_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/fulfillments_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/fulfillments_rest_client_config.php', - ], - ], - ]; - } - - private static function getFulfillmentNameTemplate() - { - if (self::$fulfillmentNameTemplate == null) { - self::$fulfillmentNameTemplate = new PathTemplate('projects/{project}/agent/fulfillment'); - } - - return self::$fulfillmentNameTemplate; - } - - private static function getProjectFulfillmentNameTemplate() - { - if (self::$projectFulfillmentNameTemplate == null) { - self::$projectFulfillmentNameTemplate = new PathTemplate('projects/{project}/agent/fulfillment'); - } - - return self::$projectFulfillmentNameTemplate; - } - - private static function getProjectLocationFulfillmentNameTemplate() - { - if (self::$projectLocationFulfillmentNameTemplate == null) { - self::$projectLocationFulfillmentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/fulfillment'); - } - - return self::$projectLocationFulfillmentNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'fulfillment' => self::getFulfillmentNameTemplate(), - 'projectFulfillment' => self::getProjectFulfillmentNameTemplate(), - 'projectLocationFulfillment' => self::getProjectLocationFulfillmentNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a fulfillment - * resource. - * - * @param string $project - * - * @return string The formatted fulfillment resource. - */ - public static function fulfillmentName($project) - { - return self::getFulfillmentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_fulfillment resource. - * - * @param string $project - * - * @return string The formatted project_fulfillment resource. - */ - public static function projectFulfillmentName($project) - { - return self::getProjectFulfillmentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_fulfillment resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted project_location_fulfillment resource. - */ - public static function projectLocationFulfillmentName($project, $location) - { - return self::getProjectLocationFulfillmentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - fulfillment: projects/{project}/agent/fulfillment - * - projectFulfillment: projects/{project}/agent/fulfillment - * - projectLocationFulfillment: projects/{project}/locations/{location}/agent/fulfillment - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Retrieves the fulfillment. - * - * Sample code: - * ``` - * $fulfillmentsClient = new FulfillmentsClient(); - * try { - * $formattedName = $fulfillmentsClient->fulfillmentName('[PROJECT]'); - * $response = $fulfillmentsClient->getFulfillment($formattedName); - * } finally { - * $fulfillmentsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the fulfillment. - * Format: `projects//agent/fulfillment`. - * @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\Dialogflow\V2\Fulfillment - * - * @throws ApiException if the remote call fails - */ - public function getFulfillment($name, array $optionalArgs = []) - { - $request = new GetFulfillmentRequest(); - $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('GetFulfillment', Fulfillment::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the fulfillment. - * - * Sample code: - * ``` - * $fulfillmentsClient = new FulfillmentsClient(); - * try { - * $fulfillment = new Fulfillment(); - * $updateMask = new FieldMask(); - * $response = $fulfillmentsClient->updateFulfillment($fulfillment, $updateMask); - * } finally { - * $fulfillmentsClient->close(); - * } - * ``` - * - * @param Fulfillment $fulfillment Required. The fulfillment to update. - * @param FieldMask $updateMask Required. The mask to control which fields get updated. If the mask is not - * present, all fields will 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\Dialogflow\V2\Fulfillment - * - * @throws ApiException if the remote call fails - */ - public function updateFulfillment($fulfillment, $updateMask, array $optionalArgs = []) - { - $request = new UpdateFulfillmentRequest(); - $requestParamHeaders = []; - $request->setFulfillment($fulfillment); - $request->setUpdateMask($updateMask); - $requestParamHeaders['fulfillment.name'] = $fulfillment->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateFulfillment', Fulfillment::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $fulfillmentsClient = new FulfillmentsClient(); - * try { - * $response = $fulfillmentsClient->getLocation(); - * } finally { - * $fulfillmentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $fulfillmentsClient = new FulfillmentsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $fulfillmentsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $fulfillmentsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $fulfillmentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/IntentsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/IntentsGapicClient.php deleted file mode 100644 index 2c0565ad9329..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/IntentsGapicClient.php +++ /dev/null @@ -1,1104 +0,0 @@ -agentName('[PROJECT]'); - * $intents = []; - * $operationResponse = $intentsClient->batchDeleteIntents($formattedParent, $intents); - * $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 = $intentsClient->batchDeleteIntents($formattedParent, $intents); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $intentsClient->resumeOperation($operationName, 'batchDeleteIntents'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $intentsClient->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. - */ -class IntentsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Intents'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $agentNameTemplate; - - private static $intentNameTemplate; - - private static $projectAgentNameTemplate; - - private static $projectIntentNameTemplate; - - private static $projectLocationAgentNameTemplate; - - private static $projectLocationIntentNameTemplate; - - 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/intents_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/intents_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/intents_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/intents_rest_client_config.php', - ], - ], - ]; - } - - private static function getAgentNameTemplate() - { - if (self::$agentNameTemplate == null) { - self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$agentNameTemplate; - } - - private static function getIntentNameTemplate() - { - if (self::$intentNameTemplate == null) { - self::$intentNameTemplate = new PathTemplate('projects/{project}/agent/intents/{intent}'); - } - - return self::$intentNameTemplate; - } - - private static function getProjectAgentNameTemplate() - { - if (self::$projectAgentNameTemplate == null) { - self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$projectAgentNameTemplate; - } - - private static function getProjectIntentNameTemplate() - { - if (self::$projectIntentNameTemplate == null) { - self::$projectIntentNameTemplate = new PathTemplate('projects/{project}/agent/intents/{intent}'); - } - - return self::$projectIntentNameTemplate; - } - - private static function getProjectLocationAgentNameTemplate() - { - if (self::$projectLocationAgentNameTemplate == null) { - self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); - } - - return self::$projectLocationAgentNameTemplate; - } - - private static function getProjectLocationIntentNameTemplate() - { - if (self::$projectLocationIntentNameTemplate == null) { - self::$projectLocationIntentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/intents/{intent}'); - } - - return self::$projectLocationIntentNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'agent' => self::getAgentNameTemplate(), - 'intent' => self::getIntentNameTemplate(), - 'projectAgent' => self::getProjectAgentNameTemplate(), - 'projectIntent' => self::getProjectIntentNameTemplate(), - 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), - 'projectLocationIntent' => self::getProjectLocationIntentNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * - * @return string The formatted agent resource. - */ - public static function agentName($project) - { - return self::getAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a intent - * resource. - * - * @param string $project - * @param string $intent - * - * @return string The formatted intent resource. - */ - public static function intentName($project, $intent) - { - return self::getIntentNameTemplate()->render([ - 'project' => $project, - 'intent' => $intent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_agent resource. - * - * @param string $project - * - * @return string The formatted project_agent resource. - */ - public static function projectAgentName($project) - { - return self::getProjectAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_intent resource. - * - * @param string $project - * @param string $intent - * - * @return string The formatted project_intent resource. - */ - public static function projectIntentName($project, $intent) - { - return self::getProjectIntentNameTemplate()->render([ - 'project' => $project, - 'intent' => $intent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted project_location_agent resource. - */ - public static function projectLocationAgentName($project, $location) - { - return self::getProjectLocationAgentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_intent resource. - * - * @param string $project - * @param string $location - * @param string $intent - * - * @return string The formatted project_location_intent resource. - */ - public static function projectLocationIntentName($project, $location, $intent) - { - return self::getProjectLocationIntentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'intent' => $intent, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - agent: projects/{project}/agent - * - intent: projects/{project}/agent/intents/{intent} - * - projectAgent: projects/{project}/agent - * - projectIntent: projects/{project}/agent/intents/{intent} - * - projectLocationAgent: projects/{project}/locations/{location}/agent - * - projectLocationIntent: projects/{project}/locations/{location}/agent/intents/{intent} - * - * 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 'dialogflow.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); - } - - /** - * Deletes intents in the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: An [Empty - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $intentsClient = new IntentsClient(); - * try { - * $formattedParent = $intentsClient->agentName('[PROJECT]'); - * $intents = []; - * $operationResponse = $intentsClient->batchDeleteIntents($formattedParent, $intents); - * $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 = $intentsClient->batchDeleteIntents($formattedParent, $intents); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $intentsClient->resumeOperation($operationName, 'batchDeleteIntents'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $intentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the agent to delete all entities types for. Format: - * `projects//agent`. - * @param Intent[] $intents Required. The collection of intents to delete. Only intent `name` must be - * filled in. - * @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 batchDeleteIntents($parent, $intents, array $optionalArgs = []) - { - $request = new BatchDeleteIntentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setIntents($intents); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BatchDeleteIntents', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates/Creates multiple intents in the specified agent. - * - * This method is a [long-running - * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). - * The returned `Operation` type has the following method-specific fields: - * - * - `metadata`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: - * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse] - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $intentsClient = new IntentsClient(); - * try { - * $formattedParent = $intentsClient->agentName('[PROJECT]'); - * $operationResponse = $intentsClient->batchUpdateIntents($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 = $intentsClient->batchUpdateIntents($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $intentsClient->resumeOperation($operationName, 'batchUpdateIntents'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $intentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the agent to update or create intents in. - * Format: `projects//agent`. - * @param array $optionalArgs { - * Optional. - * - * @type string $intentBatchUri - * The URI to a Google Cloud Storage file containing intents to update or - * create. The file format can either be a serialized proto (of IntentBatch - * type) or JSON object. Note: The URI must start with "gs://". - * @type IntentBatch $intentBatchInline - * The collection of intents to update or create. - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type FieldMask $updateMask - * Optional. The mask to control which fields get updated. - * @type int $intentView - * Optional. The resource view to apply to the returned intent. - * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} - * @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 batchUpdateIntents($parent, array $optionalArgs = []) - { - $request = new BatchUpdateIntentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['intentBatchUri'])) { - $request->setIntentBatchUri($optionalArgs['intentBatchUri']); - } - - if (isset($optionalArgs['intentBatchInline'])) { - $request->setIntentBatchInline($optionalArgs['intentBatchInline']); - } - - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['intentView'])) { - $request->setIntentView($optionalArgs['intentView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BatchUpdateIntents', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates an intent in the specified agent. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $intentsClient = new IntentsClient(); - * try { - * $formattedParent = $intentsClient->agentName('[PROJECT]'); - * $intent = new Intent(); - * $response = $intentsClient->createIntent($formattedParent, $intent); - * } finally { - * $intentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The agent to create a intent for. - * Format: `projects//agent`. - * @param Intent $intent Required. The intent to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type int $intentView - * Optional. The resource view to apply to the returned intent. - * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} - * @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\Dialogflow\V2\Intent - * - * @throws ApiException if the remote call fails - */ - public function createIntent($parent, $intent, array $optionalArgs = []) - { - $request = new CreateIntentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setIntent($intent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - if (isset($optionalArgs['intentView'])) { - $request->setIntentView($optionalArgs['intentView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateIntent', Intent::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified intent and its direct or indirect followup intents. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $intentsClient = new IntentsClient(); - * try { - * $formattedName = $intentsClient->intentName('[PROJECT]', '[INTENT]'); - * $intentsClient->deleteIntent($formattedName); - * } finally { - * $intentsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the intent to delete. If this intent has direct or - * indirect followup intents, we also delete them. - * Format: `projects//agent/intents/`. - * @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 deleteIntent($name, array $optionalArgs = []) - { - $request = new DeleteIntentRequest(); - $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('DeleteIntent', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the specified intent. - * - * Sample code: - * ``` - * $intentsClient = new IntentsClient(); - * try { - * $formattedName = $intentsClient->intentName('[PROJECT]', '[INTENT]'); - * $response = $intentsClient->getIntent($formattedName); - * } finally { - * $intentsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the intent. - * Format: `projects//agent/intents/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type int $intentView - * Optional. The resource view to apply to the returned intent. - * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} - * @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\Dialogflow\V2\Intent - * - * @throws ApiException if the remote call fails - */ - public function getIntent($name, array $optionalArgs = []) - { - $request = new GetIntentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - if (isset($optionalArgs['intentView'])) { - $request->setIntentView($optionalArgs['intentView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIntent', Intent::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all intents in the specified agent. - * - * Sample code: - * ``` - * $intentsClient = new IntentsClient(); - * try { - * $formattedParent = $intentsClient->agentName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $intentsClient->listIntents($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $intentsClient->listIntents($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $intentsClient->close(); - * } - * ``` - * - * @param string $parent Required. The agent to list all intents from. - * Format: `projects//agent` or `projects//locations//agent`. - * - * Alternatively, you can specify the environment to list intents for. - * Format: `projects//agent/environments/` - * or `projects//locations//agent/environments/`. - * Note: training phrases of the intents will not be returned for non-draft - * environment. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type int $intentView - * Optional. The resource view to apply to the returned intent. - * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} - * @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 listIntents($parent, array $optionalArgs = []) - { - $request = new ListIntentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - if (isset($optionalArgs['intentView'])) { - $request->setIntentView($optionalArgs['intentView']); - } - - 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('ListIntents', $optionalArgs, ListIntentsResponse::class, $request); - } - - /** - * Updates the specified intent. - * - * Note: You should always train an agent prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/es/docs/training). - * - * Sample code: - * ``` - * $intentsClient = new IntentsClient(); - * try { - * $intent = new Intent(); - * $response = $intentsClient->updateIntent($intent); - * } finally { - * $intentsClient->close(); - * } - * ``` - * - * @param Intent $intent Required. The intent to update. - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. The language used to access language-specific data. - * If not specified, the agent's default language is used. - * For more information, see - * [Multilingual intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @type FieldMask $updateMask - * Optional. The mask to control which fields get updated. - * @type int $intentView - * Optional. The resource view to apply to the returned intent. - * For allowed values, use constants defined on {@see \Google\Cloud\Dialogflow\V2\IntentView} - * @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\Dialogflow\V2\Intent - * - * @throws ApiException if the remote call fails - */ - public function updateIntent($intent, array $optionalArgs = []) - { - $request = new UpdateIntentRequest(); - $requestParamHeaders = []; - $request->setIntent($intent); - $requestParamHeaders['intent.name'] = $intent->getName(); - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['intentView'])) { - $request->setIntentView($optionalArgs['intentView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateIntent', Intent::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $intentsClient = new IntentsClient(); - * try { - * $response = $intentsClient->getLocation(); - * } finally { - * $intentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $intentsClient = new IntentsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $intentsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $intentsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $intentsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/KnowledgeBasesGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/KnowledgeBasesGapicClient.php deleted file mode 100644 index 5d73144cac7d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/KnowledgeBasesGapicClient.php +++ /dev/null @@ -1,772 +0,0 @@ -projectName('[PROJECT]'); - * $knowledgeBase = new KnowledgeBase(); - * $response = $knowledgeBasesClient->createKnowledgeBase($formattedParent, $knowledgeBase); - * } finally { - * $knowledgeBasesClient->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. - */ -class KnowledgeBasesGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.KnowledgeBases'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $knowledgeBaseNameTemplate; - - private static $locationNameTemplate; - - private static $projectNameTemplate; - - private static $projectKnowledgeBaseNameTemplate; - - private static $projectLocationKnowledgeBaseNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/knowledge_bases_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/knowledge_bases_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/knowledge_bases_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/knowledge_bases_rest_client_config.php', - ], - ], - ]; - } - - private static function getKnowledgeBaseNameTemplate() - { - if (self::$knowledgeBaseNameTemplate == null) { - self::$knowledgeBaseNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}'); - } - - return self::$knowledgeBaseNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectKnowledgeBaseNameTemplate() - { - if (self::$projectKnowledgeBaseNameTemplate == null) { - self::$projectKnowledgeBaseNameTemplate = new PathTemplate('projects/{project}/knowledgeBases/{knowledge_base}'); - } - - return self::$projectKnowledgeBaseNameTemplate; - } - - private static function getProjectLocationKnowledgeBaseNameTemplate() - { - if (self::$projectLocationKnowledgeBaseNameTemplate == null) { - self::$projectLocationKnowledgeBaseNameTemplate = new PathTemplate('projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}'); - } - - return self::$projectLocationKnowledgeBaseNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'knowledgeBase' => self::getKnowledgeBaseNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectKnowledgeBase' => self::getProjectKnowledgeBaseNameTemplate(), - 'projectLocationKnowledgeBase' => self::getProjectLocationKnowledgeBaseNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * knowledge_base resource. - * - * @param string $project - * @param string $knowledgeBase - * - * @return string The formatted knowledge_base resource. - */ - public static function knowledgeBaseName($project, $knowledgeBase) - { - return self::getKnowledgeBaseNameTemplate()->render([ - 'project' => $project, - 'knowledge_base' => $knowledgeBase, - ]); - } - - /** - * 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 project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_knowledge_base resource. - * - * @param string $project - * @param string $knowledgeBase - * - * @return string The formatted project_knowledge_base resource. - */ - public static function projectKnowledgeBaseName($project, $knowledgeBase) - { - return self::getProjectKnowledgeBaseNameTemplate()->render([ - 'project' => $project, - 'knowledge_base' => $knowledgeBase, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_knowledge_base resource. - * - * @param string $project - * @param string $location - * @param string $knowledgeBase - * - * @return string The formatted project_location_knowledge_base resource. - */ - public static function projectLocationKnowledgeBaseName($project, $location, $knowledgeBase) - { - return self::getProjectLocationKnowledgeBaseNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'knowledge_base' => $knowledgeBase, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - knowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} - * - location: projects/{project}/locations/{location} - * - project: projects/{project} - * - projectKnowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} - * - projectLocationKnowledgeBase: projects/{project}/locations/{location}/knowledgeBases/{knowledge_base} - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Creates a knowledge base. - * - * Sample code: - * ``` - * $knowledgeBasesClient = new KnowledgeBasesClient(); - * try { - * $formattedParent = $knowledgeBasesClient->projectName('[PROJECT]'); - * $knowledgeBase = new KnowledgeBase(); - * $response = $knowledgeBasesClient->createKnowledgeBase($formattedParent, $knowledgeBase); - * } finally { - * $knowledgeBasesClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to create a knowledge base for. - * Format: `projects//locations/`. - * @param KnowledgeBase $knowledgeBase Required. The knowledge base 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\Dialogflow\V2\KnowledgeBase - * - * @throws ApiException if the remote call fails - */ - public function createKnowledgeBase($parent, $knowledgeBase, array $optionalArgs = []) - { - $request = new CreateKnowledgeBaseRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setKnowledgeBase($knowledgeBase); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateKnowledgeBase', KnowledgeBase::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified knowledge base. - * - * Sample code: - * ``` - * $knowledgeBasesClient = new KnowledgeBasesClient(); - * try { - * $formattedName = $knowledgeBasesClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - * $knowledgeBasesClient->deleteKnowledgeBase($formattedName); - * } finally { - * $knowledgeBasesClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the knowledge base to delete. - * Format: `projects//locations//knowledgeBases/`. - * @param array $optionalArgs { - * Optional. - * - * @type bool $force - * Optional. Force deletes the knowledge base. When set to true, any documents - * in the knowledge base are also deleted. - * @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 deleteKnowledgeBase($name, array $optionalArgs = []) - { - $request = new DeleteKnowledgeBaseRequest(); - $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('DeleteKnowledgeBase', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the specified knowledge base. - * - * Sample code: - * ``` - * $knowledgeBasesClient = new KnowledgeBasesClient(); - * try { - * $formattedName = $knowledgeBasesClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - * $response = $knowledgeBasesClient->getKnowledgeBase($formattedName); - * } finally { - * $knowledgeBasesClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the knowledge base to retrieve. - * Format `projects//locations//knowledgeBases/`. - * @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\Dialogflow\V2\KnowledgeBase - * - * @throws ApiException if the remote call fails - */ - public function getKnowledgeBase($name, array $optionalArgs = []) - { - $request = new GetKnowledgeBaseRequest(); - $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('GetKnowledgeBase', KnowledgeBase::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all knowledge bases of the specified agent. - * - * Sample code: - * ``` - * $knowledgeBasesClient = new KnowledgeBasesClient(); - * try { - * $formattedParent = $knowledgeBasesClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $knowledgeBasesClient->listKnowledgeBases($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $knowledgeBasesClient->listKnowledgeBases($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $knowledgeBasesClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to list of knowledge bases for. - * Format: `projects//locations/`. - * @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 - * The filter expression used to filter knowledge bases returned by the list - * method. The expression has the following syntax: - * - * [AND ] ... - * - * The following fields and operators are supported: - * - * * display_name with has(:) operator - * * language_code with equals(=) operator - * - * Examples: - * - * * 'language_code=en-us' matches knowledge bases with en-us language code. - * * 'display_name:articles' matches knowledge bases whose display name - * contains "articles". - * * 'display_name:"Best Articles"' matches knowledge bases whose display - * name contains "Best Articles". - * * 'language_code=en-gb AND display_name=articles' matches all knowledge - * bases whose display name contains "articles" and whose language code is - * "en-gb". - * - * Note: An empty filter string (i.e. "") is a no-op and will result in no - * filtering. - * - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @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 listKnowledgeBases($parent, array $optionalArgs = []) - { - $request = new ListKnowledgeBasesRequest(); - $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('ListKnowledgeBases', $optionalArgs, ListKnowledgeBasesResponse::class, $request); - } - - /** - * Updates the specified knowledge base. - * - * Sample code: - * ``` - * $knowledgeBasesClient = new KnowledgeBasesClient(); - * try { - * $knowledgeBase = new KnowledgeBase(); - * $response = $knowledgeBasesClient->updateKnowledgeBase($knowledgeBase); - * } finally { - * $knowledgeBasesClient->close(); - * } - * ``` - * - * @param KnowledgeBase $knowledgeBase Required. The knowledge base to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. Not specified means `update all`. - * Currently, only `display_name` can be updated, an InvalidArgument will be - * returned for attempting to update other fields. - * @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\Dialogflow\V2\KnowledgeBase - * - * @throws ApiException if the remote call fails - */ - public function updateKnowledgeBase($knowledgeBase, array $optionalArgs = []) - { - $request = new UpdateKnowledgeBaseRequest(); - $requestParamHeaders = []; - $request->setKnowledgeBase($knowledgeBase); - $requestParamHeaders['knowledge_base.name'] = $knowledgeBase->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('UpdateKnowledgeBase', KnowledgeBase::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $knowledgeBasesClient = new KnowledgeBasesClient(); - * try { - * $response = $knowledgeBasesClient->getLocation(); - * } finally { - * $knowledgeBasesClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $knowledgeBasesClient = new KnowledgeBasesClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $knowledgeBasesClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $knowledgeBasesClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $knowledgeBasesClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ParticipantsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ParticipantsGapicClient.php deleted file mode 100644 index 1666b640dc37..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/ParticipantsGapicClient.php +++ /dev/null @@ -1,1217 +0,0 @@ -participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - * $response = $participantsClient->analyzeContent($formattedParticipant); - * } finally { - * $participantsClient->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. - */ -class ParticipantsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Participants'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $conversationNameTemplate; - - private static $messageNameTemplate; - - private static $participantNameTemplate; - - private static $projectConversationNameTemplate; - - private static $projectConversationMessageNameTemplate; - - private static $projectConversationParticipantNameTemplate; - - private static $projectLocationConversationNameTemplate; - - private static $projectLocationConversationMessageNameTemplate; - - private static $projectLocationConversationParticipantNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/participants_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/participants_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/participants_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/participants_rest_client_config.php', - ], - ], - ]; - } - - private static function getConversationNameTemplate() - { - if (self::$conversationNameTemplate == null) { - self::$conversationNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}'); - } - - return self::$conversationNameTemplate; - } - - private static function getMessageNameTemplate() - { - if (self::$messageNameTemplate == null) { - self::$messageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); - } - - return self::$messageNameTemplate; - } - - private static function getParticipantNameTemplate() - { - if (self::$participantNameTemplate == null) { - self::$participantNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/participants/{participant}'); - } - - return self::$participantNameTemplate; - } - - private static function getProjectConversationNameTemplate() - { - if (self::$projectConversationNameTemplate == null) { - self::$projectConversationNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}'); - } - - return self::$projectConversationNameTemplate; - } - - private static function getProjectConversationMessageNameTemplate() - { - if (self::$projectConversationMessageNameTemplate == null) { - self::$projectConversationMessageNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/messages/{message}'); - } - - return self::$projectConversationMessageNameTemplate; - } - - private static function getProjectConversationParticipantNameTemplate() - { - if (self::$projectConversationParticipantNameTemplate == null) { - self::$projectConversationParticipantNameTemplate = new PathTemplate('projects/{project}/conversations/{conversation}/participants/{participant}'); - } - - return self::$projectConversationParticipantNameTemplate; - } - - private static function getProjectLocationConversationNameTemplate() - { - if (self::$projectLocationConversationNameTemplate == null) { - self::$projectLocationConversationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}'); - } - - return self::$projectLocationConversationNameTemplate; - } - - private static function getProjectLocationConversationMessageNameTemplate() - { - if (self::$projectLocationConversationMessageNameTemplate == null) { - self::$projectLocationConversationMessageNameTemplate = new PathTemplate('projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}'); - } - - return self::$projectLocationConversationMessageNameTemplate; - } - - 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 getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'conversation' => self::getConversationNameTemplate(), - 'message' => self::getMessageNameTemplate(), - 'participant' => self::getParticipantNameTemplate(), - 'projectConversation' => self::getProjectConversationNameTemplate(), - 'projectConversationMessage' => self::getProjectConversationMessageNameTemplate(), - 'projectConversationParticipant' => self::getProjectConversationParticipantNameTemplate(), - 'projectLocationConversation' => self::getProjectLocationConversationNameTemplate(), - 'projectLocationConversationMessage' => self::getProjectLocationConversationMessageNameTemplate(), - 'projectLocationConversationParticipant' => self::getProjectLocationConversationParticipantNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a conversation - * resource. - * - * @param string $project - * @param string $conversation - * - * @return string The formatted conversation resource. - */ - public static function conversationName($project, $conversation) - { - return self::getConversationNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a message - * resource. - * - * @param string $project - * @param string $conversation - * @param string $message - * - * @return string The formatted message resource. - */ - public static function messageName($project, $conversation, $message) - { - return self::getMessageNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - 'message' => $message, - ]); - } - - /** - * 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 - * project_conversation resource. - * - * @param string $project - * @param string $conversation - * - * @return string The formatted project_conversation resource. - */ - public static function projectConversationName($project, $conversation) - { - return self::getProjectConversationNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_conversation_message resource. - * - * @param string $project - * @param string $conversation - * @param string $message - * - * @return string The formatted project_conversation_message resource. - */ - public static function projectConversationMessageName($project, $conversation, $message) - { - return self::getProjectConversationMessageNameTemplate()->render([ - 'project' => $project, - 'conversation' => $conversation, - 'message' => $message, - ]); - } - - /** - * 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 resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * - * @return string The formatted project_location_conversation resource. - */ - public static function projectLocationConversationName($project, $location, $conversation) - { - return self::getProjectLocationConversationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_conversation_message resource. - * - * @param string $project - * @param string $location - * @param string $conversation - * @param string $message - * - * @return string The formatted project_location_conversation_message resource. - */ - public static function projectLocationConversationMessageName($project, $location, $conversation, $message) - { - return self::getProjectLocationConversationMessageNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'conversation' => $conversation, - 'message' => $message, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - conversation: projects/{project}/conversations/{conversation} - * - message: projects/{project}/conversations/{conversation}/messages/{message} - * - participant: projects/{project}/conversations/{conversation}/participants/{participant} - * - projectConversation: projects/{project}/conversations/{conversation} - * - projectConversationMessage: projects/{project}/conversations/{conversation}/messages/{message} - * - projectConversationParticipant: projects/{project}/conversations/{conversation}/participants/{participant} - * - projectLocationConversation: projects/{project}/locations/{location}/conversations/{conversation} - * - projectLocationConversationMessage: projects/{project}/locations/{location}/conversations/{conversation}/messages/{message} - * - projectLocationConversationParticipant: projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Adds a text (chat, for example), or audio (phone recording, for example) - * message from a participant into the conversation. - * - * Note: Always use agent versions for production traffic - * sent to virtual agents. See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $formattedParticipant = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - * $response = $participantsClient->analyzeContent($formattedParticipant); - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param string $participant Required. The name of the participant this text comes from. - * Format: `projects//locations//conversations//participants/`. - * @param array $optionalArgs { - * Optional. - * - * @type TextInput $textInput - * The natural language text to be processed. - * @type EventInput $eventInput - * An input event to send to Dialogflow. - * @type OutputAudioConfig $replyAudioConfig - * Speech synthesis configuration. - * The speech synthesis settings for a virtual agent that may be configured - * for the associated conversation profile are not used when calling - * AnalyzeContent. If this configuration is not supplied, speech synthesis - * is disabled. - * @type QueryParameters $queryParams - * Parameters for a Dialogflow virtual-agent query. - * @type AssistQueryParameters $assistQueryParams - * Parameters for a human assist query. - * @type Struct $cxParameters - * Additional parameters to be put into Dialogflow CX session parameters. To - * remove a parameter from the session, clients should explicitly set the - * parameter value to null. - * - * Note: this field should only be used if you are connecting to a Dialogflow - * CX agent. - * @type string $requestId - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. - * This request is only idempotent if a `request_id` is provided. - * @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\Dialogflow\V2\AnalyzeContentResponse - * - * @throws ApiException if the remote call fails - */ - public function analyzeContent($participant, array $optionalArgs = []) - { - $request = new AnalyzeContentRequest(); - $requestParamHeaders = []; - $request->setParticipant($participant); - $requestParamHeaders['participant'] = $participant; - if (isset($optionalArgs['textInput'])) { - $request->setTextInput($optionalArgs['textInput']); - } - - if (isset($optionalArgs['eventInput'])) { - $request->setEventInput($optionalArgs['eventInput']); - } - - if (isset($optionalArgs['replyAudioConfig'])) { - $request->setReplyAudioConfig($optionalArgs['replyAudioConfig']); - } - - if (isset($optionalArgs['queryParams'])) { - $request->setQueryParams($optionalArgs['queryParams']); - } - - if (isset($optionalArgs['assistQueryParams'])) { - $request->setAssistQueryParams($optionalArgs['assistQueryParams']); - } - - if (isset($optionalArgs['cxParameters'])) { - $request->setCxParameters($optionalArgs['cxParameters']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AnalyzeContent', AnalyzeContentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new participant in a conversation. - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $formattedParent = $participantsClient->conversationName('[PROJECT]', '[CONVERSATION]'); - * $participant = new Participant(); - * $response = $participantsClient->createParticipant($formattedParent, $participant); - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource identifier of the conversation adding the participant. - * Format: `projects//locations//conversations/`. - * @param Participant $participant Required. The participant 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\Dialogflow\V2\Participant - * - * @throws ApiException if the remote call fails - */ - public function createParticipant($parent, $participant, array $optionalArgs = []) - { - $request = new CreateParticipantRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setParticipant($participant); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateParticipant', Participant::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a conversation participant. - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $formattedName = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - * $response = $participantsClient->getParticipant($formattedName); - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the participant. Format: - * `projects//locations//conversations//participants/`. - * @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\Dialogflow\V2\Participant - * - * @throws ApiException if the remote call fails - */ - public function getParticipant($name, array $optionalArgs = []) - { - $request = new GetParticipantRequest(); - $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('GetParticipant', Participant::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all participants in the specified conversation. - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $formattedParent = $participantsClient->conversationName('[PROJECT]', '[CONVERSATION]'); - * // Iterate over pages of elements - * $pagedResponse = $participantsClient->listParticipants($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $participantsClient->listParticipants($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param string $parent Required. The conversation to list all participants from. - * Format: `projects//locations//conversations/`. - * @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 listParticipants($parent, array $optionalArgs = []) - { - $request = new ListParticipantsRequest(); - $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('ListParticipants', $optionalArgs, ListParticipantsResponse::class, $request); - } - - /** - * Adds a text (chat, for example), or audio (phone recording, for example) - * message from a participant into the conversation. - * Note: This method is only available through the gRPC API (not REST). - * - * The top-level message sent to the client by the server is - * `StreamingAnalyzeContentResponse`. Multiple response messages can be - * returned in order. The first one or more messages contain the - * `recognition_result` field. Each result represents a more complete - * transcript of what the user said. The next message contains the - * `reply_text` field and potentially the `reply_audio` field. The message can - * also contain the `automated_agent_reply` field. - * - * Note: Always use agent versions for production traffic - * sent to virtual agents. See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $participant = 'participant'; - * $request = new StreamingAnalyzeContentRequest(); - * $request->setParticipant($participant); - * // Write all requests to the server, then read all responses until the - * // stream is complete - * $requests = [ - * $request, - * ]; - * $stream = $participantsClient->streamingAnalyzeContent(); - * $stream->writeAll($requests); - * foreach ($stream->closeWriteAndReadAll() as $element) { - * // doSomethingWith($element); - * } - * // Alternatively: - * // Write requests individually, making read() calls if - * // required. Call closeWrite() once writes are complete, and read the - * // remaining responses from the server. - * $requests = [ - * $request, - * ]; - * $stream = $participantsClient->streamingAnalyzeContent(); - * foreach ($requests as $request) { - * $stream->write($request); - * // if required, read a single response from the stream - * $element = $stream->read(); - * // doSomethingWith($element) - * } - * $stream->closeWrite(); - * $element = $stream->read(); - * while (!is_null($element)) { - * // doSomethingWith($element) - * $element = $stream->read(); - * } - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\BidiStream - * - * @throws ApiException if the remote call fails - */ - public function streamingAnalyzeContent(array $optionalArgs = []) - { - return $this->startCall('StreamingAnalyzeContent', StreamingAnalyzeContentResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); - } - - /** - * Gets suggested articles for a participant based on specific historical - * messages. - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $formattedParent = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - * $response = $participantsClient->suggestArticles($formattedParent); - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $latestMessage - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * - * Format: `projects//locations//conversations//messages/`. - * @type int $contextSize - * Optional. Max number of messages prior to and including - * [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] - * to use as context when compiling the suggestion. By default 20 and at - * most 50. - * @type AssistQueryParameters $assistQueryParams - * Parameters for a human assist query. - * @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\Dialogflow\V2\SuggestArticlesResponse - * - * @throws ApiException if the remote call fails - */ - public function suggestArticles($parent, array $optionalArgs = []) - { - $request = new SuggestArticlesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['latestMessage'])) { - $request->setLatestMessage($optionalArgs['latestMessage']); - } - - if (isset($optionalArgs['contextSize'])) { - $request->setContextSize($optionalArgs['contextSize']); - } - - if (isset($optionalArgs['assistQueryParams'])) { - $request->setAssistQueryParams($optionalArgs['assistQueryParams']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SuggestArticles', SuggestArticlesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets suggested faq answers for a participant based on specific historical - * messages. - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $formattedParent = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - * $response = $participantsClient->suggestFaqAnswers($formattedParent); - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $latestMessage - * Optional. The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * - * Format: `projects//locations//conversations//messages/`. - * @type int $contextSize - * Optional. Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * @type AssistQueryParameters $assistQueryParams - * Parameters for a human assist query. - * @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\Dialogflow\V2\SuggestFaqAnswersResponse - * - * @throws ApiException if the remote call fails - */ - public function suggestFaqAnswers($parent, array $optionalArgs = []) - { - $request = new SuggestFaqAnswersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['latestMessage'])) { - $request->setLatestMessage($optionalArgs['latestMessage']); - } - - if (isset($optionalArgs['contextSize'])) { - $request->setContextSize($optionalArgs['contextSize']); - } - - if (isset($optionalArgs['assistQueryParams'])) { - $request->setAssistQueryParams($optionalArgs['assistQueryParams']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SuggestFaqAnswers', SuggestFaqAnswersResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets smart replies for a participant based on specific historical - * messages. - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $formattedParent = $participantsClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - * $response = $participantsClient->suggestSmartReplies($formattedParent); - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the participant to fetch suggestion for. - * Format: `projects//locations//conversations//participants/`. - * @param array $optionalArgs { - * Optional. - * - * @type TextInput $currentTextInput - * The current natural language text segment to compile suggestion - * for. This provides a way for user to get follow up smart reply suggestion - * after a smart reply selection, without sending a text message. - * @type string $latestMessage - * The name of the latest conversation message to compile suggestion - * for. If empty, it will be the latest message of the conversation. - * - * Format: `projects//locations//conversations//messages/`. - * @type int $contextSize - * Max number of messages prior to and including - * [latest_message] to use as context when compiling the - * suggestion. By default 20 and at most 50. - * @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\Dialogflow\V2\SuggestSmartRepliesResponse - * - * @throws ApiException if the remote call fails - */ - public function suggestSmartReplies($parent, array $optionalArgs = []) - { - $request = new SuggestSmartRepliesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['currentTextInput'])) { - $request->setCurrentTextInput($optionalArgs['currentTextInput']); - } - - if (isset($optionalArgs['latestMessage'])) { - $request->setLatestMessage($optionalArgs['latestMessage']); - } - - if (isset($optionalArgs['contextSize'])) { - $request->setContextSize($optionalArgs['contextSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SuggestSmartReplies', SuggestSmartRepliesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the specified participant. - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $participant = new Participant(); - * $updateMask = new FieldMask(); - * $response = $participantsClient->updateParticipant($participant, $updateMask); - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param Participant $participant Required. The participant to update. - * @param FieldMask $updateMask Required. The mask to specify which fields to update. - * @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\Dialogflow\V2\Participant - * - * @throws ApiException if the remote call fails - */ - public function updateParticipant($participant, $updateMask, array $optionalArgs = []) - { - $request = new UpdateParticipantRequest(); - $requestParamHeaders = []; - $request->setParticipant($participant); - $request->setUpdateMask($updateMask); - $requestParamHeaders['participant.name'] = $participant->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateParticipant', Participant::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * $response = $participantsClient->getLocation(); - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $participantsClient = new ParticipantsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $participantsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $participantsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $participantsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionEntityTypesGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionEntityTypesGapicClient.php deleted file mode 100644 index e3ca571f68d8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionEntityTypesGapicClient.php +++ /dev/null @@ -1,955 +0,0 @@ -sessionName('[PROJECT]', '[SESSION]'); - * $sessionEntityType = new SessionEntityType(); - * $response = $sessionEntityTypesClient->createSessionEntityType($formattedParent, $sessionEntityType); - * } finally { - * $sessionEntityTypesClient->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. - */ -class SessionEntityTypesGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.SessionEntityTypes'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $projectEnvironmentUserSessionNameTemplate; - - private static $projectEnvironmentUserSessionEntityTypeNameTemplate; - - private static $projectLocationEnvironmentUserSessionNameTemplate; - - private static $projectLocationEnvironmentUserSessionEntityTypeNameTemplate; - - private static $projectLocationSessionNameTemplate; - - private static $projectLocationSessionEntityTypeNameTemplate; - - private static $projectSessionNameTemplate; - - private static $projectSessionEntityTypeNameTemplate; - - private static $sessionNameTemplate; - - private static $sessionEntityTypeNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/session_entity_types_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/session_entity_types_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/session_entity_types_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/session_entity_types_rest_client_config.php', - ], - ], - ]; - } - - private static function getProjectEnvironmentUserSessionNameTemplate() - { - if (self::$projectEnvironmentUserSessionNameTemplate == null) { - self::$projectEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}'); - } - - return self::$projectEnvironmentUserSessionNameTemplate; - } - - private static function getProjectEnvironmentUserSessionEntityTypeNameTemplate() - { - if (self::$projectEnvironmentUserSessionEntityTypeNameTemplate == null) { - self::$projectEnvironmentUserSessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}'); - } - - return self::$projectEnvironmentUserSessionEntityTypeNameTemplate; - } - - private static function getProjectLocationEnvironmentUserSessionNameTemplate() - { - if (self::$projectLocationEnvironmentUserSessionNameTemplate == null) { - self::$projectLocationEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}'); - } - - return self::$projectLocationEnvironmentUserSessionNameTemplate; - } - - private static function getProjectLocationEnvironmentUserSessionEntityTypeNameTemplate() - { - if (self::$projectLocationEnvironmentUserSessionEntityTypeNameTemplate == null) { - self::$projectLocationEnvironmentUserSessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}'); - } - - return self::$projectLocationEnvironmentUserSessionEntityTypeNameTemplate; - } - - private static function getProjectLocationSessionNameTemplate() - { - if (self::$projectLocationSessionNameTemplate == null) { - self::$projectLocationSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}'); - } - - return self::$projectLocationSessionNameTemplate; - } - - private static function getProjectLocationSessionEntityTypeNameTemplate() - { - if (self::$projectLocationSessionEntityTypeNameTemplate == null) { - self::$projectLocationSessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type}'); - } - - return self::$projectLocationSessionEntityTypeNameTemplate; - } - - private static function getProjectSessionNameTemplate() - { - if (self::$projectSessionNameTemplate == null) { - self::$projectSessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); - } - - return self::$projectSessionNameTemplate; - } - - private static function getProjectSessionEntityTypeNameTemplate() - { - if (self::$projectSessionEntityTypeNameTemplate == null) { - self::$projectSessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}'); - } - - return self::$projectSessionEntityTypeNameTemplate; - } - - private static function getSessionNameTemplate() - { - if (self::$sessionNameTemplate == null) { - self::$sessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); - } - - return self::$sessionNameTemplate; - } - - private static function getSessionEntityTypeNameTemplate() - { - if (self::$sessionEntityTypeNameTemplate == null) { - self::$sessionEntityTypeNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}'); - } - - return self::$sessionEntityTypeNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'projectEnvironmentUserSession' => self::getProjectEnvironmentUserSessionNameTemplate(), - 'projectEnvironmentUserSessionEntityType' => self::getProjectEnvironmentUserSessionEntityTypeNameTemplate(), - 'projectLocationEnvironmentUserSession' => self::getProjectLocationEnvironmentUserSessionNameTemplate(), - 'projectLocationEnvironmentUserSessionEntityType' => self::getProjectLocationEnvironmentUserSessionEntityTypeNameTemplate(), - 'projectLocationSession' => self::getProjectLocationSessionNameTemplate(), - 'projectLocationSessionEntityType' => self::getProjectLocationSessionEntityTypeNameTemplate(), - 'projectSession' => self::getProjectSessionNameTemplate(), - 'projectSessionEntityType' => self::getProjectSessionEntityTypeNameTemplate(), - 'session' => self::getSessionNameTemplate(), - 'sessionEntityType' => self::getSessionEntityTypeNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_environment_user_session resource. - * - * @param string $project - * @param string $environment - * @param string $user - * @param string $session - * - * @return string The formatted project_environment_user_session resource. - */ - public static function projectEnvironmentUserSessionName($project, $environment, $user, $session) - { - return self::getProjectEnvironmentUserSessionNameTemplate()->render([ - 'project' => $project, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_environment_user_session_entity_type resource. - * - * @param string $project - * @param string $environment - * @param string $user - * @param string $session - * @param string $entityType - * - * @return string The formatted project_environment_user_session_entity_type resource. - */ - public static function projectEnvironmentUserSessionEntityTypeName($project, $environment, $user, $session, $entityType) - { - return self::getProjectEnvironmentUserSessionEntityTypeNameTemplate()->render([ - 'project' => $project, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_environment_user_session resource. - * - * @param string $project - * @param string $location - * @param string $environment - * @param string $user - * @param string $session - * - * @return string The formatted project_location_environment_user_session resource. - */ - public static function projectLocationEnvironmentUserSessionName($project, $location, $environment, $user, $session) - { - return self::getProjectLocationEnvironmentUserSessionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_environment_user_session_entity_type resource. - * - * @param string $project - * @param string $location - * @param string $environment - * @param string $user - * @param string $session - * @param string $entityType - * - * @return string The formatted project_location_environment_user_session_entity_type resource. - */ - public static function projectLocationEnvironmentUserSessionEntityTypeName($project, $location, $environment, $user, $session, $entityType) - { - return self::getProjectLocationEnvironmentUserSessionEntityTypeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_session resource. - * - * @param string $project - * @param string $location - * @param string $session - * - * @return string The formatted project_location_session resource. - */ - public static function projectLocationSessionName($project, $location, $session) - { - return self::getProjectLocationSessionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_session_entity_type resource. - * - * @param string $project - * @param string $location - * @param string $session - * @param string $entityType - * - * @return string The formatted project_location_session_entity_type resource. - */ - public static function projectLocationSessionEntityTypeName($project, $location, $session, $entityType) - { - return self::getProjectLocationSessionEntityTypeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_session resource. - * - * @param string $project - * @param string $session - * - * @return string The formatted project_session resource. - */ - public static function projectSessionName($project, $session) - { - return self::getProjectSessionNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_session_entity_type resource. - * - * @param string $project - * @param string $session - * @param string $entityType - * - * @return string The formatted project_session_entity_type resource. - */ - public static function projectSessionEntityTypeName($project, $session, $entityType) - { - return self::getProjectSessionEntityTypeNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a session - * resource. - * - * @param string $project - * @param string $session - * - * @return string The formatted session resource. - */ - public static function sessionName($project, $session) - { - return self::getSessionNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * session_entity_type resource. - * - * @param string $project - * @param string $session - * @param string $entityType - * - * @return string The formatted session_entity_type resource. - */ - public static function sessionEntityTypeName($project, $session, $entityType) - { - return self::getSessionEntityTypeNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - projectEnvironmentUserSession: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session} - * - projectEnvironmentUserSessionEntityType: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type} - * - projectLocationEnvironmentUserSession: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session} - * - projectLocationEnvironmentUserSessionEntityType: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type} - * - projectLocationSession: projects/{project}/locations/{location}/agent/sessions/{session} - * - projectLocationSessionEntityType: projects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type} - * - projectSession: projects/{project}/agent/sessions/{session} - * - projectSessionEntityType: projects/{project}/agent/sessions/{session}/entityTypes/{entity_type} - * - session: projects/{project}/agent/sessions/{session} - * - sessionEntityType: projects/{project}/agent/sessions/{session}/entityTypes/{entity_type} - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Creates a session entity type. - * - * If the specified session entity type already exists, overrides the session - * entity type. - * - * This method doesn't work with Google Assistant integration. - * Contact Dialogflow support if you need to use session entities - * with Google Assistant integration. - * - * Sample code: - * ``` - * $sessionEntityTypesClient = new SessionEntityTypesClient(); - * try { - * $formattedParent = $sessionEntityTypesClient->sessionName('[PROJECT]', '[SESSION]'); - * $sessionEntityType = new SessionEntityType(); - * $response = $sessionEntityTypesClient->createSessionEntityType($formattedParent, $sessionEntityType); - * } finally { - * $sessionEntityTypesClient->close(); - * } - * ``` - * - * @param string $parent Required. The session to create a session entity type for. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @param SessionEntityType $sessionEntityType Required. The session entity type 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\Dialogflow\V2\SessionEntityType - * - * @throws ApiException if the remote call fails - */ - public function createSessionEntityType($parent, $sessionEntityType, array $optionalArgs = []) - { - $request = new CreateSessionEntityTypeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSessionEntityType($sessionEntityType); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSessionEntityType', SessionEntityType::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified session entity type. - * - * This method doesn't work with Google Assistant integration. - * Contact Dialogflow support if you need to use session entities - * with Google Assistant integration. - * - * Sample code: - * ``` - * $sessionEntityTypesClient = new SessionEntityTypesClient(); - * try { - * $formattedName = $sessionEntityTypesClient->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); - * $sessionEntityTypesClient->deleteSessionEntityType($formattedName); - * } finally { - * $sessionEntityTypesClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the entity type to delete. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @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 deleteSessionEntityType($name, array $optionalArgs = []) - { - $request = new DeleteSessionEntityTypeRequest(); - $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('DeleteSessionEntityType', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the specified session entity type. - * - * This method doesn't work with Google Assistant integration. - * Contact Dialogflow support if you need to use session entities - * with Google Assistant integration. - * - * Sample code: - * ``` - * $sessionEntityTypesClient = new SessionEntityTypesClient(); - * try { - * $formattedName = $sessionEntityTypesClient->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); - * $response = $sessionEntityTypesClient->getSessionEntityType($formattedName); - * } finally { - * $sessionEntityTypesClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the session entity type. Format: - * `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @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\Dialogflow\V2\SessionEntityType - * - * @throws ApiException if the remote call fails - */ - public function getSessionEntityType($name, array $optionalArgs = []) - { - $request = new GetSessionEntityTypeRequest(); - $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('GetSessionEntityType', SessionEntityType::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all session entity types in the specified session. - * - * This method doesn't work with Google Assistant integration. - * Contact Dialogflow support if you need to use session entities - * with Google Assistant integration. - * - * Sample code: - * ``` - * $sessionEntityTypesClient = new SessionEntityTypesClient(); - * try { - * $formattedParent = $sessionEntityTypesClient->sessionName('[PROJECT]', '[SESSION]'); - * // Iterate over pages of elements - * $pagedResponse = $sessionEntityTypesClient->listSessionEntityTypes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $sessionEntityTypesClient->listSessionEntityTypes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $sessionEntityTypesClient->close(); - * } - * ``` - * - * @param string $parent Required. The session to list all session entity types from. - * Format: `projects//agent/sessions/` or - * `projects//agent/environments//users// - * sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - * @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 listSessionEntityTypes($parent, array $optionalArgs = []) - { - $request = new ListSessionEntityTypesRequest(); - $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('ListSessionEntityTypes', $optionalArgs, ListSessionEntityTypesResponse::class, $request); - } - - /** - * Updates the specified session entity type. - * - * This method doesn't work with Google Assistant integration. - * Contact Dialogflow support if you need to use session entities - * with Google Assistant integration. - * - * Sample code: - * ``` - * $sessionEntityTypesClient = new SessionEntityTypesClient(); - * try { - * $sessionEntityType = new SessionEntityType(); - * $response = $sessionEntityTypesClient->updateSessionEntityType($sessionEntityType); - * } finally { - * $sessionEntityTypesClient->close(); - * } - * ``` - * - * @param SessionEntityType $sessionEntityType Required. The session entity type to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. The mask to control which fields get 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\Dialogflow\V2\SessionEntityType - * - * @throws ApiException if the remote call fails - */ - public function updateSessionEntityType($sessionEntityType, array $optionalArgs = []) - { - $request = new UpdateSessionEntityTypeRequest(); - $requestParamHeaders = []; - $request->setSessionEntityType($sessionEntityType); - $requestParamHeaders['session_entity_type.name'] = $sessionEntityType->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('UpdateSessionEntityType', SessionEntityType::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $sessionEntityTypesClient = new SessionEntityTypesClient(); - * try { - * $response = $sessionEntityTypesClient->getLocation(); - * } finally { - * $sessionEntityTypesClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $sessionEntityTypesClient = new SessionEntityTypesClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $sessionEntityTypesClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $sessionEntityTypesClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $sessionEntityTypesClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionsGapicClient.php deleted file mode 100644 index 6290e0ba300a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/SessionsGapicClient.php +++ /dev/null @@ -1,698 +0,0 @@ -sessionName('[PROJECT]', '[SESSION]'); - * $queryInput = new QueryInput(); - * $response = $sessionsClient->detectIntent($formattedSession, $queryInput); - * } finally { - * $sessionsClient->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. - */ -class SessionsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Sessions'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $projectEnvironmentUserSessionNameTemplate; - - private static $projectLocationEnvironmentUserSessionNameTemplate; - - private static $projectLocationSessionNameTemplate; - - private static $projectSessionNameTemplate; - - private static $sessionNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sessions_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sessions_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sessions_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sessions_rest_client_config.php', - ], - ], - ]; - } - - private static function getProjectEnvironmentUserSessionNameTemplate() - { - if (self::$projectEnvironmentUserSessionNameTemplate == null) { - self::$projectEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}'); - } - - return self::$projectEnvironmentUserSessionNameTemplate; - } - - private static function getProjectLocationEnvironmentUserSessionNameTemplate() - { - if (self::$projectLocationEnvironmentUserSessionNameTemplate == null) { - self::$projectLocationEnvironmentUserSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}'); - } - - return self::$projectLocationEnvironmentUserSessionNameTemplate; - } - - private static function getProjectLocationSessionNameTemplate() - { - if (self::$projectLocationSessionNameTemplate == null) { - self::$projectLocationSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/sessions/{session}'); - } - - return self::$projectLocationSessionNameTemplate; - } - - private static function getProjectSessionNameTemplate() - { - if (self::$projectSessionNameTemplate == null) { - self::$projectSessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); - } - - return self::$projectSessionNameTemplate; - } - - private static function getSessionNameTemplate() - { - if (self::$sessionNameTemplate == null) { - self::$sessionNameTemplate = new PathTemplate('projects/{project}/agent/sessions/{session}'); - } - - return self::$sessionNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'projectEnvironmentUserSession' => self::getProjectEnvironmentUserSessionNameTemplate(), - 'projectLocationEnvironmentUserSession' => self::getProjectLocationEnvironmentUserSessionNameTemplate(), - 'projectLocationSession' => self::getProjectLocationSessionNameTemplate(), - 'projectSession' => self::getProjectSessionNameTemplate(), - 'session' => self::getSessionNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_environment_user_session resource. - * - * @param string $project - * @param string $environment - * @param string $user - * @param string $session - * - * @return string The formatted project_environment_user_session resource. - */ - public static function projectEnvironmentUserSessionName($project, $environment, $user, $session) - { - return self::getProjectEnvironmentUserSessionNameTemplate()->render([ - 'project' => $project, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_environment_user_session resource. - * - * @param string $project - * @param string $location - * @param string $environment - * @param string $user - * @param string $session - * - * @return string The formatted project_location_environment_user_session resource. - */ - public static function projectLocationEnvironmentUserSessionName($project, $location, $environment, $user, $session) - { - return self::getProjectLocationEnvironmentUserSessionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'environment' => $environment, - 'user' => $user, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_session resource. - * - * @param string $project - * @param string $location - * @param string $session - * - * @return string The formatted project_location_session resource. - */ - public static function projectLocationSessionName($project, $location, $session) - { - return self::getProjectLocationSessionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_session resource. - * - * @param string $project - * @param string $session - * - * @return string The formatted project_session resource. - */ - public static function projectSessionName($project, $session) - { - return self::getProjectSessionNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a session - * resource. - * - * @param string $project - * @param string $session - * - * @return string The formatted session resource. - */ - public static function sessionName($project, $session) - { - return self::getSessionNameTemplate()->render([ - 'project' => $project, - 'session' => $session, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - projectEnvironmentUserSession: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session} - * - projectLocationEnvironmentUserSession: projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session} - * - projectLocationSession: projects/{project}/locations/{location}/agent/sessions/{session} - * - projectSession: projects/{project}/agent/sessions/{session} - * - session: projects/{project}/agent/sessions/{session} - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Processes a natural language query and returns structured, actionable data - * as a result. This method is not idempotent, because it may cause contexts - * and session entity types to be updated, which in turn might affect - * results of future queries. - * - * If you might use - * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) - * or other CCAI products now or in the future, consider using - * [AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] - * instead of `DetectIntent`. `AnalyzeContent` has additional - * functionality for Agent Assist and other CCAI products. - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Sample code: - * ``` - * $sessionsClient = new SessionsClient(); - * try { - * $formattedSession = $sessionsClient->sessionName('[PROJECT]', '[SESSION]'); - * $queryInput = new QueryInput(); - * $response = $sessionsClient->detectIntent($formattedSession, $queryInput); - * } finally { - * $sessionsClient->close(); - * } - * ``` - * - * @param string $session Required. The name of the session this query is sent to. Format: - * `projects//agent/sessions/`, or - * `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - * default 'draft' environment (`Environment ID` might be referred to as - * environment name at some places). If `User ID` is not specified, we are - * using "-". It's up to the API caller to choose an appropriate `Session ID` - * and `User Id`. They can be a random number or some type of user and session - * identifiers (preferably hashed). The length of the `Session ID` and - * `User ID` must not exceed 36 characters. - * - * For more information, see the [API interactions - * guide](https://cloud.google.com/dialogflow/docs/api-overview). - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * @param QueryInput $queryInput Required. The input specification. It can be set to: - * - * 1. an audio config - * which instructs the speech recognizer how to process the speech audio, - * - * 2. a conversational query in the form of text, or - * - * 3. an event that specifies which intent to trigger. - * @param array $optionalArgs { - * Optional. - * - * @type QueryParameters $queryParams - * The parameters of this query. - * @type OutputAudioConfig $outputAudioConfig - * Instructs the speech synthesizer how to generate the output - * audio. If this field is not set and agent-level speech synthesizer is not - * configured, no output audio is generated. - * @type FieldMask $outputAudioConfigMask - * Mask for - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * indicating which settings in this request-level config should override - * speech synthesizer settings defined at agent-level. - * - * If unspecified or empty, - * [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] - * replaces the agent-level config in its entirety. - * @type string $inputAudio - * The natural language speech audio to be processed. This field - * should be populated iff `query_input` is set to an input audio config. - * A single request can contain up to 1 minute of speech audio data. - * @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\Dialogflow\V2\DetectIntentResponse - * - * @throws ApiException if the remote call fails - */ - public function detectIntent($session, $queryInput, array $optionalArgs = []) - { - $request = new DetectIntentRequest(); - $requestParamHeaders = []; - $request->setSession($session); - $request->setQueryInput($queryInput); - $requestParamHeaders['session'] = $session; - if (isset($optionalArgs['queryParams'])) { - $request->setQueryParams($optionalArgs['queryParams']); - } - - if (isset($optionalArgs['outputAudioConfig'])) { - $request->setOutputAudioConfig($optionalArgs['outputAudioConfig']); - } - - if (isset($optionalArgs['outputAudioConfigMask'])) { - $request->setOutputAudioConfigMask($optionalArgs['outputAudioConfigMask']); - } - - if (isset($optionalArgs['inputAudio'])) { - $request->setInputAudio($optionalArgs['inputAudio']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DetectIntent', DetectIntentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Processes a natural language query in audio format in a streaming fashion - * and returns structured, actionable data as a result. This method is only - * available via the gRPC API (not REST). - * - * If you might use - * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) - * or other CCAI products now or in the future, consider using - * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] - * instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has - * additional functionality for Agent Assist and other CCAI products. - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * - * Sample code: - * ``` - * $sessionsClient = new SessionsClient(); - * try { - * $session = 'session'; - * $queryInput = new QueryInput(); - * $request = new StreamingDetectIntentRequest(); - * $request->setSession($session); - * $request->setQueryInput($queryInput); - * // Write all requests to the server, then read all responses until the - * // stream is complete - * $requests = [ - * $request, - * ]; - * $stream = $sessionsClient->streamingDetectIntent(); - * $stream->writeAll($requests); - * foreach ($stream->closeWriteAndReadAll() as $element) { - * // doSomethingWith($element); - * } - * // Alternatively: - * // Write requests individually, making read() calls if - * // required. Call closeWrite() once writes are complete, and read the - * // remaining responses from the server. - * $requests = [ - * $request, - * ]; - * $stream = $sessionsClient->streamingDetectIntent(); - * foreach ($requests as $request) { - * $stream->write($request); - * // if required, read a single response from the stream - * $element = $stream->read(); - * // doSomethingWith($element) - * } - * $stream->closeWrite(); - * $element = $stream->read(); - * while (!is_null($element)) { - * // doSomethingWith($element) - * $element = $stream->read(); - * } - * } finally { - * $sessionsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\BidiStream - * - * @throws ApiException if the remote call fails - */ - public function streamingDetectIntent(array $optionalArgs = []) - { - return $this->startCall('StreamingDetectIntent', StreamingDetectIntentResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $sessionsClient = new SessionsClient(); - * try { - * $response = $sessionsClient->getLocation(); - * } finally { - * $sessionsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $sessionsClient = new SessionsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $sessionsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $sessionsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $sessionsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/VersionsGapicClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/VersionsGapicClient.php deleted file mode 100644 index d404880bb4c1..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/Gapic/VersionsGapicClient.php +++ /dev/null @@ -1,779 +0,0 @@ -agentName('[PROJECT]'); - * $version = new Version(); - * $response = $versionsClient->createVersion($formattedParent, $version); - * } finally { - * $versionsClient->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. - */ -class VersionsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dialogflow.v2.Versions'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** 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', - 'https://www.googleapis.com/auth/dialogflow', - ]; - - private static $agentNameTemplate; - - private static $projectAgentNameTemplate; - - private static $projectLocationAgentNameTemplate; - - private static $projectLocationVersionNameTemplate; - - private static $projectVersionNameTemplate; - - private static $versionNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/versions_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/versions_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/versions_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/versions_rest_client_config.php', - ], - ], - ]; - } - - private static function getAgentNameTemplate() - { - if (self::$agentNameTemplate == null) { - self::$agentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$agentNameTemplate; - } - - private static function getProjectAgentNameTemplate() - { - if (self::$projectAgentNameTemplate == null) { - self::$projectAgentNameTemplate = new PathTemplate('projects/{project}/agent'); - } - - return self::$projectAgentNameTemplate; - } - - private static function getProjectLocationAgentNameTemplate() - { - if (self::$projectLocationAgentNameTemplate == null) { - self::$projectLocationAgentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent'); - } - - return self::$projectLocationAgentNameTemplate; - } - - private static function getProjectLocationVersionNameTemplate() - { - if (self::$projectLocationVersionNameTemplate == null) { - self::$projectLocationVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/agent/versions/{version}'); - } - - return self::$projectLocationVersionNameTemplate; - } - - private static function getProjectVersionNameTemplate() - { - if (self::$projectVersionNameTemplate == null) { - self::$projectVersionNameTemplate = new PathTemplate('projects/{project}/agent/versions/{version}'); - } - - return self::$projectVersionNameTemplate; - } - - private static function getVersionNameTemplate() - { - if (self::$versionNameTemplate == null) { - self::$versionNameTemplate = new PathTemplate('projects/{project}/agent/versions/{version}'); - } - - return self::$versionNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'agent' => self::getAgentNameTemplate(), - 'projectAgent' => self::getProjectAgentNameTemplate(), - 'projectLocationAgent' => self::getProjectLocationAgentNameTemplate(), - 'projectLocationVersion' => self::getProjectLocationVersionNameTemplate(), - 'projectVersion' => self::getProjectVersionNameTemplate(), - 'version' => self::getVersionNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * - * @return string The formatted agent resource. - */ - public static function agentName($project) - { - return self::getAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_agent resource. - * - * @param string $project - * - * @return string The formatted project_agent resource. - */ - public static function projectAgentName($project) - { - return self::getProjectAgentNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted project_location_agent resource. - */ - public static function projectLocationAgentName($project, $location) - { - return self::getProjectLocationAgentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_version resource. - * - * @param string $project - * @param string $location - * @param string $version - * - * @return string The formatted project_location_version resource. - */ - public static function projectLocationVersionName($project, $location, $version) - { - return self::getProjectLocationVersionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_version resource. - * - * @param string $project - * @param string $version - * - * @return string The formatted project_version resource. - */ - public static function projectVersionName($project, $version) - { - return self::getProjectVersionNameTemplate()->render([ - 'project' => $project, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a version - * resource. - * - * @param string $project - * @param string $version - * - * @return string The formatted version resource. - */ - public static function versionName($project, $version) - { - return self::getVersionNameTemplate()->render([ - 'project' => $project, - 'version' => $version, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - agent: projects/{project}/agent - * - projectAgent: projects/{project}/agent - * - projectLocationAgent: projects/{project}/locations/{location}/agent - * - projectLocationVersion: projects/{project}/locations/{location}/agent/versions/{version} - * - projectVersion: projects/{project}/agent/versions/{version} - * - version: projects/{project}/agent/versions/{version} - * - * 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"); - } - - /** - * 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 'dialogflow.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); - } - - /** - * Creates an agent version. - * - * The new version points to the agent instance in the "default" environment. - * - * Sample code: - * ``` - * $versionsClient = new VersionsClient(); - * try { - * $formattedParent = $versionsClient->agentName('[PROJECT]'); - * $version = new Version(); - * $response = $versionsClient->createVersion($formattedParent, $version); - * } finally { - * $versionsClient->close(); - * } - * ``` - * - * @param string $parent Required. The agent to create a version for. - * Supported formats: - * - * - `projects//agent` - * - `projects//locations//agent` - * @param Version $version Required. The version 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\Dialogflow\V2\Version - * - * @throws ApiException if the remote call fails - */ - public function createVersion($parent, $version, array $optionalArgs = []) - { - $request = new CreateVersionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setVersion($version); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateVersion', Version::class, $optionalArgs, $request)->wait(); - } - - /** - * Delete the specified agent version. - * - * Sample code: - * ``` - * $versionsClient = new VersionsClient(); - * try { - * $formattedName = $versionsClient->versionName('[PROJECT]', '[VERSION]'); - * $versionsClient->deleteVersion($formattedName); - * } finally { - * $versionsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the version to delete. - * Supported formats: - * - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * @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 deleteVersion($name, array $optionalArgs = []) - { - $request = new DeleteVersionRequest(); - $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('DeleteVersion', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the specified agent version. - * - * Sample code: - * ``` - * $versionsClient = new VersionsClient(); - * try { - * $formattedName = $versionsClient->versionName('[PROJECT]', '[VERSION]'); - * $response = $versionsClient->getVersion($formattedName); - * } finally { - * $versionsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the version. - * Supported formats: - * - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * @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\Dialogflow\V2\Version - * - * @throws ApiException if the remote call fails - */ - public function getVersion($name, array $optionalArgs = []) - { - $request = new GetVersionRequest(); - $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('GetVersion', Version::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all versions of the specified agent. - * - * Sample code: - * ``` - * $versionsClient = new VersionsClient(); - * try { - * $formattedParent = $versionsClient->agentName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $versionsClient->listVersions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $versionsClient->listVersions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $versionsClient->close(); - * } - * ``` - * - * @param string $parent Required. The agent to list all versions from. - * Supported formats: - * - * - `projects//agent` - * - `projects//locations//agent` - * @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 listVersions($parent, array $optionalArgs = []) - { - $request = new ListVersionsRequest(); - $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('ListVersions', $optionalArgs, ListVersionsResponse::class, $request); - } - - /** - * Updates the specified agent version. - * - * Note that this method does not allow you to update the state of the agent - * the given version points to. It allows you to update only mutable - * properties of the version resource. - * - * Sample code: - * ``` - * $versionsClient = new VersionsClient(); - * try { - * $version = new Version(); - * $updateMask = new FieldMask(); - * $response = $versionsClient->updateVersion($version, $updateMask); - * } finally { - * $versionsClient->close(); - * } - * ``` - * - * @param Version $version Required. The version to update. - * Supported formats: - * - * - `projects//agent/versions/` - * - `projects//locations//agent/versions/` - * @param FieldMask $updateMask Required. The mask to control which fields get 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\Dialogflow\V2\Version - * - * @throws ApiException if the remote call fails - */ - public function updateVersion($version, $updateMask, array $optionalArgs = []) - { - $request = new UpdateVersionRequest(); - $requestParamHeaders = []; - $request->setVersion($version); - $request->setUpdateMask($updateMask); - $requestParamHeaders['version.name'] = $version->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateVersion', Version::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $versionsClient = new VersionsClient(); - * try { - * $response = $versionsClient->getLocation(); - * } finally { - * $versionsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $versionsClient = new VersionsClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $versionsClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $versionsClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $versionsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - 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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/IntentsClient.php b/owl-bot-staging/Dialogflow/v2/src/V2/IntentsClient.php deleted file mode 100644 index 028165b14025..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/IntentsClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Agents' => [ - 'ExportAgent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ExportAgentResponse', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ImportAgent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'RestoreAgent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'TrainAgent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'SearchAgents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAgents', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_rest_client_config.php deleted file mode 100644 index 1212b8a0f942..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/agents_rest_client_config.php +++ /dev/null @@ -1,250 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Agents' => [ - 'DeleteAgent' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{parent=projects/*}/agent', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ExportAgent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/agent:export', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:export', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetAgent' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/agent', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetValidationResult' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/agent/validationResult', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent/validationResult', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ImportAgent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/agent:import', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:import', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RestoreAgent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/agent:restore', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:restore', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchAgents' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/agent:search', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:search', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetAgent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{agent.parent=projects/*}/agent', - 'body' => 'agent', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{agent.parent=projects/*/locations/*}/agent', - 'body' => 'agent', - ], - ], - 'placeholders' => [ - 'agent.parent' => [ - 'getters' => [ - 'getAgent', - 'getParent', - ], - ], - ], - ], - 'TrainAgent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/agent:train', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/agent:train', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_client_config.json deleted file mode 100644 index 2114a79c3ccc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_client_config.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.AnswerRecords": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "ListAnswerRecords": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAnswerRecord": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_descriptor_config.php deleted file mode 100644 index e2c3cb98c808..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.AnswerRecords' => [ - 'ListAnswerRecords' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAnswerRecords', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_rest_client_config.php deleted file mode 100644 index be58c5eb38bf..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/answer_records_rest_client_config.php +++ /dev/null @@ -1,129 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.AnswerRecords' => [ - 'ListAnswerRecords' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/answerRecords', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/answerRecords', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAnswerRecord' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{answer_record.name=projects/*/answerRecords/*}', - 'body' => 'answer_record', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{answer_record.name=projects/*/locations/*/answerRecords/*}', - 'body' => 'answer_record', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'answer_record.name' => [ - 'getters' => [ - 'getAnswerRecord', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_client_config.json deleted file mode 100644 index 405824724392..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_client_config.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.Contexts": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateContext": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteAllContexts": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteContext": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetContext": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListContexts": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateContext": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_descriptor_config.php deleted file mode 100644 index 8c7bca79bfcb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Contexts' => [ - 'ListContexts' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getContexts', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_rest_client_config.php deleted file mode 100644 index 5aa624661cfd..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/contexts_rest_client_config.php +++ /dev/null @@ -1,245 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Contexts' => [ - 'CreateContext' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/contexts', - 'body' => 'context', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts', - 'body' => 'context', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts', - 'body' => 'context', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts', - 'body' => 'context', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAllContexts' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/contexts', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteContext' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/sessions/*/contexts/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetContext' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/sessions/*/contexts/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListContexts' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/contexts', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateContext' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{context.name=projects/*/agent/sessions/*/contexts/*}', - 'body' => 'context', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}', - 'body' => 'context', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}', - 'body' => 'context', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}', - 'body' => 'context', - ], - ], - 'placeholders' => [ - 'context.name' => [ - 'getters' => [ - 'getContext', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_client_config.json deleted file mode 100644 index bbee4eabff14..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.ConversationDatasets": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateConversationDataset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteConversationDataset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetConversationDataset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportConversationData": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListConversationDatasets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_descriptor_config.php deleted file mode 100644 index c1bec8536300..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_descriptor_config.php +++ /dev/null @@ -1,58 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.ConversationDatasets' => [ - 'CreateConversationDataset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationDataset', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\CreateConversationDatasetOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteConversationDataset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\DeleteConversationDatasetOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ImportConversationData' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ImportConversationDataOperationResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\ImportConversationDataOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListConversationDatasets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConversationDatasets', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_rest_client_config.php deleted file mode 100644 index 762313f329f2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_datasets_rest_client_config.php +++ /dev/null @@ -1,162 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.ConversationDatasets' => [ - 'CreateConversationDataset' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationDatasets', - 'body' => 'conversation_dataset', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConversationDataset' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationDatasets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConversationDataset' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/conversationDatasets/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationDatasets/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportConversationData' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/conversationDatasets/*}:importConversationData', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationDatasets/*}:importConversationData', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConversationDatasets' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/conversationDatasets', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationDatasets', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_client_config.json deleted file mode 100644 index ecdf8c5a3de4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_client_config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.ConversationModels": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateConversationModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateConversationModelEvaluation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteConversationModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeployConversationModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetConversationModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetConversationModelEvaluation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListConversationModelEvaluations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListConversationModels": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UndeployConversationModel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_descriptor_config.php deleted file mode 100644 index ae2966d2becb..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_descriptor_config.php +++ /dev/null @@ -1,88 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.ConversationModels' => [ - 'CreateConversationModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationModel', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\CreateConversationModelOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'CreateConversationModelEvaluation' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationModelEvaluation', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\CreateConversationModelEvaluationOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteConversationModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\DeleteConversationModelOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeployConversationModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\DeployConversationModelOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UndeployConversationModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\UndeployConversationModelOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListConversationModelEvaluations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConversationModelEvaluations', - ], - ], - 'ListConversationModels' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConversationModels', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_rest_client_config.php deleted file mode 100644 index 88d3051f1cbc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_models_rest_client_config.php +++ /dev/null @@ -1,240 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.ConversationModels' => [ - 'CreateConversationModel' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/conversationModels', - 'body' => 'conversation_model', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationModels', - 'body' => 'conversation_model', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateConversationModelEvaluation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConversationModel' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeployConversationModel' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*}:deploy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*}:deploy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConversationModel' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConversationModelEvaluation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*/evaluations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*/evaluations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConversationModelEvaluations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/conversationModels/*}/evaluations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListConversationModels' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/conversationModels', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationModels', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UndeployConversationModel' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/conversationModels/*}:undeploy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationModels/*}:undeploy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_client_config.json deleted file mode 100644 index 2898ad3018aa..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_client_config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.ConversationProfiles": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "ClearSuggestionFeatureConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateConversationProfile": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteConversationProfile": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetConversationProfile": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListConversationProfiles": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetSuggestionFeatureConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateConversationProfile": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_descriptor_config.php deleted file mode 100644 index b2f00f3ce3ae..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_descriptor_config.php +++ /dev/null @@ -1,48 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.ConversationProfiles' => [ - 'ClearSuggestionFeatureConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationProfile', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\ClearSuggestionFeatureConfigOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'SetSuggestionFeatureConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ConversationProfile', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\SetSuggestionFeatureConfigOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListConversationProfiles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConversationProfiles', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_rest_client_config.php deleted file mode 100644 index 332fc52eec04..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversation_profiles_rest_client_config.php +++ /dev/null @@ -1,220 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.ConversationProfiles' => [ - 'ClearSuggestionFeatureConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'conversation_profile' => [ - 'getters' => [ - 'getConversationProfile', - ], - ], - ], - ], - 'CreateConversationProfile' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/conversationProfiles', - 'body' => 'conversation_profile', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationProfiles', - 'body' => 'conversation_profile', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConversationProfile' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/conversationProfiles/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationProfiles/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConversationProfile' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/conversationProfiles/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversationProfiles/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConversationProfiles' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/conversationProfiles', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversationProfiles', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetSuggestionFeatureConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'conversation_profile' => [ - 'getters' => [ - 'getConversationProfile', - ], - ], - ], - ], - 'UpdateConversationProfile' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{conversation_profile.name=projects/*/conversationProfiles/*}', - 'body' => 'conversation_profile', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}', - 'body' => 'conversation_profile', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'conversation_profile.name' => [ - 'getters' => [ - 'getConversationProfile', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_client_config.json deleted file mode 100644 index 47e5785bc38a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_client_config.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.Conversations": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CompleteConversation": { - "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" - }, - "GetConversation": { - "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" - }, - "ListMessages": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SuggestConversationSummary": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_descriptor_config.php deleted file mode 100644 index a50e979386ed..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_descriptor_config.php +++ /dev/null @@ -1,38 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Conversations' => [ - 'ListConversations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConversations', - ], - ], - 'ListMessages' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMessages', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_rest_client_config.php deleted file mode 100644 index 4aab11384239..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/conversations_rest_client_config.php +++ /dev/null @@ -1,194 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Conversations' => [ - 'CompleteConversation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/conversations/*}:complete', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversations/*}:complete', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateConversation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/conversations', - 'body' => 'conversation', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversations', - 'body' => 'conversation', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetConversation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/conversations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConversations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/conversations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/conversations', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMessages' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/conversations/*}/messages', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*}/messages', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SuggestConversationSummary' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{conversation=projects/*/conversations/*}/suggestions:suggestConversationSummary', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:suggestConversationSummary', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'conversation' => [ - 'getters' => [ - 'getConversation', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_client_config.json deleted file mode 100644 index aaddca9c9fcc..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.Documents": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ExportDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ReloadDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_descriptor_config.php deleted file mode 100644 index de7cbd88bfc7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_descriptor_config.php +++ /dev/null @@ -1,88 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Documents' => [ - 'CreateDocument' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\Document', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteDocument' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ExportDocument' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\Document', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ImportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\ImportDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ReloadDocument' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\Document', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateDocument' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\Document', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\V2\KnowledgeOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListDocuments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDocuments', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_rest_client_config.php deleted file mode 100644 index f8d1387de2f2..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/documents_rest_client_config.php +++ /dev/null @@ -1,260 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Documents' => [ - 'CreateDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/knowledgeBases/*}/documents', - 'body' => 'document', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents', - 'body' => 'document', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent/knowledgeBases/*}/documents', - 'body' => 'document', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDocument' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*/documents/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*/documents/*}:export', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:export', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDocument' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*/documents/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/knowledgeBases/*}/documents:import', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents:import', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/knowledgeBases/*}/documents', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent/knowledgeBases/*}/documents', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ReloadDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*/documents/*}:reload', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:reload', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{document.name=projects/*/knowledgeBases/*/documents/*}', - 'body' => 'document', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{document.name=projects/*/locations/*/knowledgeBases/*/documents/*}', - 'body' => 'document', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{document.name=projects/*/agent/knowledgeBases/*/documents/*}', - 'body' => 'document', - ], - ], - 'placeholders' => [ - 'document.name' => [ - 'getters' => [ - 'getDocument', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_client_config.json deleted file mode 100644 index 0380bfe8f674..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.EntityTypes": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BatchCreateEntities": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "BatchDeleteEntities": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "BatchDeleteEntityTypes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "BatchUpdateEntities": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "BatchUpdateEntityTypes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateEntityType": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteEntityType": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEntityType": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEntityTypes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateEntityType": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_descriptor_config.php deleted file mode 100644 index 0fdbac2ea75b..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_descriptor_config.php +++ /dev/null @@ -1,78 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.EntityTypes' => [ - 'BatchCreateEntities' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'BatchDeleteEntities' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'BatchDeleteEntityTypes' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'BatchUpdateEntities' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'BatchUpdateEntityTypes' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\BatchUpdateEntityTypesResponse', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListEntityTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntityTypes', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_rest_client_config.php deleted file mode 100644 index 76dd3e467342..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/entity_types_rest_client_config.php +++ /dev/null @@ -1,271 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.EntityTypes' => [ - 'BatchCreateEntities' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchDeleteEntities' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchDeleteEntityTypes' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/entityTypes:batchDelete', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchUpdateEntities' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchUpdateEntityTypes' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/entityTypes:batchUpdate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEntityType' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/entityTypes', - 'body' => 'entity_type', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/entityTypes', - 'body' => 'entity_type', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEntityType' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/entityTypes/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/entityTypes/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEntityType' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/entityTypes/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/entityTypes/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEntityTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/entityTypes', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/entityTypes', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEntityType' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{entity_type.name=projects/*/agent/entityTypes/*}', - 'body' => 'entity_type', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}', - 'body' => 'entity_type', - ], - ], - 'placeholders' => [ - 'entity_type.name' => [ - 'getters' => [ - 'getEntityType', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_client_config.json deleted file mode 100644 index 00d6f74b6016..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_client_config.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.Environments": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEnvironmentHistory": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEnvironments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_descriptor_config.php deleted file mode 100644 index 3c8963c579bf..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_descriptor_config.php +++ /dev/null @@ -1,38 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Environments' => [ - 'GetEnvironmentHistory' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntries', - ], - ], - 'ListEnvironments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEnvironments', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_rest_client_config.php deleted file mode 100644 index 5953798d6344..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/environments_rest_client_config.php +++ /dev/null @@ -1,205 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Environments' => [ - 'CreateEnvironment' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/environments', - 'body' => 'environment', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/environments', - 'body' => 'environment', - 'queryParams' => [ - 'environment_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'environment_id', - ], - ], - 'DeleteEnvironment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEnvironmentHistory' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*}/history', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*}/history', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/environments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/environments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEnvironment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{environment.name=projects/*/agent/environments/*}', - 'body' => 'environment', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{environment.name=projects/*/locations/*/agent/environments/*}', - 'body' => 'environment', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'environment.name' => [ - 'getters' => [ - 'getEnvironment', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_client_config.json deleted file mode 100644 index 8e6cc14bb9c3..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_client_config.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.Fulfillments": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "GetFulfillment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateFulfillment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_descriptor_config.php deleted file mode 100644 index c893d4531d1a..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_descriptor_config.php +++ /dev/null @@ -1,18 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Fulfillments' => [ - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_rest_client_config.php deleted file mode 100644 index 272e028f1c81..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/fulfillments_rest_client_config.php +++ /dev/null @@ -1,129 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Fulfillments' => [ - 'GetFulfillment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/fulfillment}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/fulfillment}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateFulfillment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{fulfillment.name=projects/*/agent/fulfillment}', - 'body' => 'fulfillment', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{fulfillment.name=projects/*/locations/*/agent/fulfillment}', - 'body' => 'fulfillment', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'fulfillment.name' => [ - 'getters' => [ - 'getFulfillment', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_client_config.json deleted file mode 100644 index f6d3f00e1293..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_client_config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.Intents": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BatchDeleteIntents": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "BatchUpdateIntents": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateIntent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteIntent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIntent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIntents": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateIntent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_descriptor_config.php deleted file mode 100644 index bd54f549761d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_descriptor_config.php +++ /dev/null @@ -1,48 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Intents' => [ - 'BatchDeleteIntents' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'BatchUpdateIntents' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\V2\BatchUpdateIntentsResponse', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListIntents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIntents', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_rest_client_config.php deleted file mode 100644 index 6c5df8324599..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/intents_rest_client_config.php +++ /dev/null @@ -1,222 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Intents' => [ - 'BatchDeleteIntents' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/intents:batchDelete', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/intents:batchDelete', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchUpdateIntents' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/intents:batchUpdate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/intents:batchUpdate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIntent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/intents', - 'body' => 'intent', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/intents', - 'body' => 'intent', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteIntent' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/intents/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/intents/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIntent' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/intents/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/intents/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListIntents' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/intents', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/intents', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*}/intents', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*}/intents', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateIntent' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{intent.name=projects/*/agent/intents/*}', - 'body' => 'intent', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{intent.name=projects/*/locations/*/agent/intents/*}', - 'body' => 'intent', - ], - ], - 'placeholders' => [ - 'intent.name' => [ - 'getters' => [ - 'getIntent', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_client_config.json deleted file mode 100644 index 8b18c4c682f0..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.KnowledgeBases": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateKnowledgeBase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteKnowledgeBase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetKnowledgeBase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListKnowledgeBases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateKnowledgeBase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_descriptor_config.php deleted file mode 100644 index f37323c4d63d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.KnowledgeBases' => [ - 'ListKnowledgeBases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getKnowledgeBases', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_rest_client_config.php deleted file mode 100644 index c801f5cd5963..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/knowledge_bases_rest_client_config.php +++ /dev/null @@ -1,198 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.KnowledgeBases' => [ - 'CreateKnowledgeBase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/knowledgeBases', - 'body' => 'knowledge_base', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/knowledgeBases', - 'body' => 'knowledge_base', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/knowledgeBases', - 'body' => 'knowledge_base', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteKnowledgeBase' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetKnowledgeBase' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/knowledgeBases/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/knowledgeBases/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/knowledgeBases/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListKnowledgeBases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/knowledgeBases', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/knowledgeBases', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/knowledgeBases', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateKnowledgeBase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{knowledge_base.name=projects/*/knowledgeBases/*}', - 'body' => 'knowledge_base', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{knowledge_base.name=projects/*/locations/*/knowledgeBases/*}', - 'body' => 'knowledge_base', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{knowledge_base.name=projects/*/agent/knowledgeBases/*}', - 'body' => 'knowledge_base', - ], - ], - 'placeholders' => [ - 'knowledge_base.name' => [ - 'getters' => [ - 'getKnowledgeBase', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_client_config.json deleted file mode 100644 index 7d7ae17012ef..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_client_config.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.Participants": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 220000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 220000, - "total_timeout_millis": 220000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 220000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 220000, - "total_timeout_millis": 220000 - } - }, - "methods": { - "AnalyzeContent": { - "timeout_millis": 220000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateParticipant": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetParticipant": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListParticipants": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "StreamingAnalyzeContent": { - "timeout_millis": 220000 - }, - "SuggestArticles": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SuggestFaqAnswers": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SuggestSmartReplies": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateParticipant": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_descriptor_config.php deleted file mode 100644 index 84364702e3ca..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_descriptor_config.php +++ /dev/null @@ -1,33 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Participants' => [ - 'ListParticipants' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getParticipants', - ], - ], - 'StreamingAnalyzeContent' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_rest_client_config.php deleted file mode 100644 index 29293e1cf8ba..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/participants_rest_client_config.php +++ /dev/null @@ -1,241 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Participants' => [ - 'AnalyzeContent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{participant=projects/*/conversations/*/participants/*}:analyzeContent', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'participant' => [ - 'getters' => [ - 'getParticipant', - ], - ], - ], - ], - 'CreateParticipant' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/conversations/*}/participants', - 'body' => 'participant', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*}/participants', - 'body' => 'participant', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetParticipant' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/conversations/*/participants/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/conversations/*/participants/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListParticipants' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/conversations/*}/participants', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*}/participants', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SuggestArticles' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SuggestFaqAnswers' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SuggestSmartReplies' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestSmartReplies', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestSmartReplies', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateParticipant' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{participant.name=projects/*/conversations/*/participants/*}', - 'body' => 'participant', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{participant.name=projects/*/locations/*/conversations/*/participants/*}', - 'body' => 'participant', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'participant.name' => [ - 'getters' => [ - 'getParticipant', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_client_config.json deleted file mode 100644 index 521ba47be243..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.SessionEntityTypes": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateSessionEntityType": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteSessionEntityType": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSessionEntityType": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSessionEntityTypes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateSessionEntityType": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_descriptor_config.php deleted file mode 100644 index 76a165bbb91e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.SessionEntityTypes' => [ - 'ListSessionEntityTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSessionEntityTypes', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_rest_client_config.php deleted file mode 100644 index b2cf293b33a8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/session_entity_types_rest_client_config.php +++ /dev/null @@ -1,220 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.SessionEntityTypes' => [ - 'CreateSessionEntityType' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/entityTypes', - 'body' => 'session_entity_type', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes', - 'body' => 'session_entity_type', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes', - 'body' => 'session_entity_type', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes', - 'body' => 'session_entity_type', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSessionEntityType' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/sessions/*/entityTypes/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSessionEntityType' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/sessions/*/entityTypes/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSessionEntityTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent/sessions/*}/entityTypes', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSessionEntityType' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}', - 'body' => 'session_entity_type', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', - 'body' => 'session_entity_type', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}', - 'body' => 'session_entity_type', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}', - 'body' => 'session_entity_type', - ], - ], - 'placeholders' => [ - 'session_entity_type.name' => [ - 'getters' => [ - 'getSessionEntityType', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_client_config.json deleted file mode 100644 index 4967706e6ba8..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_client_config.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.Sessions": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 220000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 220000, - "total_timeout_millis": 220000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 220000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 220000, - "total_timeout_millis": 220000 - } - }, - "methods": { - "DetectIntent": { - "timeout_millis": 220000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "StreamingDetectIntent": { - "timeout_millis": 220000 - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_descriptor_config.php deleted file mode 100644 index 74682e515ec9..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_descriptor_config.php +++ /dev/null @@ -1,23 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Sessions' => [ - 'StreamingDetectIntent' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_rest_client_config.php deleted file mode 100644 index b7cba0ec4c2e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/sessions_rest_client_config.php +++ /dev/null @@ -1,115 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Sessions' => [ - 'DetectIntent' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{session=projects/*/agent/sessions/*}:detectIntent', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{session=projects/*/locations/*/agent/sessions/*}:detectIntent', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'session' => [ - 'getters' => [ - 'getSession', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_client_config.json b/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_client_config.json deleted file mode 100644 index e4e6368ea17f..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.v2.Versions": { - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListVersions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateVersion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_descriptor_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_descriptor_config.php deleted file mode 100644 index ed6b8a0c3c98..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Versions' => [ - 'ListVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVersions', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_rest_client_config.php b/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_rest_client_config.php deleted file mode 100644 index 0fce60904b1d..000000000000 --- a/owl-bot-staging/Dialogflow/v2/src/V2/resources/versions_rest_client_config.php +++ /dev/null @@ -1,182 +0,0 @@ - [ - 'google.cloud.dialogflow.v2.Versions' => [ - 'CreateVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/versions', - 'body' => 'version', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/versions', - 'body' => 'version', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteVersion' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/agent/versions/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/versions/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVersion' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/agent/versions/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/agent/versions/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/agent}/versions', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/agent}/versions', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateVersion' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{version.name=projects/*/agent/versions/*}', - 'body' => 'version', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{version.name=projects/*/locations/*/agent/versions/*}', - 'body' => 'version', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'version.name' => [ - 'getters' => [ - 'getVersion', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AgentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AgentsClientTest.php deleted file mode 100644 index 1341accc8fb7..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AgentsClientTest.php +++ /dev/null @@ -1,1012 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AgentsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AgentsClient($options); - } - - /** @test */ - public function deleteAgentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $gapicClient->deleteAgent($formattedParent); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Agents/DeleteAgent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAgentExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->deleteAgent($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 exportAgentTest() - { - $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/exportAgentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $agentUri2 = 'agentUri21997190245'; - $expectedResponse = new ExportAgentResponse(); - $expectedResponse->setAgentUri($agentUri2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportAgentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $agentUri = 'agentUri-1700713166'; - $response = $gapicClient->exportAgent($formattedParent, $agentUri); - $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.dialogflow.v2.Agents/ExportAgent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAgentUri(); - $this->assertProtobufEquals($agentUri, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportAgentTest'); - $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 exportAgentExceptionTest() - { - $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/exportAgentTest'); - $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->projectName('[PROJECT]'); - $agentUri = 'agentUri-1700713166'; - $response = $gapicClient->exportAgent($formattedParent, $agentUri); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportAgentTest'); - 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 getAgentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $parent2 = 'parent21175163357'; - $displayName = 'displayName1615086568'; - $defaultLanguageCode = 'defaultLanguageCode856575222'; - $timeZone = 'timeZone36848094'; - $description = 'description-1724546052'; - $avatarUri = 'avatarUri-402824826'; - $enableLogging = false; - $classificationThreshold = 1.11581064E8; - $expectedResponse = new Agent(); - $expectedResponse->setParent($parent2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setDescription($description); - $expectedResponse->setAvatarUri($avatarUri); - $expectedResponse->setEnableLogging($enableLogging); - $expectedResponse->setClassificationThreshold($classificationThreshold); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->getAgent($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.dialogflow.v2.Agents/GetAgent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAgentExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->getAgent($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 getValidationResultTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ValidationResult(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->getValidationResult($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.dialogflow.v2.Agents/GetValidationResult', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getValidationResultExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->getValidationResult($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 importAgentTest() - { - $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/importAgentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importAgentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->importAgent($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.dialogflow.v2.Agents/ImportAgent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAgentTest'); - $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 importAgentExceptionTest() - { - $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/importAgentTest'); - $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->projectName('[PROJECT]'); - $response = $gapicClient->importAgent($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAgentTest'); - 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 restoreAgentTest() - { - $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/restoreAgentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreAgentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->restoreAgent($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.dialogflow.v2.Agents/RestoreAgent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreAgentTest'); - $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 restoreAgentExceptionTest() - { - $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/restoreAgentTest'); - $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->projectName('[PROJECT]'); - $response = $gapicClient->restoreAgent($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreAgentTest'); - 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 searchAgentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $agentsElement = new Agent(); - $agents = [ - $agentsElement, - ]; - $expectedResponse = new SearchAgentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAgents($agents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->searchAgents($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAgents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Agents/SearchAgents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchAgentsExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->searchAgents($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 setAgentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $defaultLanguageCode = 'defaultLanguageCode856575222'; - $timeZone = 'timeZone36848094'; - $description = 'description-1724546052'; - $avatarUri = 'avatarUri-402824826'; - $enableLogging = false; - $classificationThreshold = 1.11581064E8; - $expectedResponse = new Agent(); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setDescription($description); - $expectedResponse->setAvatarUri($avatarUri); - $expectedResponse->setEnableLogging($enableLogging); - $expectedResponse->setClassificationThreshold($classificationThreshold); - $transport->addResponse($expectedResponse); - // Mock request - $agent = new Agent(); - $agentParent = $gapicClient->projectName('[PROJECT]'); - $agent->setParent($agentParent); - $agentDisplayName = 'agentDisplayName2121176616'; - $agent->setDisplayName($agentDisplayName); - $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; - $agent->setDefaultLanguageCode($agentDefaultLanguageCode); - $agentTimeZone = 'agentTimeZone-453669314'; - $agent->setTimeZone($agentTimeZone); - $response = $gapicClient->setAgent($agent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Agents/SetAgent', $actualFuncCall); - $actualValue = $actualRequestObject->getAgent(); - $this->assertProtobufEquals($agent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setAgentExceptionTest() - { - $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 - $agent = new Agent(); - $agentParent = $gapicClient->projectName('[PROJECT]'); - $agent->setParent($agentParent); - $agentDisplayName = 'agentDisplayName2121176616'; - $agent->setDisplayName($agentDisplayName); - $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; - $agent->setDefaultLanguageCode($agentDefaultLanguageCode); - $agentTimeZone = 'agentTimeZone-453669314'; - $agent->setTimeZone($agentTimeZone); - try { - $gapicClient->setAgent($agent); - // 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 trainAgentTest() - { - $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/trainAgentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/trainAgentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->trainAgent($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.dialogflow.v2.Agents/TrainAgent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/trainAgentTest'); - $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 trainAgentExceptionTest() - { - $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/trainAgentTest'); - $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->projectName('[PROJECT]'); - $response = $gapicClient->trainAgent($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/trainAgentTest'); - 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AnswerRecordsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AnswerRecordsClientTest.php deleted file mode 100644 index 804d1c0c9e59..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/AnswerRecordsClientTest.php +++ /dev/null @@ -1,322 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AnswerRecordsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AnswerRecordsClient($options); - } - - /** @test */ - public function listAnswerRecordsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $answerRecordsElement = new AnswerRecord(); - $answerRecords = [ - $answerRecordsElement, - ]; - $expectedResponse = new ListAnswerRecordsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAnswerRecords($answerRecords); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listAnswerRecords($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAnswerRecords()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.AnswerRecords/ListAnswerRecords', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAnswerRecordsExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listAnswerRecords($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 updateAnswerRecordTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new AnswerRecord(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $answerRecord = new AnswerRecord(); - $answerRecordAnswerFeedback = new AnswerFeedback(); - $answerRecord->setAnswerFeedback($answerRecordAnswerFeedback); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAnswerRecord($answerRecord, $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.dialogflow.v2.AnswerRecords/UpdateAnswerRecord', $actualFuncCall); - $actualValue = $actualRequestObject->getAnswerRecord(); - $this->assertProtobufEquals($answerRecord, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAnswerRecordExceptionTest() - { - $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 - $answerRecord = new AnswerRecord(); - $answerRecordAnswerFeedback = new AnswerFeedback(); - $answerRecord->setAnswerFeedback($answerRecordAnswerFeedback); - $updateMask = new FieldMask(); - try { - $gapicClient->updateAnswerRecord($answerRecord, $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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ContextsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ContextsClientTest.php deleted file mode 100644 index e6d0c6a53c64..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ContextsClientTest.php +++ /dev/null @@ -1,565 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ContextsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ContextsClient($options); - } - - /** @test */ - public function createContextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $lifespanCount = 1178775510; - $expectedResponse = new Context(); - $expectedResponse->setName($name); - $expectedResponse->setLifespanCount($lifespanCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $context = new Context(); - $contextName = 'contextName-103041830'; - $context->setName($contextName); - $response = $gapicClient->createContext($formattedParent, $context); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Contexts/CreateContext', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContext(); - $this->assertProtobufEquals($context, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createContextExceptionTest() - { - $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->sessionName('[PROJECT]', '[SESSION]'); - $context = new Context(); - $contextName = 'contextName-103041830'; - $context->setName($contextName); - try { - $gapicClient->createContext($formattedParent, $context); - // 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 deleteAllContextsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $gapicClient->deleteAllContexts($formattedParent); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Contexts/DeleteAllContexts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAllContextsExceptionTest() - { - $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->sessionName('[PROJECT]', '[SESSION]'); - try { - $gapicClient->deleteAllContexts($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 deleteContextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); - $gapicClient->deleteContext($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Contexts/DeleteContext', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContextExceptionTest() - { - $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->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); - try { - $gapicClient->deleteContext($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 getContextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $lifespanCount = 1178775510; - $expectedResponse = new Context(); - $expectedResponse->setName($name2); - $expectedResponse->setLifespanCount($lifespanCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); - $response = $gapicClient->getContext($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.dialogflow.v2.Contexts/GetContext', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getContextExceptionTest() - { - $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->contextName('[PROJECT]', '[SESSION]', '[CONTEXT]'); - try { - $gapicClient->getContext($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 listContextsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $contextsElement = new Context(); - $contexts = [ - $contextsElement, - ]; - $expectedResponse = new ListContextsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setContexts($contexts); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $response = $gapicClient->listContexts($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getContexts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Contexts/ListContexts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContextsExceptionTest() - { - $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->sessionName('[PROJECT]', '[SESSION]'); - try { - $gapicClient->listContexts($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 updateContextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $lifespanCount = 1178775510; - $expectedResponse = new Context(); - $expectedResponse->setName($name); - $expectedResponse->setLifespanCount($lifespanCount); - $transport->addResponse($expectedResponse); - // Mock request - $context = new Context(); - $contextName = 'contextName-103041830'; - $context->setName($contextName); - $response = $gapicClient->updateContext($context); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Contexts/UpdateContext', $actualFuncCall); - $actualValue = $actualRequestObject->getContext(); - $this->assertProtobufEquals($context, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContextExceptionTest() - { - $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 - $context = new Context(); - $contextName = 'contextName-103041830'; - $context->setName($contextName); - try { - $gapicClient->updateContext($context); - // 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationDatasetsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationDatasetsClientTest.php deleted file mode 100644 index c89e0f1221f4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationDatasetsClientTest.php +++ /dev/null @@ -1,700 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ConversationDatasetsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ConversationDatasetsClient($options); - } - - /** @test */ - public function createConversationDatasetTest() - { - $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/createConversationDatasetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $conversationCount = 1994187347; - $expectedResponse = new ConversationDataset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setConversationCount($conversationCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConversationDatasetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $conversationDataset = new ConversationDataset(); - $conversationDatasetDisplayName = 'conversationDatasetDisplayName-925930312'; - $conversationDataset->setDisplayName($conversationDatasetDisplayName); - $response = $gapicClient->createConversationDataset($parent, $conversationDataset); - $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.dialogflow.v2.ConversationDatasets/CreateConversationDataset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getConversationDataset(); - $this->assertProtobufEquals($conversationDataset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConversationDatasetTest'); - $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 createConversationDatasetExceptionTest() - { - $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/createConversationDatasetTest'); - $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 - $parent = 'parent-995424086'; - $conversationDataset = new ConversationDataset(); - $conversationDatasetDisplayName = 'conversationDatasetDisplayName-925930312'; - $conversationDataset->setDisplayName($conversationDatasetDisplayName); - $response = $gapicClient->createConversationDataset($parent, $conversationDataset); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConversationDatasetTest'); - 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 deleteConversationDatasetTest() - { - $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/deleteConversationDatasetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteConversationDatasetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); - $response = $gapicClient->deleteConversationDataset($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.dialogflow.v2.ConversationDatasets/DeleteConversationDataset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConversationDatasetTest'); - $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 deleteConversationDatasetExceptionTest() - { - $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/deleteConversationDatasetTest'); - $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->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); - $response = $gapicClient->deleteConversationDataset($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConversationDatasetTest'); - 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 getConversationDatasetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $conversationCount = 1994187347; - $expectedResponse = new ConversationDataset(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setConversationCount($conversationCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); - $response = $gapicClient->getConversationDataset($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.dialogflow.v2.ConversationDatasets/GetConversationDataset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversationDatasetExceptionTest() - { - $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->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); - try { - $gapicClient->getConversationDataset($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 importConversationDataTest() - { - $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/importConversationDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $conversationDataset = 'conversationDataset1344013500'; - $importCount = 1721296907; - $expectedResponse = new ImportConversationDataOperationResponse(); - $expectedResponse->setConversationDataset($conversationDataset); - $expectedResponse->setImportCount($importCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importConversationDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); - $inputConfig = new InputConfig(); - $response = $gapicClient->importConversationData($formattedName, $inputConfig); - $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.dialogflow.v2.ConversationDatasets/ImportConversationData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfig(); - $this->assertProtobufEquals($inputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importConversationDataTest'); - $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 importConversationDataExceptionTest() - { - $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/importConversationDataTest'); - $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->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); - $inputConfig = new InputConfig(); - $response = $gapicClient->importConversationData($formattedName, $inputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importConversationDataTest'); - 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 listConversationDatasetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $conversationDatasetsElement = new ConversationDataset(); - $conversationDatasets = [ - $conversationDatasetsElement, - ]; - $expectedResponse = new ListConversationDatasetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConversationDatasets($conversationDatasets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listConversationDatasets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConversationDatasets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.ConversationDatasets/ListConversationDatasets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversationDatasetsExceptionTest() - { - $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->listConversationDatasets($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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationModelsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationModelsClientTest.php deleted file mode 100644 index bd9cb022b550..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationModelsClientTest.php +++ /dev/null @@ -1,1064 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ConversationModelsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ConversationModelsClient($options); - } - - /** @test */ - public function createConversationModelTest() - { - $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/createConversationModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new ConversationModel(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConversationModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $conversationModel = new ConversationModel(); - $conversationModelDisplayName = 'conversationModelDisplayName-1078928857'; - $conversationModel->setDisplayName($conversationModelDisplayName); - $conversationModelDatasets = []; - $conversationModel->setDatasets($conversationModelDatasets); - $response = $gapicClient->createConversationModel($conversationModel); - $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.dialogflow.v2.ConversationModels/CreateConversationModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getConversationModel(); - $this->assertProtobufEquals($conversationModel, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConversationModelTest'); - $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 createConversationModelExceptionTest() - { - $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/createConversationModelTest'); - $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 - $conversationModel = new ConversationModel(); - $conversationModelDisplayName = 'conversationModelDisplayName-1078928857'; - $conversationModel->setDisplayName($conversationModelDisplayName); - $conversationModelDatasets = []; - $conversationModel->setDatasets($conversationModelDatasets); - $response = $gapicClient->createConversationModel($conversationModel); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConversationModelTest'); - 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 createConversationModelEvaluationTest() - { - $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/createConversationModelEvaluationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $rawHumanEvalTemplateCsv = 'rawHumanEvalTemplateCsv-1393080869'; - $expectedResponse = new ConversationModelEvaluation(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRawHumanEvalTemplateCsv($rawHumanEvalTemplateCsv); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConversationModelEvaluationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->conversationModelName('[PROJECT]', '[LOCATION]', '[CONVERSATION_MODEL]'); - $conversationModelEvaluation = new ConversationModelEvaluation(); - $response = $gapicClient->createConversationModelEvaluation($formattedParent, $conversationModelEvaluation); - $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.dialogflow.v2.ConversationModels/CreateConversationModelEvaluation', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getConversationModelEvaluation(); - $this->assertProtobufEquals($conversationModelEvaluation, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConversationModelEvaluationTest'); - $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 createConversationModelEvaluationExceptionTest() - { - $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/createConversationModelEvaluationTest'); - $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->conversationModelName('[PROJECT]', '[LOCATION]', '[CONVERSATION_MODEL]'); - $conversationModelEvaluation = new ConversationModelEvaluation(); - $response = $gapicClient->createConversationModelEvaluation($formattedParent, $conversationModelEvaluation); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConversationModelEvaluationTest'); - 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 deleteConversationModelTest() - { - $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/deleteConversationModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteConversationModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->deleteConversationModel($name); - $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.dialogflow.v2.ConversationModels/DeleteConversationModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConversationModelTest'); - $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 deleteConversationModelExceptionTest() - { - $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/deleteConversationModelTest'); - $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 - $name = 'name3373707'; - $response = $gapicClient->deleteConversationModel($name); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConversationModelTest'); - 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 deployConversationModelTest() - { - $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/deployConversationModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deployConversationModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->deployConversationModel($name); - $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.dialogflow.v2.ConversationModels/DeployConversationModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployConversationModelTest'); - $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 deployConversationModelExceptionTest() - { - $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/deployConversationModelTest'); - $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 - $name = 'name3373707'; - $response = $gapicClient->deployConversationModel($name); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployConversationModelTest'); - 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 getConversationModelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new ConversationModel(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getConversationModel($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.ConversationModels/GetConversationModel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversationModelExceptionTest() - { - $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 - $name = 'name3373707'; - try { - $gapicClient->getConversationModel($name); - // 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 getConversationModelEvaluationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $rawHumanEvalTemplateCsv = 'rawHumanEvalTemplateCsv-1393080869'; - $expectedResponse = new ConversationModelEvaluation(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRawHumanEvalTemplateCsv($rawHumanEvalTemplateCsv); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getConversationModelEvaluation($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.ConversationModels/GetConversationModelEvaluation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversationModelEvaluationExceptionTest() - { - $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 - $name = 'name3373707'; - try { - $gapicClient->getConversationModelEvaluation($name); - // 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 listConversationModelEvaluationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $conversationModelEvaluationsElement = new ConversationModelEvaluation(); - $conversationModelEvaluations = [ - $conversationModelEvaluationsElement, - ]; - $expectedResponse = new ListConversationModelEvaluationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConversationModelEvaluations($conversationModelEvaluations); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listConversationModelEvaluations($parent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConversationModelEvaluations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.ConversationModels/ListConversationModelEvaluations', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversationModelEvaluationsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - try { - $gapicClient->listConversationModelEvaluations($parent); - // 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 listConversationModelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $conversationModelsElement = new ConversationModel(); - $conversationModels = [ - $conversationModelsElement, - ]; - $expectedResponse = new ListConversationModelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConversationModels($conversationModels); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listConversationModels($parent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConversationModels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.ConversationModels/ListConversationModels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversationModelsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - try { - $gapicClient->listConversationModels($parent); - // 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 undeployConversationModelTest() - { - $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/undeployConversationModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeployConversationModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->undeployConversationModel($name); - $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.dialogflow.v2.ConversationModels/UndeployConversationModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployConversationModelTest'); - $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 undeployConversationModelExceptionTest() - { - $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/undeployConversationModelTest'); - $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 - $name = 'name3373707'; - $response = $gapicClient->undeployConversationModel($name); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployConversationModelTest'); - 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationProfilesClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationProfilesClientTest.php deleted file mode 100644 index dd4e641e4a34..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationProfilesClientTest.php +++ /dev/null @@ -1,808 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ConversationProfilesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ConversationProfilesClient($options); - } - - /** @test */ - public function clearSuggestionFeatureConfigTest() - { - $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/clearSuggestionFeatureConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $timeZone = 'timeZone36848094'; - $securitySettings = 'securitySettings-595091902'; - $expectedResponse = new ConversationProfile(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setSecuritySettings($securitySettings); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/clearSuggestionFeatureConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $conversationProfile = 'conversationProfile-408626707'; - $participantRole = Role::ROLE_UNSPECIFIED; - $suggestionFeatureType = Type::TYPE_UNSPECIFIED; - $response = $gapicClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); - $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.dialogflow.v2.ConversationProfiles/ClearSuggestionFeatureConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getConversationProfile(); - $this->assertProtobufEquals($conversationProfile, $actualValue); - $actualValue = $actualApiRequestObject->getParticipantRole(); - $this->assertProtobufEquals($participantRole, $actualValue); - $actualValue = $actualApiRequestObject->getSuggestionFeatureType(); - $this->assertProtobufEquals($suggestionFeatureType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/clearSuggestionFeatureConfigTest'); - $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 clearSuggestionFeatureConfigExceptionTest() - { - $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/clearSuggestionFeatureConfigTest'); - $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 - $conversationProfile = 'conversationProfile-408626707'; - $participantRole = Role::ROLE_UNSPECIFIED; - $suggestionFeatureType = Type::TYPE_UNSPECIFIED; - $response = $gapicClient->clearSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureType); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/clearSuggestionFeatureConfigTest'); - 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 createConversationProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $timeZone = 'timeZone36848094'; - $securitySettings = 'securitySettings-595091902'; - $expectedResponse = new ConversationProfile(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setSecuritySettings($securitySettings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $conversationProfile = new ConversationProfile(); - $conversationProfileDisplayName = 'conversationProfileDisplayName-203415833'; - $conversationProfile->setDisplayName($conversationProfileDisplayName); - $response = $gapicClient->createConversationProfile($formattedParent, $conversationProfile); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.ConversationProfiles/CreateConversationProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getConversationProfile(); - $this->assertProtobufEquals($conversationProfile, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConversationProfileExceptionTest() - { - $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->projectName('[PROJECT]'); - $conversationProfile = new ConversationProfile(); - $conversationProfileDisplayName = 'conversationProfileDisplayName-203415833'; - $conversationProfile->setDisplayName($conversationProfileDisplayName); - try { - $gapicClient->createConversationProfile($formattedParent, $conversationProfile); - // 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 deleteConversationProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); - $gapicClient->deleteConversationProfile($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.ConversationProfiles/DeleteConversationProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConversationProfileExceptionTest() - { - $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->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); - try { - $gapicClient->deleteConversationProfile($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 getConversationProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $timeZone = 'timeZone36848094'; - $securitySettings = 'securitySettings-595091902'; - $expectedResponse = new ConversationProfile(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setSecuritySettings($securitySettings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); - $response = $gapicClient->getConversationProfile($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.dialogflow.v2.ConversationProfiles/GetConversationProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversationProfileExceptionTest() - { - $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->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); - try { - $gapicClient->getConversationProfile($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 listConversationProfilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $conversationProfilesElement = new ConversationProfile(); - $conversationProfiles = [ - $conversationProfilesElement, - ]; - $expectedResponse = new ListConversationProfilesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConversationProfiles($conversationProfiles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listConversationProfiles($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConversationProfiles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.ConversationProfiles/ListConversationProfiles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversationProfilesExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listConversationProfiles($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 setSuggestionFeatureConfigTest() - { - $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/setSuggestionFeatureConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $timeZone = 'timeZone36848094'; - $securitySettings = 'securitySettings-595091902'; - $expectedResponse = new ConversationProfile(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setSecuritySettings($securitySettings); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/setSuggestionFeatureConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $conversationProfile = 'conversationProfile-408626707'; - $participantRole = Role::ROLE_UNSPECIFIED; - $suggestionFeatureConfig = new SuggestionFeatureConfig(); - $response = $gapicClient->setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig); - $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.dialogflow.v2.ConversationProfiles/SetSuggestionFeatureConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getConversationProfile(); - $this->assertProtobufEquals($conversationProfile, $actualValue); - $actualValue = $actualApiRequestObject->getParticipantRole(); - $this->assertProtobufEquals($participantRole, $actualValue); - $actualValue = $actualApiRequestObject->getSuggestionFeatureConfig(); - $this->assertProtobufEquals($suggestionFeatureConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setSuggestionFeatureConfigTest'); - $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 setSuggestionFeatureConfigExceptionTest() - { - $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/setSuggestionFeatureConfigTest'); - $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 - $conversationProfile = 'conversationProfile-408626707'; - $participantRole = Role::ROLE_UNSPECIFIED; - $suggestionFeatureConfig = new SuggestionFeatureConfig(); - $response = $gapicClient->setSuggestionFeatureConfig($conversationProfile, $participantRole, $suggestionFeatureConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setSuggestionFeatureConfigTest'); - 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 updateConversationProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $timeZone = 'timeZone36848094'; - $securitySettings = 'securitySettings-595091902'; - $expectedResponse = new ConversationProfile(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setSecuritySettings($securitySettings); - $transport->addResponse($expectedResponse); - // Mock request - $conversationProfile = new ConversationProfile(); - $conversationProfileDisplayName = 'conversationProfileDisplayName-203415833'; - $conversationProfile->setDisplayName($conversationProfileDisplayName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateConversationProfile($conversationProfile, $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.dialogflow.v2.ConversationProfiles/UpdateConversationProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getConversationProfile(); - $this->assertProtobufEquals($conversationProfile, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateConversationProfileExceptionTest() - { - $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 - $conversationProfile = new ConversationProfile(); - $conversationProfileDisplayName = 'conversationProfileDisplayName-203415833'; - $conversationProfile->setDisplayName($conversationProfileDisplayName); - $updateMask = new FieldMask(); - try { - $gapicClient->updateConversationProfile($conversationProfile, $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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationsClientTest.php deleted file mode 100644 index a2d88dd95c06..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ConversationsClientTest.php +++ /dev/null @@ -1,579 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ConversationsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ConversationsClient($options); - } - - /** @test */ - public function completeConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $conversationProfile = 'conversationProfile-408626707'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name2); - $expectedResponse->setConversationProfile($conversationProfile); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); - $response = $gapicClient->completeConversation($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.dialogflow.v2.Conversations/CompleteConversation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function completeConversationExceptionTest() - { - $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]', '[CONVERSATION]'); - try { - $gapicClient->completeConversation($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 createConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $conversationProfile = 'conversationProfile-408626707'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name); - $expectedResponse->setConversationProfile($conversationProfile); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $conversation = new Conversation(); - $conversationConversationProfile = $gapicClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); - $conversation->setConversationProfile($conversationConversationProfile); - $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.dialogflow.v2.Conversations/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->projectName('[PROJECT]'); - $conversation = new Conversation(); - $conversationConversationProfile = $gapicClient->conversationProfileName('[PROJECT]', '[CONVERSATION_PROFILE]'); - $conversation->setConversationProfile($conversationConversationProfile); - 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 getConversationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $conversationProfile = 'conversationProfile-408626707'; - $expectedResponse = new Conversation(); - $expectedResponse->setName($name2); - $expectedResponse->setConversationProfile($conversationProfile); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversationName('[PROJECT]', '[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.dialogflow.v2.Conversations/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]', '[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 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->projectName('[PROJECT]'); - $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.dialogflow.v2.Conversations/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->projectName('[PROJECT]'); - 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 listMessagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $messagesElement = new Message(); - $messages = [ - $messagesElement, - ]; - $expectedResponse = new ListMessagesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMessages($messages); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); - $response = $gapicClient->listMessages($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMessages()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Conversations/ListMessages', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMessagesExceptionTest() - { - $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]', '[CONVERSATION]'); - try { - $gapicClient->listMessages($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 suggestConversationSummaryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $latestMessage2 = 'latestMessage2-440913086'; - $contextSize2 = 397491196; - $expectedResponse = new SuggestConversationSummaryResponse(); - $expectedResponse->setLatestMessage($latestMessage2); - $expectedResponse->setContextSize($contextSize2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedConversation = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); - $response = $gapicClient->suggestConversationSummary($formattedConversation); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Conversations/SuggestConversationSummary', $actualFuncCall); - $actualValue = $actualRequestObject->getConversation(); - $this->assertProtobufEquals($formattedConversation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function suggestConversationSummaryExceptionTest() - { - $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 - $formattedConversation = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); - try { - $gapicClient->suggestConversationSummary($formattedConversation); - // 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/DocumentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/DocumentsClientTest.php deleted file mode 100644 index 51ffa88cba99..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/DocumentsClientTest.php +++ /dev/null @@ -1,1109 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DocumentsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DocumentsClient($options); - } - - /** @test */ - public function createDocumentTest() - { - $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/createDocumentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $mimeType = 'mimeType-196041627'; - $contentUri = 'contentUri-388807514'; - $enableAutoReload = false; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setContentUri($contentUri); - $expectedResponse->setEnableAutoReload($enableAutoReload); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDocumentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - $document = new Document(); - $documentDisplayName = 'documentDisplayName-59212206'; - $document->setDisplayName($documentDisplayName); - $documentMimeType = 'documentMimeType1242814409'; - $document->setMimeType($documentMimeType); - $documentKnowledgeTypes = []; - $document->setKnowledgeTypes($documentKnowledgeTypes); - $response = $gapicClient->createDocument($formattedParent, $document); - $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.dialogflow.v2.Documents/CreateDocument', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDocumentTest'); - $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 createDocumentExceptionTest() - { - $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/createDocumentTest'); - $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - $document = new Document(); - $documentDisplayName = 'documentDisplayName-59212206'; - $document->setDisplayName($documentDisplayName); - $documentMimeType = 'documentMimeType1242814409'; - $document->setMimeType($documentMimeType); - $documentKnowledgeTypes = []; - $document->setKnowledgeTypes($documentKnowledgeTypes); - $response = $gapicClient->createDocument($formattedParent, $document); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDocumentTest'); - 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 deleteDocumentTest() - { - $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/deleteDocumentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDocumentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - $response = $gapicClient->deleteDocument($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.dialogflow.v2.Documents/DeleteDocument', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDocumentTest'); - $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 deleteDocumentExceptionTest() - { - $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/deleteDocumentTest'); - $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->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - $response = $gapicClient->deleteDocument($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDocumentTest'); - 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 exportDocumentTest() - { - $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/exportDocumentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $mimeType = 'mimeType-196041627'; - $contentUri = 'contentUri-388807514'; - $enableAutoReload = false; - $expectedResponse = new Document(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setContentUri($contentUri); - $expectedResponse->setEnableAutoReload($enableAutoReload); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDocumentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - $response = $gapicClient->exportDocument($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.dialogflow.v2.Documents/ExportDocument', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentTest'); - $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 exportDocumentExceptionTest() - { - $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/exportDocumentTest'); - $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->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - $response = $gapicClient->exportDocument($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentTest'); - 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 getDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $mimeType = 'mimeType-196041627'; - $contentUri = 'contentUri-388807514'; - $enableAutoReload = false; - $expectedResponse = new Document(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setContentUri($contentUri); - $expectedResponse->setEnableAutoReload($enableAutoReload); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - $response = $gapicClient->getDocument($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.dialogflow.v2.Documents/GetDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentExceptionTest() - { - $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->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - try { - $gapicClient->getDocument($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 importDocumentsTest() - { - $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/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - $documentTemplate = new ImportDocumentTemplate(); - $documentTemplateMimeType = 'documentTemplateMimeType-1300921501'; - $documentTemplate->setMimeType($documentTemplateMimeType); - $documentTemplateKnowledgeTypes = []; - $documentTemplate->setKnowledgeTypes($documentTemplateKnowledgeTypes); - $response = $gapicClient->importDocuments($formattedParent, $documentTemplate); - $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.dialogflow.v2.Documents/ImportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDocumentTemplate(); - $this->assertProtobufEquals($documentTemplate, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - $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 importDocumentsExceptionTest() - { - $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/importDocumentsTest'); - $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - $documentTemplate = new ImportDocumentTemplate(); - $documentTemplateMimeType = 'documentTemplateMimeType-1300921501'; - $documentTemplate->setMimeType($documentTemplateMimeType); - $documentTemplateKnowledgeTypes = []; - $documentTemplate->setKnowledgeTypes($documentTemplateKnowledgeTypes); - $response = $gapicClient->importDocuments($formattedParent, $documentTemplate); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - 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 listDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $documentsElement = new Document(); - $documents = [ - $documentsElement, - ]; - $expectedResponse = new ListDocumentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDocuments($documents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - $response = $gapicClient->listDocuments($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Documents/ListDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDocumentsExceptionTest() - { - $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - try { - $gapicClient->listDocuments($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 reloadDocumentTest() - { - $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/reloadDocumentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $mimeType = 'mimeType-196041627'; - $contentUri2 = 'contentUri218136793'; - $enableAutoReload = false; - $expectedResponse = new Document(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setContentUri($contentUri2); - $expectedResponse->setEnableAutoReload($enableAutoReload); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reloadDocumentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - $response = $gapicClient->reloadDocument($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.dialogflow.v2.Documents/ReloadDocument', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reloadDocumentTest'); - $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 reloadDocumentExceptionTest() - { - $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/reloadDocumentTest'); - $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->documentName('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]'); - $response = $gapicClient->reloadDocument($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reloadDocumentTest'); - 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 updateDocumentTest() - { - $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/updateDocumentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $mimeType = 'mimeType-196041627'; - $contentUri = 'contentUri-388807514'; - $enableAutoReload = false; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setContentUri($contentUri); - $expectedResponse->setEnableAutoReload($enableAutoReload); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDocumentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $document = new Document(); - $documentDisplayName = 'documentDisplayName-59212206'; - $document->setDisplayName($documentDisplayName); - $documentMimeType = 'documentMimeType1242814409'; - $document->setMimeType($documentMimeType); - $documentKnowledgeTypes = []; - $document->setKnowledgeTypes($documentKnowledgeTypes); - $response = $gapicClient->updateDocument($document); - $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.dialogflow.v2.Documents/UpdateDocument', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDocumentTest'); - $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 updateDocumentExceptionTest() - { - $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/updateDocumentTest'); - $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 - $document = new Document(); - $documentDisplayName = 'documentDisplayName-59212206'; - $document->setDisplayName($documentDisplayName); - $documentMimeType = 'documentMimeType1242814409'; - $document->setMimeType($documentMimeType); - $documentKnowledgeTypes = []; - $document->setKnowledgeTypes($documentKnowledgeTypes); - $response = $gapicClient->updateDocument($document); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDocumentTest'); - 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EntityTypesClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EntityTypesClientTest.php deleted file mode 100644 index fe5f669b489e..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EntityTypesClientTest.php +++ /dev/null @@ -1,1129 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return EntityTypesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new EntityTypesClient($options); - } - - /** @test */ - public function batchCreateEntitiesTest() - { - $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/batchCreateEntitiesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchCreateEntitiesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $entities = []; - $response = $gapicClient->batchCreateEntities($formattedParent, $entities); - $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.dialogflow.v2.EntityTypes/BatchCreateEntities', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEntities(); - $this->assertProtobufEquals($entities, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchCreateEntitiesTest'); - $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 batchCreateEntitiesExceptionTest() - { - $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/batchCreateEntitiesTest'); - $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $entities = []; - $response = $gapicClient->batchCreateEntities($formattedParent, $entities); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchCreateEntitiesTest'); - 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 batchDeleteEntitiesTest() - { - $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/batchDeleteEntitiesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchDeleteEntitiesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $entityValues = []; - $response = $gapicClient->batchDeleteEntities($formattedParent, $entityValues); - $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.dialogflow.v2.EntityTypes/BatchDeleteEntities', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEntityValues(); - $this->assertProtobufEquals($entityValues, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchDeleteEntitiesTest'); - $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 batchDeleteEntitiesExceptionTest() - { - $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/batchDeleteEntitiesTest'); - $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $entityValues = []; - $response = $gapicClient->batchDeleteEntities($formattedParent, $entityValues); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchDeleteEntitiesTest'); - 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 batchDeleteEntityTypesTest() - { - $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/batchDeleteEntityTypesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchDeleteEntityTypesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $entityTypeNames = []; - $response = $gapicClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); - $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.dialogflow.v2.EntityTypes/BatchDeleteEntityTypes', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEntityTypeNames(); - $this->assertProtobufEquals($entityTypeNames, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchDeleteEntityTypesTest'); - $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 batchDeleteEntityTypesExceptionTest() - { - $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/batchDeleteEntityTypesTest'); - $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->agentName('[PROJECT]'); - $entityTypeNames = []; - $response = $gapicClient->batchDeleteEntityTypes($formattedParent, $entityTypeNames); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchDeleteEntityTypesTest'); - 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 batchUpdateEntitiesTest() - { - $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/batchUpdateEntitiesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchUpdateEntitiesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $entities = []; - $response = $gapicClient->batchUpdateEntities($formattedParent, $entities); - $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.dialogflow.v2.EntityTypes/BatchUpdateEntities', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEntities(); - $this->assertProtobufEquals($entities, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchUpdateEntitiesTest'); - $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 batchUpdateEntitiesExceptionTest() - { - $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/batchUpdateEntitiesTest'); - $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $entities = []; - $response = $gapicClient->batchUpdateEntities($formattedParent, $entities); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchUpdateEntitiesTest'); - 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 batchUpdateEntityTypesTest() - { - $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/batchUpdateEntityTypesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchUpdateEntityTypesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchUpdateEntityTypesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $response = $gapicClient->batchUpdateEntityTypes($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.dialogflow.v2.EntityTypes/BatchUpdateEntityTypes', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchUpdateEntityTypesTest'); - $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 batchUpdateEntityTypesExceptionTest() - { - $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/batchUpdateEntityTypesTest'); - $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->agentName('[PROJECT]'); - $response = $gapicClient->batchUpdateEntityTypes($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchUpdateEntityTypesTest'); - 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 createEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $enableFuzzyExtraction = true; - $expectedResponse = new EntityType(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $entityType = new EntityType(); - $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; - $entityType->setDisplayName($entityTypeDisplayName); - $entityTypeKind = Kind::KIND_UNSPECIFIED; - $entityType->setKind($entityTypeKind); - $response = $gapicClient->createEntityType($formattedParent, $entityType); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.EntityTypes/CreateEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntityType(); - $this->assertProtobufEquals($entityType, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntityTypeExceptionTest() - { - $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->agentName('[PROJECT]'); - $entityType = new EntityType(); - $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; - $entityType->setDisplayName($entityTypeDisplayName); - $entityTypeKind = Kind::KIND_UNSPECIFIED; - $entityType->setKind($entityTypeKind); - try { - $gapicClient->createEntityType($formattedParent, $entityType); - // 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 deleteEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $gapicClient->deleteEntityType($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.EntityTypes/DeleteEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntityTypeExceptionTest() - { - $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - try { - $gapicClient->deleteEntityType($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 getEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $enableFuzzyExtraction = true; - $expectedResponse = new EntityType(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - $response = $gapicClient->getEntityType($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.dialogflow.v2.EntityTypes/GetEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntityTypeExceptionTest() - { - $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->entityTypeName('[PROJECT]', '[ENTITY_TYPE]'); - try { - $gapicClient->getEntityType($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 listEntityTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entityTypesElement = new EntityType(); - $entityTypes = [ - $entityTypesElement, - ]; - $expectedResponse = new ListEntityTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntityTypes($entityTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $response = $gapicClient->listEntityTypes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntityTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.EntityTypes/ListEntityTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntityTypesExceptionTest() - { - $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->agentName('[PROJECT]'); - try { - $gapicClient->listEntityTypes($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 updateEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $enableFuzzyExtraction = true; - $expectedResponse = new EntityType(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); - $transport->addResponse($expectedResponse); - // Mock request - $entityType = new EntityType(); - $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; - $entityType->setDisplayName($entityTypeDisplayName); - $entityTypeKind = Kind::KIND_UNSPECIFIED; - $entityType->setKind($entityTypeKind); - $response = $gapicClient->updateEntityType($entityType); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.EntityTypes/UpdateEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getEntityType(); - $this->assertProtobufEquals($entityType, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntityTypeExceptionTest() - { - $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 - $entityType = new EntityType(); - $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; - $entityType->setDisplayName($entityTypeDisplayName); - $entityTypeKind = Kind::KIND_UNSPECIFIED; - $entityType->setKind($entityTypeKind); - try { - $gapicClient->updateEntityType($entityType); - // 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EnvironmentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EnvironmentsClientTest.php deleted file mode 100644 index 82413ceeb063..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/EnvironmentsClientTest.php +++ /dev/null @@ -1,587 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return EnvironmentsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new EnvironmentsClient($options); - } - - /** @test */ - public function createEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $agentVersion = 'agentVersion-26267234'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAgentVersion($agentVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $environment = new Environment(); - $environmentId = 'environmentId608412359'; - $response = $gapicClient->createEnvironment($formattedParent, $environment, $environmentId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Environments/CreateEnvironment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $actualValue = $actualRequestObject->getEnvironmentId(); - $this->assertProtobufEquals($environmentId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEnvironmentExceptionTest() - { - $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->agentName('[PROJECT]'); - $environment = new Environment(); - $environmentId = 'environmentId608412359'; - try { - $gapicClient->createEnvironment($formattedParent, $environment, $environmentId); - // 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 deleteEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); - $gapicClient->deleteEnvironment($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Environments/DeleteEnvironment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEnvironmentExceptionTest() - { - $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->environmentName('[PROJECT]', '[ENVIRONMENT]'); - try { - $gapicClient->deleteEnvironment($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 getEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $agentVersion = 'agentVersion-26267234'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAgentVersion($agentVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); - $response = $gapicClient->getEnvironment($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.dialogflow.v2.Environments/GetEnvironment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentExceptionTest() - { - $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->environmentName('[PROJECT]', '[ENVIRONMENT]'); - try { - $gapicClient->getEnvironment($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 getEnvironmentHistoryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $parent2 = 'parent21175163357'; - $nextPageToken = ''; - $entriesElement = new Entry(); - $entries = [ - $entriesElement, - ]; - $expectedResponse = new EnvironmentHistory(); - $expectedResponse->setParent($parent2); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntries($entries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[ENVIRONMENT]'); - $response = $gapicClient->getEnvironmentHistory($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Environments/GetEnvironmentHistory', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentHistoryExceptionTest() - { - $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->environmentName('[PROJECT]', '[ENVIRONMENT]'); - try { - $gapicClient->getEnvironmentHistory($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 listEnvironmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $environmentsElement = new Environment(); - $environments = [ - $environmentsElement, - ]; - $expectedResponse = new ListEnvironmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEnvironments($environments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $response = $gapicClient->listEnvironments($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Environments/ListEnvironments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsExceptionTest() - { - $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->agentName('[PROJECT]'); - try { - $gapicClient->listEnvironments($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 updateEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $agentVersion = 'agentVersion-26267234'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAgentVersion($agentVersion); - $transport->addResponse($expectedResponse); - // Mock request - $environment = new Environment(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateEnvironment($environment, $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.dialogflow.v2.Environments/UpdateEnvironment', $actualFuncCall); - $actualValue = $actualRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEnvironmentExceptionTest() - { - $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 - $environment = new Environment(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateEnvironment($environment, $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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/FulfillmentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/FulfillmentsClientTest.php deleted file mode 100644 index 7a9fdc6fd390..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/FulfillmentsClientTest.php +++ /dev/null @@ -1,320 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FulfillmentsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FulfillmentsClient($options); - } - - /** @test */ - public function getFulfillmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $enabled = false; - $expectedResponse = new Fulfillment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnabled($enabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->fulfillmentName('[PROJECT]'); - $response = $gapicClient->getFulfillment($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.dialogflow.v2.Fulfillments/GetFulfillment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFulfillmentExceptionTest() - { - $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->fulfillmentName('[PROJECT]'); - try { - $gapicClient->getFulfillment($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 updateFulfillmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $enabled = false; - $expectedResponse = new Fulfillment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnabled($enabled); - $transport->addResponse($expectedResponse); - // Mock request - $fulfillment = new Fulfillment(); - $fulfillmentName = 'fulfillmentName1097998729'; - $fulfillment->setName($fulfillmentName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateFulfillment($fulfillment, $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.dialogflow.v2.Fulfillments/UpdateFulfillment', $actualFuncCall); - $actualValue = $actualRequestObject->getFulfillment(); - $this->assertProtobufEquals($fulfillment, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateFulfillmentExceptionTest() - { - $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 - $fulfillment = new Fulfillment(); - $fulfillmentName = 'fulfillmentName1097998729'; - $fulfillment->setName($fulfillmentName); - $updateMask = new FieldMask(); - try { - $gapicClient->updateFulfillment($fulfillment, $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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/IntentsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/IntentsClientTest.php deleted file mode 100644 index 6ed657d29084..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/IntentsClientTest.php +++ /dev/null @@ -1,805 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return IntentsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new IntentsClient($options); - } - - /** @test */ - public function batchDeleteIntentsTest() - { - $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/batchDeleteIntentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchDeleteIntentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $intents = []; - $response = $gapicClient->batchDeleteIntents($formattedParent, $intents); - $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.dialogflow.v2.Intents/BatchDeleteIntents', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIntents(); - $this->assertProtobufEquals($intents, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchDeleteIntentsTest'); - $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 batchDeleteIntentsExceptionTest() - { - $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/batchDeleteIntentsTest'); - $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->agentName('[PROJECT]'); - $intents = []; - $response = $gapicClient->batchDeleteIntents($formattedParent, $intents); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchDeleteIntentsTest'); - 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 batchUpdateIntentsTest() - { - $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/batchUpdateIntentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchUpdateIntentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchUpdateIntentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $response = $gapicClient->batchUpdateIntents($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.dialogflow.v2.Intents/BatchUpdateIntents', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchUpdateIntentsTest'); - $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 batchUpdateIntentsExceptionTest() - { - $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/batchUpdateIntentsTest'); - $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->agentName('[PROJECT]'); - $response = $gapicClient->batchUpdateIntents($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchUpdateIntentsTest'); - 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 createIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $priority = 1165461084; - $isFallback = false; - $mlDisabled = true; - $liveAgentHandoff = false; - $endInteraction = true; - $action = 'action-1422950858'; - $resetContexts = true; - $rootFollowupIntentName = 'rootFollowupIntentName402253784'; - $parentFollowupIntentName = 'parentFollowupIntentName-1131901680'; - $expectedResponse = new Intent(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setPriority($priority); - $expectedResponse->setIsFallback($isFallback); - $expectedResponse->setMlDisabled($mlDisabled); - $expectedResponse->setLiveAgentHandoff($liveAgentHandoff); - $expectedResponse->setEndInteraction($endInteraction); - $expectedResponse->setAction($action); - $expectedResponse->setResetContexts($resetContexts); - $expectedResponse->setRootFollowupIntentName($rootFollowupIntentName); - $expectedResponse->setParentFollowupIntentName($parentFollowupIntentName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $intent = new Intent(); - $intentDisplayName = 'intentDisplayName-1733865935'; - $intent->setDisplayName($intentDisplayName); - $response = $gapicClient->createIntent($formattedParent, $intent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Intents/CreateIntent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getIntent(); - $this->assertProtobufEquals($intent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createIntentExceptionTest() - { - $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->agentName('[PROJECT]'); - $intent = new Intent(); - $intentDisplayName = 'intentDisplayName-1733865935'; - $intent->setDisplayName($intentDisplayName); - try { - $gapicClient->createIntent($formattedParent, $intent); - // 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 deleteIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->intentName('[PROJECT]', '[INTENT]'); - $gapicClient->deleteIntent($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Intents/DeleteIntent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIntentExceptionTest() - { - $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->intentName('[PROJECT]', '[INTENT]'); - try { - $gapicClient->deleteIntent($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 getIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $priority = 1165461084; - $isFallback = false; - $mlDisabled = true; - $liveAgentHandoff = false; - $endInteraction = true; - $action = 'action-1422950858'; - $resetContexts = true; - $rootFollowupIntentName = 'rootFollowupIntentName402253784'; - $parentFollowupIntentName = 'parentFollowupIntentName-1131901680'; - $expectedResponse = new Intent(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setPriority($priority); - $expectedResponse->setIsFallback($isFallback); - $expectedResponse->setMlDisabled($mlDisabled); - $expectedResponse->setLiveAgentHandoff($liveAgentHandoff); - $expectedResponse->setEndInteraction($endInteraction); - $expectedResponse->setAction($action); - $expectedResponse->setResetContexts($resetContexts); - $expectedResponse->setRootFollowupIntentName($rootFollowupIntentName); - $expectedResponse->setParentFollowupIntentName($parentFollowupIntentName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->intentName('[PROJECT]', '[INTENT]'); - $response = $gapicClient->getIntent($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.dialogflow.v2.Intents/GetIntent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIntentExceptionTest() - { - $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->intentName('[PROJECT]', '[INTENT]'); - try { - $gapicClient->getIntent($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 listIntentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $intentsElement = new Intent(); - $intents = [ - $intentsElement, - ]; - $expectedResponse = new ListIntentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIntents($intents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $response = $gapicClient->listIntents($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIntents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Intents/ListIntents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIntentsExceptionTest() - { - $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->agentName('[PROJECT]'); - try { - $gapicClient->listIntents($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 updateIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $priority = 1165461084; - $isFallback = false; - $mlDisabled = true; - $liveAgentHandoff = false; - $endInteraction = true; - $action = 'action-1422950858'; - $resetContexts = true; - $rootFollowupIntentName = 'rootFollowupIntentName402253784'; - $parentFollowupIntentName = 'parentFollowupIntentName-1131901680'; - $expectedResponse = new Intent(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setPriority($priority); - $expectedResponse->setIsFallback($isFallback); - $expectedResponse->setMlDisabled($mlDisabled); - $expectedResponse->setLiveAgentHandoff($liveAgentHandoff); - $expectedResponse->setEndInteraction($endInteraction); - $expectedResponse->setAction($action); - $expectedResponse->setResetContexts($resetContexts); - $expectedResponse->setRootFollowupIntentName($rootFollowupIntentName); - $expectedResponse->setParentFollowupIntentName($parentFollowupIntentName); - $transport->addResponse($expectedResponse); - // Mock request - $intent = new Intent(); - $intentDisplayName = 'intentDisplayName-1733865935'; - $intent->setDisplayName($intentDisplayName); - $response = $gapicClient->updateIntent($intent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Intents/UpdateIntent', $actualFuncCall); - $actualValue = $actualRequestObject->getIntent(); - $this->assertProtobufEquals($intent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateIntentExceptionTest() - { - $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 - $intent = new Intent(); - $intentDisplayName = 'intentDisplayName-1733865935'; - $intent->setDisplayName($intentDisplayName); - try { - $gapicClient->updateIntent($intent); - // 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/KnowledgeBasesClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/KnowledgeBasesClientTest.php deleted file mode 100644 index 3169e40de146..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/KnowledgeBasesClientTest.php +++ /dev/null @@ -1,514 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return KnowledgeBasesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new KnowledgeBasesClient($options); - } - - /** @test */ - public function createKnowledgeBaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new KnowledgeBase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $knowledgeBase = new KnowledgeBase(); - $knowledgeBaseDisplayName = 'knowledgeBaseDisplayName881802878'; - $knowledgeBase->setDisplayName($knowledgeBaseDisplayName); - $response = $gapicClient->createKnowledgeBase($formattedParent, $knowledgeBase); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.KnowledgeBases/CreateKnowledgeBase', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getKnowledgeBase(); - $this->assertProtobufEquals($knowledgeBase, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKnowledgeBaseExceptionTest() - { - $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->projectName('[PROJECT]'); - $knowledgeBase = new KnowledgeBase(); - $knowledgeBaseDisplayName = 'knowledgeBaseDisplayName881802878'; - $knowledgeBase->setDisplayName($knowledgeBaseDisplayName); - try { - $gapicClient->createKnowledgeBase($formattedParent, $knowledgeBase); - // 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 deleteKnowledgeBaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - $gapicClient->deleteKnowledgeBase($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.KnowledgeBases/DeleteKnowledgeBase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteKnowledgeBaseExceptionTest() - { - $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - try { - $gapicClient->deleteKnowledgeBase($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 getKnowledgeBaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new KnowledgeBase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - $response = $gapicClient->getKnowledgeBase($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.dialogflow.v2.KnowledgeBases/GetKnowledgeBase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKnowledgeBaseExceptionTest() - { - $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->knowledgeBaseName('[PROJECT]', '[KNOWLEDGE_BASE]'); - try { - $gapicClient->getKnowledgeBase($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 listKnowledgeBasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $knowledgeBasesElement = new KnowledgeBase(); - $knowledgeBases = [ - $knowledgeBasesElement, - ]; - $expectedResponse = new ListKnowledgeBasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setKnowledgeBases($knowledgeBases); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listKnowledgeBases($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getKnowledgeBases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.KnowledgeBases/ListKnowledgeBases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKnowledgeBasesExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listKnowledgeBases($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 updateKnowledgeBaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new KnowledgeBase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $knowledgeBase = new KnowledgeBase(); - $knowledgeBaseDisplayName = 'knowledgeBaseDisplayName881802878'; - $knowledgeBase->setDisplayName($knowledgeBaseDisplayName); - $response = $gapicClient->updateKnowledgeBase($knowledgeBase); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.KnowledgeBases/UpdateKnowledgeBase', $actualFuncCall); - $actualValue = $actualRequestObject->getKnowledgeBase(); - $this->assertProtobufEquals($knowledgeBase, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateKnowledgeBaseExceptionTest() - { - $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 - $knowledgeBase = new KnowledgeBase(); - $knowledgeBaseDisplayName = 'knowledgeBaseDisplayName881802878'; - $knowledgeBase->setDisplayName($knowledgeBaseDisplayName); - try { - $gapicClient->updateKnowledgeBase($knowledgeBase); - // 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ParticipantsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ParticipantsClientTest.php deleted file mode 100644 index 743e23e02211..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/ParticipantsClientTest.php +++ /dev/null @@ -1,806 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ParticipantsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ParticipantsClient($options); - } - - /** @test */ - public function analyzeContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $replyText = 'replyText-549180062'; - $expectedResponse = new AnalyzeContentResponse(); - $expectedResponse->setReplyText($replyText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParticipant = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - $response = $gapicClient->analyzeContent($formattedParticipant); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Participants/AnalyzeContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParticipant(); - $this->assertProtobufEquals($formattedParticipant, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeContentExceptionTest() - { - $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 - $formattedParticipant = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - try { - $gapicClient->analyzeContent($formattedParticipant); - // 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 createParticipantTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $sipRecordingMediaLabel = 'sipRecordingMediaLabel-1522741274'; - $obfuscatedExternalUserId = 'obfuscatedExternalUserId-263618122'; - $expectedResponse = new Participant(); - $expectedResponse->setName($name); - $expectedResponse->setSipRecordingMediaLabel($sipRecordingMediaLabel); - $expectedResponse->setObfuscatedExternalUserId($obfuscatedExternalUserId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); - $participant = new Participant(); - $response = $gapicClient->createParticipant($formattedParent, $participant); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Participants/CreateParticipant', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getParticipant(); - $this->assertProtobufEquals($participant, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createParticipantExceptionTest() - { - $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]', '[CONVERSATION]'); - $participant = new Participant(); - try { - $gapicClient->createParticipant($formattedParent, $participant); - // 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 getParticipantTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sipRecordingMediaLabel = 'sipRecordingMediaLabel-1522741274'; - $obfuscatedExternalUserId = 'obfuscatedExternalUserId-263618122'; - $expectedResponse = new Participant(); - $expectedResponse->setName($name2); - $expectedResponse->setSipRecordingMediaLabel($sipRecordingMediaLabel); - $expectedResponse->setObfuscatedExternalUserId($obfuscatedExternalUserId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - $response = $gapicClient->getParticipant($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.dialogflow.v2.Participants/GetParticipant', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getParticipantExceptionTest() - { - $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->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - try { - $gapicClient->getParticipant($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 listParticipantsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $participantsElement = new Participant(); - $participants = [ - $participantsElement, - ]; - $expectedResponse = new ListParticipantsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setParticipants($participants); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->conversationName('[PROJECT]', '[CONVERSATION]'); - $response = $gapicClient->listParticipants($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getParticipants()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Participants/ListParticipants', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listParticipantsExceptionTest() - { - $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]', '[CONVERSATION]'); - try { - $gapicClient->listParticipants($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 streamingAnalyzeContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $replyText = 'replyText-549180062'; - $expectedResponse = new StreamingAnalyzeContentResponse(); - $expectedResponse->setReplyText($replyText); - $transport->addResponse($expectedResponse); - $replyText2 = 'replyText2518940821'; - $expectedResponse2 = new StreamingAnalyzeContentResponse(); - $expectedResponse2->setReplyText($replyText2); - $transport->addResponse($expectedResponse2); - $replyText3 = 'replyText3518940822'; - $expectedResponse3 = new StreamingAnalyzeContentResponse(); - $expectedResponse3->setReplyText($replyText3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedParticipant = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - $request = new StreamingAnalyzeContentRequest(); - $request->setParticipant($formattedParticipant); - $formattedParticipant2 = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - $request2 = new StreamingAnalyzeContentRequest(); - $request2->setParticipant($formattedParticipant2); - $formattedParticipant3 = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - $request3 = new StreamingAnalyzeContentRequest(); - $request3->setParticipant($formattedParticipant3); - $bidi = $gapicClient->streamingAnalyzeContent(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Participants/StreamingAnalyzeContent', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function streamingAnalyzeContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->streamingAnalyzeContent(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream 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 suggestArticlesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $latestMessage2 = 'latestMessage2-440913086'; - $contextSize2 = 397491196; - $expectedResponse = new SuggestArticlesResponse(); - $expectedResponse->setLatestMessage($latestMessage2); - $expectedResponse->setContextSize($contextSize2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - $response = $gapicClient->suggestArticles($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.dialogflow.v2.Participants/SuggestArticles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function suggestArticlesExceptionTest() - { - $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->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - try { - $gapicClient->suggestArticles($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 suggestFaqAnswersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $latestMessage2 = 'latestMessage2-440913086'; - $contextSize2 = 397491196; - $expectedResponse = new SuggestFaqAnswersResponse(); - $expectedResponse->setLatestMessage($latestMessage2); - $expectedResponse->setContextSize($contextSize2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - $response = $gapicClient->suggestFaqAnswers($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.dialogflow.v2.Participants/SuggestFaqAnswers', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function suggestFaqAnswersExceptionTest() - { - $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->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - try { - $gapicClient->suggestFaqAnswers($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 suggestSmartRepliesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $latestMessage2 = 'latestMessage2-440913086'; - $contextSize2 = 397491196; - $expectedResponse = new SuggestSmartRepliesResponse(); - $expectedResponse->setLatestMessage($latestMessage2); - $expectedResponse->setContextSize($contextSize2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - $response = $gapicClient->suggestSmartReplies($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.dialogflow.v2.Participants/SuggestSmartReplies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function suggestSmartRepliesExceptionTest() - { - $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->participantName('[PROJECT]', '[CONVERSATION]', '[PARTICIPANT]'); - try { - $gapicClient->suggestSmartReplies($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 updateParticipantTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $sipRecordingMediaLabel = 'sipRecordingMediaLabel-1522741274'; - $obfuscatedExternalUserId = 'obfuscatedExternalUserId-263618122'; - $expectedResponse = new Participant(); - $expectedResponse->setName($name); - $expectedResponse->setSipRecordingMediaLabel($sipRecordingMediaLabel); - $expectedResponse->setObfuscatedExternalUserId($obfuscatedExternalUserId); - $transport->addResponse($expectedResponse); - // Mock request - $participant = new Participant(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateParticipant($participant, $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.dialogflow.v2.Participants/UpdateParticipant', $actualFuncCall); - $actualValue = $actualRequestObject->getParticipant(); - $this->assertProtobufEquals($participant, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateParticipantExceptionTest() - { - $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 - $participant = new Participant(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateParticipant($participant, $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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionEntityTypesClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionEntityTypesClientTest.php deleted file mode 100644 index 66fa4a84a586..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionEntityTypesClientTest.php +++ /dev/null @@ -1,519 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SessionEntityTypesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SessionEntityTypesClient($options); - } - - /** @test */ - public function createSessionEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new SessionEntityType(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $sessionEntityType = new SessionEntityType(); - $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; - $sessionEntityType->setName($sessionEntityTypeName); - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); - $sessionEntityTypeEntities = []; - $sessionEntityType->setEntities($sessionEntityTypeEntities); - $response = $gapicClient->createSessionEntityType($formattedParent, $sessionEntityType); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.SessionEntityTypes/CreateSessionEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSessionEntityType(); - $this->assertProtobufEquals($sessionEntityType, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSessionEntityTypeExceptionTest() - { - $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->sessionName('[PROJECT]', '[SESSION]'); - $sessionEntityType = new SessionEntityType(); - $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; - $sessionEntityType->setName($sessionEntityTypeName); - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); - $sessionEntityTypeEntities = []; - $sessionEntityType->setEntities($sessionEntityTypeEntities); - try { - $gapicClient->createSessionEntityType($formattedParent, $sessionEntityType); - // 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 deleteSessionEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); - $gapicClient->deleteSessionEntityType($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.SessionEntityTypes/DeleteSessionEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSessionEntityTypeExceptionTest() - { - $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->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); - try { - $gapicClient->deleteSessionEntityType($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 getSessionEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new SessionEntityType(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); - $response = $gapicClient->getSessionEntityType($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.dialogflow.v2.SessionEntityTypes/GetSessionEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSessionEntityTypeExceptionTest() - { - $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->sessionEntityTypeName('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]'); - try { - $gapicClient->getSessionEntityType($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 listSessionEntityTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sessionEntityTypesElement = new SessionEntityType(); - $sessionEntityTypes = [ - $sessionEntityTypesElement, - ]; - $expectedResponse = new ListSessionEntityTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSessionEntityTypes($sessionEntityTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $response = $gapicClient->listSessionEntityTypes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSessionEntityTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.SessionEntityTypes/ListSessionEntityTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionEntityTypesExceptionTest() - { - $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->sessionName('[PROJECT]', '[SESSION]'); - try { - $gapicClient->listSessionEntityTypes($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 updateSessionEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new SessionEntityType(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $sessionEntityType = new SessionEntityType(); - $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; - $sessionEntityType->setName($sessionEntityTypeName); - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); - $sessionEntityTypeEntities = []; - $sessionEntityType->setEntities($sessionEntityTypeEntities); - $response = $gapicClient->updateSessionEntityType($sessionEntityType); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.SessionEntityTypes/UpdateSessionEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getSessionEntityType(); - $this->assertProtobufEquals($sessionEntityType, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSessionEntityTypeExceptionTest() - { - $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 - $sessionEntityType = new SessionEntityType(); - $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; - $sessionEntityType->setName($sessionEntityTypeName); - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); - $sessionEntityTypeEntities = []; - $sessionEntityType->setEntities($sessionEntityTypeEntities); - try { - $gapicClient->updateSessionEntityType($sessionEntityType); - // 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionsClientTest.php deleted file mode 100644 index d8b818a6bb74..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/SessionsClientTest.php +++ /dev/null @@ -1,365 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SessionsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SessionsClient($options); - } - - /** @test */ - public function detectIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $responseId = 'responseId1847552473'; - $outputAudio = '24'; - $expectedResponse = new DetectIntentResponse(); - $expectedResponse->setResponseId($responseId); - $expectedResponse->setOutputAudio($outputAudio); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSession = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $queryInput = new QueryInput(); - $response = $gapicClient->detectIntent($formattedSession, $queryInput); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Sessions/DetectIntent', $actualFuncCall); - $actualValue = $actualRequestObject->getSession(); - $this->assertProtobufEquals($formattedSession, $actualValue); - $actualValue = $actualRequestObject->getQueryInput(); - $this->assertProtobufEquals($queryInput, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function detectIntentExceptionTest() - { - $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 - $formattedSession = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $queryInput = new QueryInput(); - try { - $gapicClient->detectIntent($formattedSession, $queryInput); - // 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 streamingDetectIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $responseId = 'responseId1847552473'; - $outputAudio = '24'; - $expectedResponse = new StreamingDetectIntentResponse(); - $expectedResponse->setResponseId($responseId); - $expectedResponse->setOutputAudio($outputAudio); - $transport->addResponse($expectedResponse); - $responseId2 = 'responseId21676436300'; - $outputAudio2 = '-53'; - $expectedResponse2 = new StreamingDetectIntentResponse(); - $expectedResponse2->setResponseId($responseId2); - $expectedResponse2->setOutputAudio($outputAudio2); - $transport->addResponse($expectedResponse2); - $responseId3 = 'responseId31676436301'; - $outputAudio3 = '-52'; - $expectedResponse3 = new StreamingDetectIntentResponse(); - $expectedResponse3->setResponseId($responseId3); - $expectedResponse3->setOutputAudio($outputAudio3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedSession = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $queryInput = new QueryInput(); - $request = new StreamingDetectIntentRequest(); - $request->setSession($formattedSession); - $request->setQueryInput($queryInput); - $formattedSession2 = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $queryInput2 = new QueryInput(); - $request2 = new StreamingDetectIntentRequest(); - $request2->setSession($formattedSession2); - $request2->setQueryInput($queryInput2); - $formattedSession3 = $gapicClient->sessionName('[PROJECT]', '[SESSION]'); - $queryInput3 = new QueryInput(); - $request3 = new StreamingDetectIntentRequest(); - $request3->setSession($formattedSession3); - $request3->setQueryInput($queryInput3); - $bidi = $gapicClient->streamingDetectIntent(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Sessions/StreamingDetectIntent', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function streamingDetectIntentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->streamingDetectIntent(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/VersionsClientTest.php b/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/VersionsClientTest.php deleted file mode 100644 index 004f7d2889c4..000000000000 --- a/owl-bot-staging/Dialogflow/v2/tests/Unit/V2/VersionsClientTest.php +++ /dev/null @@ -1,511 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VersionsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VersionsClient($options); - } - - /** @test */ - public function createVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $versionNumber = 135927952; - $expectedResponse = new Version(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setVersionNumber($versionNumber); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $version = new Version(); - $response = $gapicClient->createVersion($formattedParent, $version); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Versions/CreateVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createVersionExceptionTest() - { - $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->agentName('[PROJECT]'); - $version = new Version(); - try { - $gapicClient->createVersion($formattedParent, $version); - // 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 deleteVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->versionName('[PROJECT]', '[VERSION]'); - $gapicClient->deleteVersion($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Versions/DeleteVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteVersionExceptionTest() - { - $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->versionName('[PROJECT]', '[VERSION]'); - try { - $gapicClient->deleteVersion($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 getVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $versionNumber = 135927952; - $expectedResponse = new Version(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setVersionNumber($versionNumber); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->versionName('[PROJECT]', '[VERSION]'); - $response = $gapicClient->getVersion($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.dialogflow.v2.Versions/GetVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVersionExceptionTest() - { - $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->versionName('[PROJECT]', '[VERSION]'); - try { - $gapicClient->getVersion($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 listVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $versionsElement = new Version(); - $versions = [ - $versionsElement, - ]; - $expectedResponse = new ListVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVersions($versions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]'); - $response = $gapicClient->listVersions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.v2.Versions/ListVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVersionsExceptionTest() - { - $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->agentName('[PROJECT]'); - try { - $gapicClient->listVersions($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 updateVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $versionNumber = 135927952; - $expectedResponse = new Version(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setVersionNumber($versionNumber); - $transport->addResponse($expectedResponse); - // Mock request - $version = new Version(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateVersion($version, $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.dialogflow.v2.Versions/UpdateVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateVersionExceptionTest() - { - $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 - $version = new Version(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateVersion($version, $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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - try { - $gapicClient->getLocation(); - // 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -}